IIC_GPIOMUX(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… IIC_GPIOMUX(4) πŸ’…

okay so bestie, welcome to the Kernel Interfaces Manual β€” yes, that's the fancy section name, and yes, this page is a whole vibe. sit down, grab a lil snack πŸ“, and let's talk about iic_gpiomux.


🌸 NAME 🌸

iic_gpiomux β€” the driver for I2C mux hardware that's controlled via GPIO. that's it, that's the whole name, she's straightforward and we respect her for it ✨


πŸŽ€ SYNOPSIS πŸŽ€

so if you want this driver compiled into the kernel, you literally just drop this line into your kernel configuration file:

device iic_gpiomux

orrr, if you'd rather load it as a module at boot time (main character energy, very flexible), you put this line into loader.conf(5):

iic_gpiomux_load="YES"

no cap, that's genuinely all it takes 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” the iic_gpiomux driver supports any type of I2C bus multiplexer (mux) hardware. literally any. as long as it's the kind that gets controlled by manipulating the state of one or more GPIO pins, she's got you πŸ’…

and the way she works? it's giving magical. she automatically connects an upstream I2C bus to one of the downstream buses as needed β€” like, whenever slave devices on those downstream buses initiate I/O, she just handles the switch. no manual intervention, no drama πŸ”₯

if you wanna know more about that automatic switching behavior, bestie, the info lives in iicmux(4) β€” go read that one too, iykyk πŸ‘‘

🌈 FDT CONFIGURATION 🌈

on an fdt(4)-based system, you can define an iic_gpiomux device node as a child node of any arbitrary bus in the FDT data. iconic, honestly.

the i2c-parent property is the one that indicates the connection to the upstream I2C bus ⭐

and then the children of the iic_gpiomux node? those are additional i2c buses πŸ¦‹ β€” and each of those gets its own i2c slave devices described in their child nodes. it's like nested friend groups, everyone's got their own people, and it all just works πŸ’–

also, 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 whole deal. slay.


✨ SEE ALSO ✨

go check 'em out, they're part of the lore πŸ“š


🌸 HISTORY 🌸

the iic_gpiomux driver first appeared in FreeBSD 13.0 β€” our queen has been around since 13.0 and she's still serving πŸ’œ


and that's the page, bestie!! πŸŽ€ this lil writeup came from the Debian side of things, dated January 1, 2020 β€” happy reading, and remember: automatic mux switching is a love language πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from