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>
Wed, 28 Apr 2021 20:49:33 +0000 (13:49 -0700)
commitc3c050e9b0e87f275f14d87b795ec9828cf85586
tree9e0a0f819f517b265ce27e79bdea291c20fb2c02
parent35d16e3abbfda7df73dd4bd4859fa6b5c01c0844
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)
(cherry picked from commit 8353e27b8e9022623618afc77919c74b606f0ccb)
(cherry picked from commit 8c14a4352d2b75b5ea2fdd3e504789eeea0acd51)
arch/arm/mach-imx/i2c-mxv7.c