ADD I2C CLIENT "Motion Sensor"

hello,

i’m working on an STmicro acclereometer linux driver. the communication with the sensor is via I2C bus and the platform is arm9 based on linux kernel 2.6 . when i try to read a register or write on it there is a i2c timeout error .

how can i handle that error ?

I think you may have to ask the linux driver guys about how to handle device errors on linux. Not completely sure about this, but I think you can ask in the linux-kernel mailing list. There’s also a specific linux driver mailing list IIRC.

If you didn’t really expect the i2c timeout error, I think there’s probably something wrong with your i2c code or your hardware. Having a look with an oscilloscope on the i2c SDA/SCL lines should help a lot.

Is your hardware OK, like are there any pull-ups on the SDA/SCL lines?

Is the communication speed correct (e.g. not too fast for the device)?

Did you specify the proper i2c address? There can be some confusion about this because it is not always clear from the data sheet of an i2c device if read/write bit is considered to be part of the address or not.