- Edited
Making some headway with Zephyr, but I’ve run up against something I don’t quite understand. I’m adding an I2C multiplexer (TCA9548) to my board to switch between a few of the same sensor. I see the device binding for this component already exists (yay?) but I don’t see a driver for it anywhere. I can talk to it just using the I2C device successfully, but there is a problem. The drivers for my sensor exist, and when I add the sensor to my overlay, Zephyr tries to communicate with it during initialization - however, since the mux isn’t in the overlay (since there is no driver) none of the sensor channels are open (it hasn’t been initialized yet) so they aren’t initialized and they aren’t found later when I try to use them.
This seems to leave me with two possible routes. The first is just to take the sensor out of the overlay and use it as a raw I2C device, writing my own driver for it. Not bad, but messy. The second is to figure out how to get the system to initialize the mux first so that the sensor(s) are found during initialization. Could anyone give me some advice for getting this going?
There is a chance that there is already some way to do this since the device binding exists and I just don’t understand what I should be looking for.