i2c: i2c-bfin-twi: Break dead waiting loop if i2c device misbehaves.
authorSonic Zhang <sonic.zhang@analog.com>
Wed, 13 Jun 2012 08:22:42 +0000 (16:22 +0800)
committerWolfram Sang <w.sang@pengutronix.de>
Fri, 13 Jul 2012 06:27:31 +0000 (08:27 +0200)
commita25733d6f6968240042ac94dc93c7ae3c9e8d68b
tree3db858d155f0cd052613d963f2f96102c1470c6e
parenta20a64d226be36808b24d2205b5d35e80c49e8be
i2c: i2c-bfin-twi: Break dead waiting loop if i2c device misbehaves.

Some fault i2c device may hold the sda/scl line and cause i2c driver
wait in the BUS busy loop. The I2C framework already retry the
transfer loop before timeout. Return -EAGAIN instead of pull BUSBUSY
in the other loop.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-bfin-twi.c