I2C Slave questions on i.MX7 board
First this is not a Pi, it's a different SBC (i.MX7).
I've been assigned an interesting task, I need to do I2C Multi-Master where we're transferring a status request and commands between two I2C master. I've not worked with I2C so I don't know how to proceed.
I've been doing a lot of searching and I've found that a device can be an I2C master and a slave (good). The problem I have is that if my daemon (master A) is running I need to use the i2c-x device to be the master and that's okay. I can send a request (write to the slave B). But in order for the other master (B) to send updates randomly to the daemon I need to have the daemon controller (A) also be a slave. But the slave device, like the eeprom sample from the 2015 I2C slave device, is in the sysfs. That makes coding in the daemon a bit messy as I don't get a software interrupt (there is no change on file change). Is there some other way to get the data from the I2C subsystems?
Device A = Master A and Slave A
Device B = Master B and Slave B
Master A issues commands (I2C Write) -> Slave B (Device B)
Master B issues updates (I2C Write) -> Slave A (Device A)
And I have given consideration of having my daemon poll the other master for the status. I just want to cover my bases.
Master A issues commands (I2C Write) -> Slave B
Master A issues poll for status (I2C Read) <- Slave B
Any comments or suggest?
|