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-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c64eb26ed5c5550fbabd345e573af3fc6a7f775;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 7674efb55378..b33c78586bfc 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;