[PATCH] i2c: imx_lpi2c: Fix MSR status check issue in STOP
Peng Fan
peng.fan at oss.nxp.com
Sat May 9 05:51:22 CEST 2026
On Tue, Apr 28, 2026 at 04:53:12PM +0800, Ye Li wrote:
>In bus_i2c_stop, the MSR SDF is checked in a loop after stop command
>is sent. Meanwhile, some error status in MSR is also checked by
>imx_lpci2c_check_clear_error. But the imx_lpci2c_check_clear_error
>will clear the MSR.
>
>It causes problem in below situation:
>In current loop, SDF does not set, but error status is found by
>imx_lpci2c_check_clear_error (for example, NDF), then NDF will be cleared
>and result has NDF error. However, because SDF does not set in this loop,
>it goes not next loop. When SDF is set in next loop,
>imx_lpci2c_check_clear_error is re-executed, but as the MSR is cleared,
>the result is 0. Then the stop return 0. But it should return NDF error.
>
>Signed-off-by: Ye Li <ye.li at nxp.com>
Reviewed-by: Peng Fan <peng.fan at nxp.com>
More information about the U-Boot
mailing list