I have the following simplified schematic for my system.
GPIO4+-----------------------------+ | GPIO3 | | +------------------------+ | | | GPIO2 | | | | +-------------------+ | | | | | GPIO1 | | | | | | +--------------+ | | | | | | | | | | |+-+--+--+--+-+ | | | |I2C1 +-------------+ | | | | | | | ++-+-+-++I2C2 +-------------+ | I2C | | | SWITCH +-----------+ CPU |I2C3 +-------------+ | | | | | +-------+I2C4 +-------------+ |+------------+
What is the best way to implement/configure this in Linux and why? Is it possible to somehow just configure this in the device tree exporting 4 i2c devices in the user-space and whenever someone wants to write/read to one of those 4 i2c buses the corresponding GPIO is asserted?
Is it only possible to be implemented in a kernel module/driver?