]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: imx: Don't generate STOP condition if arbitration has been lost
authorChristian Eggers <ceggers@arri.de>
Fri, 9 Oct 2020 11:03:20 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Dec 2020 12:22:07 +0000 (13:22 +0100)
commitda4d792e74cecbee9c2e6f1a2db3dfd6849f6d45
tree51deb1925cbda7bbf394abbfa0f24eab6900d52c
parente385ea09b2e801cef1509e06bc691597aac80a99
i2c: imx: Don't generate STOP condition if arbitration has been lost

commit 61e6fe59ede155881a622f5901551b1cc8748f6a upstream.

If arbitration is lost, the master automatically changes to slave mode.
I2SR_IBB may or may not be reset by hardware. Raising a STOP condition
by resetting I2CR_MSTA has no effect and will not clear I2SR_IBB.

So calling i2c_imx_bus_busy() is not required and would busy-wait until
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 # Requires trivial backporting, simple remove
                           # the 3rd argument from the calls to
                           # i2c_imx_bus_busy().
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-imx.c