]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: omap: fix draining irq handling
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 20 Jan 2013 18:37:02 +0000 (20:37 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Tue, 22 Jan 2013 15:17:05 +0000 (16:17 +0100)
commitf7ec1d2184a77a3e91448ade5732796e41db3785
tree3802ee031e5774d7c4b3efa725514affc52edb64
parent8f1490994d19a7fda0998e1ad4092b09219c7f54
i2c: omap: fix draining irq handling

Commit bab46b79b19e51c47bcae0acdad6c5769e300757 (i2c: omap: sanitize
exit path) changed the interrupt handler to exit early and complete
the transfer after the draining IRQ is handled. As a result, the ARDY
may not be cleared properly, and it may cause all future I2C transfers
to timeout with "timeout waiting for bus ready". This is reproducible
at least with N900 when twl4030_gpio makes a long write (> FIFO size)
during the probe (http://marc.info/?l=linux-omap&m=135818882610432&w=2).

The fix is to continue until we get ARDY interrupt that completes the
transfer. Tested with 3.8-rc4 + N900: 20 boots in a row without errors;
without the patch the problem triggers after few reboots.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-omap.c