summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@nokia.com>2010-08-26 07:36:44 (GMT)
committerBen Dooks <ben-linux@fluff.org>2010-09-22 00:06:58 (GMT)
commit5c64eb26ed5c5550fbabd345e573af3fc6a7f775 (patch)
tree9a78f9e7c55865e8ece8c577afeacc789cce2098 /drivers
parent2422084a94fcd5038406261b331672a13c92c050 (diff)
downloadlinux-fsl-qoriq-5c64eb26ed5c5550fbabd345e573af3fc6a7f775.tar.xz
i2c-omap: Make sure i2c bus is free before setting it to idle
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-omap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 7674efb..b33c785 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -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;