Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250840
b: refs/heads/master
c: 99381be
h: refs/heads/master
v: v3
  • Loading branch information
Virupax Sadashivpetimath authored and Ben Dooks committed May 24, 2011
1 parent 9ae6395 commit 69d4bf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 2320f504d3c87b814abf37f224ab68d52d2a512c
refs/heads/master: 99381bec0a569a69345148cb1ac74c2caa43a227
10 changes: 6 additions & 4 deletions trunk/drivers/i2c/busses/i2c-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
cause >= ARRAY_SIZE(abort_causes)
? "unknown reason" : abort_causes[cause]);

status = status ? status : dev->result;

goto out;
}
udelay(I2C_DELAY);
Expand Down Expand Up @@ -759,7 +761,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
| I2C_IT_RXFF | I2C_IT_RXFE));

if (dev->cli.count) {
dev->result = -1;
dev->result = -EIO;
dev_err(&dev->pdev->dev, "%lu bytes still remain to be"
"xfered\n", dev->cli.count);
(void) init_hw(dev);
Expand All @@ -770,7 +772,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)

/* Master Arbitration lost interrupt */
case I2C_IT_MAL:
dev->result = -1;
dev->result = -EIO;
(void) init_hw(dev);

i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MAL);
Expand All @@ -784,7 +786,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
* during the transaction.
*/
case I2C_IT_BERR:
dev->result = -1;
dev->result = -EIO;
/* get the status */
if (((readl(dev->virtbase + I2C_SR) >> 2) & 0x3) == I2C_ABORT)
(void) init_hw(dev);
Expand All @@ -800,7 +802,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
* the Tx FIFO is full.
*/
case I2C_IT_TXFOVR:
dev->result = -1;
dev->result = -EIO;
(void) init_hw(dev);

dev_err(&dev->pdev->dev, "Tx Fifo Over run\n");
Expand Down

0 comments on commit 69d4bf4

Please sign in to comment.