The current wait time of 1 ms is apparently too short in some circumstances leading to following error when communicating with a KSZ switch with 100 kHz from an i.MX8MN I2C controller: ERROR: ksz9477-i2c ksz85630: error detecting KSZ9477: I/O error Increasing the poll time to 5ms resolved this issue: ksz9477-i2c ksz85630: Found KSZ9893 ksz9477-i2c ksz85630: chip id: 0x00989360 Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- 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 c0af446bcc25..28bd0072addf 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -201,7 +201,7 @@ static int i2c_fsl_trx_complete(struct i2c_adapter *adapter) static int i2c_fsl_acked(struct i2c_adapter *adapter) { - return i2c_fsl_poll_status(adapter, 1, 0, I2SR_RXAK); + return i2c_fsl_poll_status(adapter, 5, 0, I2SR_RXAK); } static int i2c_fsl_start(struct i2c_adapter *adapter) -- 2.30.2