Re: [PATCH V2] at24: use timeout also for read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Nov 2009 10:37:56 +0100, Wolfram Sang wrote:
> Writes may take some time on EEPROMs, so for consecutive writes, we already
> have a loop waiting for the EEPROM to become ready. Use such a loop for reads,
> too, in case somebody wants to immediately read after a write. Detailed bug
> report and test case can be found here:
> 
> http://article.gmane.org/gmane.linux.drivers.i2c/4660
> 
> Reported-by: Aleksandar Ivanov <ivanov.aleks@xxxxxxxxx>
> Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx>
> Tested-by: Aleksandar Ivanov <ivanov.aleks@xxxxxxxxx>
> Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
> Cc: Jean Delvare <khali@xxxxxxxxxxxx>
> ---
> 
> I could reproduce the errornous behaviour and this patch fixes it for me.
> 
> Jean, you can use this version or modify V1 yourself. Whatever is faster/easier
> for you.
> 
> Changes since V1:
> 
> - Use return value from i2c_smbus_read_i2c_block_data() directly as it returns the
>   number of bytes transferred.
> 
>  drivers/misc/eeprom/at24.c |   76 ++++++++++++++++++++++++++------------------
>  1 files changed, 45 insertions(+), 31 deletions(-)

Thanks. Patch applied, I'll prepare a pull request for Linus later
today.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux