i3c_master_bus_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ i3c_master_bus_init(9) β€” the Kernel API Manual glow-up

okay bestie, so this is a page straight outta the Kernel API Manual and it's literally about waking up an I3C bus ✨ no cap, this is the "hey everyone, we're doing this now" moment for your bus.


🌸 NAME

i3c_master_bus_init β€” initialize an I3C bus πŸŽ€


πŸ¦‹ SYNOPSIS

int i3c_master_bus_init (struct i3c_master_controller *master );

✨ ARGUMENTS

  • master β€” the main master that's out here initializing the bus πŸ‘‘ like she's the one in charge (because she is, periodt)

πŸ’… DESCRIPTION

So this function is following all the initialization steps described in the I3C specification, like a good little overachiever πŸŽ“ β€” and there's six of them, so buckle up:

  1. Attach I2C devs to the master so that the master can fill its internal device table appropriately πŸ“‹ (gotta know who's at the party before you start handing out name tags, fr fr)
  2. Call i3c_master_controller_ops->bus_init method to initialize the master controller. That's usually where the bus mode is selected β€” either pure bus or mixed fast/slow bus 🚦 that's the vibe check for the whole bus, iykyk
  3. Instruct all devices on the bus to drop their dynamic address ⚠️ this is particularly important when the bus was previously configured by someone else (for example the bootloader), because you do NOT want to inherit somebody else's whole situation, no thank you πŸ’€
  4. Disable all slave events πŸ™ˆ turning off the notifications so nothing's pinging you mid-setup
  5. Reserve address slots for I3C devices with init_dyn_addr 🎟️ and if devices also have static_addr, try to pre-assign dynamic addresses requested by the FW with SETDASA and attach corresponding statically defined I3C devices to the master β€” highkey a whole little matchmaking operation going on here πŸ’–
  6. Do a DAA (Dynamic Address Assignment) to assign dynamic addresses to all remaining I3C devices πŸŽ‰ the leftovers get their glow-up too, everyone eats

Once this is done, all I3C and I2C devices should be usable 🫢 like, actually functional. iconic behavior honestly.


🌈 RETURN

A 0 in case of success, a negative error code otherwise 😭 (so if it's not 0, something went sideways, bestie β€” go check)


🧚 SEE ALSO

Kernel file ./drivers/i3c/master.c β€” and literally the whole friend group:


and that's the whole page, bestie πŸ’…βœ¨ this one came from ./drivers/i3c, dated October 2026, and it's stamped i3c_master_bus_init(9) in the corner β€” go forth and initialize your buses responsibly πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from