* [PATCH master] i2c: imx: increase timeout in i2c_fsl_poll_status from 1 to 5ms
@ 2023-01-10 8:52 Ahmad Fatoum
2023-01-10 14:33 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-01-10 8:52 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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@pengutronix.de>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH master] i2c: imx: increase timeout in i2c_fsl_poll_status from 1 to 5ms
2023-01-10 8:52 [PATCH master] i2c: imx: increase timeout in i2c_fsl_poll_status from 1 to 5ms Ahmad Fatoum
@ 2023-01-10 14:33 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-01-10 14:33 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, Jan 10, 2023 at 09:52:37AM +0100, Ahmad Fatoum wrote:
> 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@pengutronix.de>
> ---
> drivers/i2c/busses/i2c-imx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-10 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 8:52 [PATCH master] i2c: imx: increase timeout in i2c_fsl_poll_status from 1 to 5ms Ahmad Fatoum
2023-01-10 14:33 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox