i2c: imx: Check for I2SR_IAL after every byte
authorChristian Eggers <ceggers@arri.de>
Fri, 9 Oct 2020 11:03:19 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Dec 2020 12:39:05 +0000 (13:39 +0100)
commit9b77be65d82958ebbb7cfe60dbbda6165fe9b3f4
treeaa0980b94912ddc315b3574328aba0c3002cc243
parent693b198d476add6f9cae22907f11c90f5933f6d0
i2c: imx: Check for I2SR_IAL after every byte

commit 1de67a3dee7a279ebe4d892b359fe3696938ec15 upstream.

Arbitration Lost (IAL) can happen after every single byte transfer. If
arbitration is lost, the I2C hardware will autonomously switch from
master mode to slave. If a transfer is not aborted in this state,
consecutive transfers will not be executed by the hardware and will
timeout.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Tested (not extensively) on Vybrid VF500 (Toradex VF50):
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-imx.c