Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

Configuration of I2C bus over a switch in Linux

$
0
0

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?


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>