Hi !
I dont know.... or i'm not really sure if the i2c acces is threadsafe
Heres my problem:
process 1:
ioctl(fd, I2C_SLAVE, DEVICE_1_ADDR)
...
byte = i2c_smbus_read_byte_data(fd, reg);
at the same time:
process 2:
ioctl(fd, I2C_SLAVE, DEVICE_2_ADDR)
...
byte = i2c_smbus_read_byte_data(fd, reg);
What if process 2 is running after the ioctl which sets the slave adress of process 1?
When this is safe, because of different fd's (perhaps i dont know) , what if this are two threads with the same fd ?
Should i protect i2c acces with semaphores or mutexes ?
I want to make *REALLY* sure that i can have multiple threads and processes accessing multiple slave devices
at the same time.
I don't know how the i2c access is implementet in the kernel.
Can anybody tell me please something about it or point to some docs/links ?
mfg Marco Oklitz