i3c_master_bus_init(9)
π 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:
- 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)
- Call
i3c_master_controller_ops->bus_initmethod 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 - 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 π
- Disable all slave events π turning off the notifications so nothing's pinging you mid-setup
- Reserve address slots for I3C devices with
init_dyn_addrποΈ and if devices also havestatic_addr, try to pre-assign dynamic addresses requested by the FW withSETDASAand attach corresponding statically defined I3C devices to the master β highkey a whole little matchmaking operation going on here π - 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:
i3c_bus_maintenance_lock(9)i3c_bus_maintenance_unlock(9)i3c_bus_normaluse_lock(9)i3c_bus_normaluse_unlock(9)i3c_master_queue_hotjoin(9)i3c_master_send_ccc_cmd_locked(9)i3c_master_get_free_addr(9)i3c_master_setaasa_locked(9)i3c_master_entdaa_locked(9)i3c_master_enec_disec_locked(9)i3c_master_disec_locked(9)i3c_master_enec_locked(9)i3c_master_defslvs_locked(9)i3c_master_reattach_i3c_dev_locked(9)i3c_master_has_wakeup_enabled_devs(9)i3c_master_dma_map_single(9)i3c_master_dma_unmap_single(9)i3c_master_set_info(9)__i3c_master_add_i3c_dev_locked(9)i3c_master_add_i3c_dev_locked(9)i3c_master_do_daa_ext(9)i3c_master_do_daa(9)i3c_master_queue_ibi(9)i3c_generic_ibi_free_pool(9)i3c_generic_ibi_alloc_pool(9)i3c_generic_ibi_get_free_slot(9)i3c_generic_ibi_recycle_slot(9)i3c_master_register(9)i3c_master_unregister(9)i3c_dev_disable_ibi_locked(9)i3c_dev_enable_ibi_locked(9)i3c_dev_request_ibi_locked(9)i3c_dev_free_ibi_locked(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms