ENGR00328312 i2c: imx: Optimize the i2c device recovery solution
authorFugang Duan <b38611@freescale.com>
Mon, 11 Aug 2014 07:14:50 +0000 (15:14 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 5 Apr 2017 06:04:34 +0000 (14:04 +0800)
commitfda6c6cc3c0d9ff204117bdcb81563714407c129
tree50a36befe815f0ee4f5ea0581297116c24752729
parent4a8d0e3050bba8a835749814f7a0c608877bf64d
ENGR00328312 i2c: imx: Optimize the i2c device recovery solution

From i2c spec, if device pull down the SDA line that causes
i2c bus dead, host can send out 9 clock to let device release
SDA.

But for some special device like pfuze100, it pull down SDA line
and the solution cannot take effort.

The patch just add NACK and STOP signal after 8 dummy clock, and pmic
can release SDA line after the recovery. Test case catch 375 times of
i2c hang, and all are recovered.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 53118db42d201d36ca9067b4bb0e2702399e100b)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit b8dcb812401026cb2189b24a4f6058830151c85a)
(cherry picked from commit c5a44a2a0b2218221cb12645b10f0b34ecc6f79b)
arch/arm/imx-common/i2c-mxv7.c