From ddc8f52202efdb80142cdac865c922b57585c8ee Mon Sep 17 00:00:00 2001 From: Nicholas Chin Date: Wed, 12 Feb 2020 15:07:54 -0500 Subject: [PATCH] drivers/eeprom/i2c_xx24xx.c: increase number of retries in ee24xx_waitwritecomplete --- drivers/eeprom/i2c_xx24xx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/eeprom/i2c_xx24xx.c b/drivers/eeprom/i2c_xx24xx.c index d4f49ada2a..6e46461a81 100644 --- a/drivers/eeprom/i2c_xx24xx.c +++ b/drivers/eeprom/i2c_xx24xx.c @@ -240,11 +240,6 @@ static const struct file_operations at24cs_uuid_fops = * * Use ACK polling to detect the completion of the write operation. * Returns TRUE if write is complete (device replies to ACK). - * Note: The device always replies an ACK for the control byte, the polling - * shall be done using the ACK for the memory address byte. Read or write does - * not matter. - * Note: We should sleep a bit between retries, the write time is around 5 ms, - * but the bus is slow, so, a few retries at most will happen. * ****************************************************************************/ @@ -253,7 +248,7 @@ static int ee24xx_waitwritecomplete(FAR struct ee24xx_dev_s *eedev, { struct i2c_msg_s msgs[1]; int ret; - int retries = 100; + int retries = 500; uint8_t adr; uint32_t addr_hi = (memaddr >> (eedev->addrlen << 3));