Article 4ZE80 I2C Slave questions on i.MX7 board

I2C Slave questions on i.MX7 board

by
ncherry
from LinuxQuestions.org on (#4ZE80)
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?latest?d=yIl2AUoC8zA latest?i=Q-oMfMtU2Yo:6Xt0wyhQfwM:F7zBnMy latest?i=Q-oMfMtU2Yo:6Xt0wyhQfwM:V_sGLiP latest?d=qj6IDK7rITs latest?i=Q-oMfMtU2Yo:6Xt0wyhQfwM:gIN9vFwQ-oMfMtU2Yo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments