IIC_GPIOMUX(4)

πŸ’– IIC_GPIOMUX β€” bestie's guide to the GPIO-controlled I2C mux driver πŸ’–

okay so. sit down, grab a boba, because we're about to talk about iic_gpiomux β€” that's the driver for I2C mux hardware controlled via GPIO ✨ this page lives in section 4 of the Kernel Interfaces Manual and honestly? she's iconic.


🌸 NAME 🌸

iic_gpiomux β€” literally the driver for I2C mux hardware that gets controlled via GPIO πŸ’…


✨ SYNOPSIS ✨

So there's two ways to get this girl into your life, bestie. pick your fighter:

Option A β€” bake her into the kernel. drop this line into your kernel configuration file:

device iic_gpiomux

Option B β€” load her as a module at boot time. then you go put this line in loader.conf(5):

iic_gpiomux_load="YES"

both are valid, both slay, choose based on your vibe 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the iic_gpiomux driver supports any type of I2C bus multiplexer (mux for short, we're casual like that) hardware that's controlled by manipulating the state of one or more GPIO pins. yes, one pin, several pins, whatever β€” she handles it.

The way that she automatically connects an upstream I2C bus to one of the downstream buses as needed when slave devices on the downstream buses initiate I/O? that's main character energy fr fr. no manual switching required, she just knows. πŸ’«

want the full tea on how that automatic switching behavior works? it's all in iicmux(4) β€” go read it, iykyk πŸ“–

🌈 FDT CONFIGURATION 🌈

On an fdt(4) based system, an iic_gpiomux device node can be defined as a child node of any arbitrary bus in the FDT data. like, any bus. she's flexible, she contains multitudes πŸ’œ

  • the i2c-parent property β€” this is the one that indicates the connection to the upstream I2C bus
  • the children of the iic_gpiomux node β€” these are additional i2c buses, and those buses get their own i2c slave devices described in their child nodes. yes it's turtles all the way down, that's just how FDT works bestie 🐒

also, important: the iic_gpiomux driver conforms to the standard i2c/i2c-mux-gpio.txt bindings document. so if you know that doc, you already know her. ⭐


πŸ‘€ SEE ALSO πŸ‘€


πŸ“œ HISTORY πŸ“œ

The iic_gpiomux driver first appeared in FreeBSD 13.0. a queen was born πŸ‘‘


and that's the whole page, bestie πŸ’– this one came from the Debian crew, dated January 1, 2020 β€” so go forth, mux responsibly, and remember: she switches buses so you don't have to πŸŽ€βœ¨

πŸ“¦ where this page comes from