i2c: imx-lpi2c: check only for enabled interrupt flags
stable inclusion from stable-v5.10.177 commit a3ada13f20fd018fce7b5867e9805ee69ee01b83 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3ada13f20fd018fce7b5867e9805ee69ee01b83 -------------------------------- [ Upstream commit 1c788500 ] When reading from I2C, the Tx watermark is set to 0. Unfortunately the TDF (transmit data flag) is enabled when Tx FIFO entries is equal or less than watermark. So it is set in every case, hence the reset default of 1. This results in the MSR_RDF _and_ MSR_TDF flags to be set thus trying to send Tx data on a read message. Mask the IRQ status to filter for wanted flags only. Fixes: a55fa9d0 ("i2c: imx-lpi2c: add low power i2c bus driver") Signed-off-by:Alexander Stein <alexander.stein@ew.tq-group.com> Tested-by:
Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by:
Wolfram Sang <wsa@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com> (cherry picked from commit 48cc8d32)
Loading
Please sign in to comment