ENGR00328312 i2c: imx: Optimize the i2c device recovery solution
authorYe Li <ye.li@nxp.com>
Fri, 23 Mar 2018 03:59:35 +0000 (20:59 -0700)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 11:28:22 +0000 (04:28 -0700)
commit8353e27b8e9022623618afc77919c74b606f0ccb
tree9e71c6b40158e053b6a3e3cffd6bdff8dfc5c489
parente8f813a6b66961759916e65b8c18ec43fd36a7c3
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>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6220bb6fb43aa485a10f96fb6ade864b3371e4ca)
arch/arm/mach-imx/i2c-mxv7.c