bus_add_device(9)
π bus_add_device(9) β the Kernel API Manual page you've been waiting for
okay so this is a page straight out of the Kernel API Manual, and it's literally about introducing a device to its bus. like, matchmaking but for kernel objects. slay.
β¨ NAME β¨
bus_add_device β bestie's whole job is just add device to bus. that's it. that's the vibe. π
πΈ SYNOPSIS πΈ
int bus_add_device (struct device *dev );
yep, she returns an int. the signature is exactly that, spaces and all β don't @ me, just copy it verbatim. π
π¦ ARGUMENTS π¦
devβ the device being added. that's the one. the main character. the device we're rolling out the pink carpet for. π
π₯ DESCRIPTION π₯
so when you call this, three (3) things happen, and honestly each one eats:
- π«Ά Add device's bus attributes. β the device gets its bus attributes attached, and they're giving "getting ready with my girls" energy.
- π Create links to device's bus. β we spin up links pointing back to the device's bus. it's the situationship made official step, no cap.
- π Add the device to its bus's list of devices. β and finally the device gets appended to its bus's list of devices. officially on the roster. periodt. β¨
that's the whole description. three bullets, zero fluff, all iconic.
π SEE ALSO π
Kernel file ./drivers/base/bus.c β and here's the whole friend group, every single one, fr fr:
bus_to_subsys(9)bus_for_each_dev(9)bus_find_device(9)bus_for_each_drv(9)bus_probe_device(9)bus_remove_device(9)bus_add_driver(9)bus_remove_driver(9)bus_rescan_devices(9)device_reprobe(9)bus_register(9)bus_unregister(9)subsys_dev_iter_init(9)subsys_dev_iter_next(9)subsys_dev_iter_exit(9)subsys_system_register(9)subsys_virtual_register(9)driver_find(9)bus_get_dev_root(9)
go read them. iykyk. π§
π the cute sign-off π
file location is ./drivers/base, version/date stamp is October 2026, and that's the bus_add_device(9) page, wrapped. mwah. ππΈπ¦
π¦ 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