Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40455
b: refs/heads/master
c: 84b5abe
h: refs/heads/master
i:
  40453: 6b2848c
  40451: ecf8d76
  40447: 88bcbb1
v: v3
  • Loading branch information
Russell King authored and Russell King committed Oct 28, 2006
1 parent 77a519d commit 1b2f444
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0f205d9c656da9dad6340f75e33a96014b7d23f
refs/heads/master: 84b5abe69ff600a559e1a1fa29f1edad707d4e2f
8 changes: 6 additions & 2 deletions trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ static int i2c_pxa_wait_slave(struct pxa_i2c *i2c)
dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n",
__func__, (long)jiffies, ISR, ICR, IBMR);

if ((ISR & (ISR_UB|ISR_IBB|ISR_SAD)) == ISR_SAD ||
if ((ISR & (ISR_UB|ISR_IBB)) == 0 ||
(ISR & ISR_SAD) != 0 ||
(ICR & ICR_SCLE) == 0) {
if (i2c_debug > 1)
dev_dbg(&i2c->adap.dev, "%s: done\n", __func__);
Expand Down Expand Up @@ -492,7 +493,10 @@ static void i2c_pxa_slave_txempty(struct pxa_i2c *i2c, u32 isr)
if (isr & ISR_BED) {
/* what should we do here? */
} else {
int ret = i2c->slave->read(i2c->slave->data);
int ret = 0;

if (i2c->slave != NULL)
ret = i2c->slave->read(i2c->slave->data);

IDBR = ret;
ICR |= ICR_TB; /* allow next byte */
Expand Down

0 comments on commit 1b2f444

Please sign in to comment.