[PATCH 1/2] i2c: imx: Don't recover bus when arbitration lost
Daniel Scally
dan.scally at ideasonboard.com
Wed Mar 11 04:47:43 PDT 2026
The i2c-imx driver runs i2c_recover_bus() if i2c_imx_start() fails.
One of the failure modes is an arbitration-lost signal from the
hardware however, to which bus recovery is not the right response.
Do not try to recover the bus if it loses arbitration during start.
Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
---
drivers/i2c/busses/i2c-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 85f554044cf1eec7d28310c3d9e7a7346237afdb..ed2316ab1ba8b6261dabe8af4377136a002e2f0b 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1539,7 +1539,7 @@ static int i2c_imx_xfer_common(struct i2c_adapter *adapter,
/* Start I2C transfer */
result = i2c_imx_start(i2c_imx, atomic);
- if (result) {
+ if (result && result != -EAGAIN) {
/*
* Bus recovery uses gpiod_get_value_cansleep() which is not
* allowed within atomic context.
--
2.43.0
More information about the linux-arm-kernel
mailing list