-
Hello, I want to use the TCA9548A I2C mux on my board, and mux several devices which I prepared my own drivers for. These drivers do the regular I2C calls RDs and WRs using the devices I2C slave address.
My issue here is that I don't want to generate the transaction to the endpoint devices through the mux driver, but through my drivers. My question is why the mux driver API does not contain the ability to simply change mux channel without sending message to the device (Just step 1 from the two above)? I want to address my devices using the drivers I made without them to be aware if the device is being accessed by mux with other devices or not. I understand that this means that I'll have to be responsible for ensuring the right mux channel before sending transaction toward it, but it worth the generalization of the drivers. Thanks for the help, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello, Based on #39589 the idea is to abstract mux usage from the underlying drivers.
That way devices don't care if they are operated with or without the mux. The abstraction of the device and mux looks reasonable for most use cases. If there is a need and a use case to have a driver that controls the mux and underlying devices, then PRs are always welcomed. |
Beta Was this translation helpful? Give feedback.
-
Hey @GeorgeCGV, Based on the provided DTS node example, can we directly access the sensor API to examine the TMP116 device? Currently, it appears that our only option is to utilize the i2c_reg_read_byte/i2c_reg_write_byte functions and pass the desired channel as the device pointer (as mentioned in #49046 ). Best regards |
Beta Was this translation helpful? Give feedback.
-
Hey @GeorgeCGV, Would you be able to provide some assistance with this? |
Beta Was this translation helpful? Give feedback.
Hello,
Based on #39589 the idea is to abstract mux usage from the underlying drivers.
I assume it shall work with custom drivers as long as they are plain I2C device drivers.