From: Mathias Nyman Date: Thu, 26 Aug 2010 07:36:44 +0000 (+0000) Subject: i2c-omap: Make sure i2c bus is free before setting it to idle X-Git-Tag: upstream/snapshot3+hdmi~12853^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c64eb26ed5c5550fbabd345e573af3fc6a7f775;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Tony Lindgren Signed-off-by: Ben Dooks --- 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;