Hi again Ilkka,
"ilkka.virtanen via lists.zephyrproject.org"
Thank you Marti for the reply.I'm glad; thanks!
As I learned that the device will be initialized before execution is in application code, I realize we will have a problem with the driver in our own product. Our own board will have a sht31 sensor but it is behind a TCA9548A I2C switch, which means a device tree configuration like this:Yes, you can, you just need to make sure the initialization priorities
are managed correctly so the init functions run in the following order:
i2c0 -> tca9548a -> sht3xd
You can control the initialization priorities with Kconfig options, but
the defaults should be OK for your use case.
See CONFIG_I2C_INIT_PRIORITY and CONFIG_SENSOR_INIT_PRIORITY
respectively for i2c0 and sht3xd.
If yes, to be able to use the available device drivers for the sensorsI recently reviewed a TCA9546A driver, which seems similar to your
If the differences are superficial you may be able to extend the driver
to support "TCA954xA", i.e. both devices.
You may wish to contact the driver author if you want to collaborate.