Gentlemen, We are trying to use i2c tools for Linux for our application and encountered a problem: Read and write of Microchip 24AA256 device, which is used as our fan tray EEPROM, requires sequences of i2c operations which seem to be not fully supported by current i2c-dev driver of Linux kernel. To read a byte from 24AA256 one has to perform: ( -> from master to slave; <- from slave to master) -> START -> Control Byte (1010 0000) <- ack -> Address High Byte <- ack -> Address Low Byte <- ack -> START -> Control Byte (1010 0001) <- ack -> Dummy byte <- Data byte <- NO ack -> STOP To write a byte to 24AA256: -> START -> Control Byte (1010 0010) <- ack -> Address High Byte <- ack ->Address Low Byte <- ack <<<---------- no -> START <<------- -> Data byte <- ack -> STOP Macros provided in i2c-dev.h do not give us ability to write 2-byte address for both read and write single byte data. It also does not give us ability to avoid START in write operation. We found a work-around for read by doing a small trick: A. Perform a Byte write to the EEPROM: - Slave address is the EEPROM address, Write address is the high 7 bits of the address, Data is the low 7 bits of the address. B. Perform a Byte read from the EEPROM: - Slave address is the EEPROM address We do not have a trick to avoid START in a write operation. Can you suggest anything as a work-around? Vladimir Cherednichenko Sr. Software Engineer CloudShield Technologies, Inc. 212 Gibraltar Drive Sunnyvale, CA 94089 vcherednichenko at cloudshield.com. 408 331 6692 direct -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20090202/5b31c997/attachment.html