Skip to content

Commit

Permalink
i2c-omap: Make sure i2c bus is free before setting it to idle
Browse files Browse the repository at this point in the history
If the i2c bus receives an interrupt with both BB (bus busy) and
ARDY (register access ready) statuses set during the tranfer of the last message
the bus was put to idle while still busy.

This caused bus to timeout.

Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Mathias Nyman authored and Ben Dooks committed Sep 22, 2010
1 parent 2422084 commit 5c64eb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)

if (r == 0)
r = num;

omap_i2c_wait_for_bb(dev);
out:
omap_i2c_idle(dev);
return r;
Expand Down

0 comments on commit 5c64eb2

Please sign in to comment.