ENUM BUS_NOTIFIER_EVENT(9)
π enum bus_notifier_event(9) β the kernel API manual, but make it make sense
okay so bestie, welcome to the enum bus_notifier_event page from the Kernel API Manual. This is literally the list of "what just happened on this bus" events, and if you're writing a bus notifier callback you NEED to know these. no cap. πβ¨
π¦ NAME π¦
enum bus_notifier_event β the Bus Notifier events that have happened. that's it, that's the whole thing, and honestly? iconic. π
πΈ SYNOPSIS πΈ
okay so here's the enum in all its glory, copy it exactly, don't get creative:
enum bus_notifier_event {
BUS_NOTIFY_ADD_DEVICE ,
BUS_NOTIFY_DEL_DEVICE ,
BUS_NOTIFY_REMOVED_DEVICE ,
BUS_NOTIFY_BIND_DRIVER ,
BUS_NOTIFY_BOUND_DRIVER ,
BUS_NOTIFY_UNBIND_DRIVER ,
BUS_NOTIFY_UNBOUND_DRIVER ,
BUS_NOTIFY_DRIVER_NOT_BOUND
};
π Constants π
these are the constants, bestie, and every single one matters β they're your vibe check for what's going down on the bus π
BUS_NOTIFY_ADD_DEVICEβ a device is added to this bus. slay, new device incoming π«ΆBUS_NOTIFY_DEL_DEVICEβ a device is about to be removed from this bus. heads up, it's giving "last warning" energy πBUS_NOTIFY_REMOVED_DEVICEβ a device is successfully removed from this bus. bye bestie, it's done β¨BUS_NOTIFY_BIND_DRIVERβ a driver is about to be bound to this device on this bus. the anticipation πBUS_NOTIFY_BOUND_DRIVERβ a driver is successfully bound to this device on this bus. we love a happy ending πBUS_NOTIFY_UNBIND_DRIVERβ a driver is about to be unbound from this device on this bus. breakup era, pre-emptively π₯BUS_NOTIFY_UNBOUND_DRIVERβ a driver is successfully unbound from this device on this bus. breakup complete, moving on πBUS_NOTIFY_DRIVER_NOT_BOUNDβ a driver failed to be bound to this device on this bus. it's giving flop, but like, technically π
π Description π
so here's the tea: these are the values passed to a bus notifier when a specific event happens. that's the whole point of the enum, okay? π
πΈ important warning, do not skip this: note that bus notifiers are likely to be called with the device lock already held by the driver core. so be careful in any notifier callback as to what you do with the device structure. fr fr, don't go wild in there or you'll deadlock your whole vibe. π
and also: all bus notifiers are called with the target struct device * as an argument. every single one. no exceptions. π
β SEE ALSO β
go read these next, bestie, they're all in the kernel file ./include/linux/device/bus.h and they're all related:
struct bus_type(9)bus_find_device_by_name(9)bus_find_device_by_of_node(9)bus_find_device_by_fwnode(9)bus_find_device_by_devt(9)bus_find_next_device(9)bus_find_device_by_acpi_dev(9)
mwah π that's the page. sourced from ./include/linux/device, dated October 2026, and this manual page is literally called enum bus_notifier_event(9). go forth and notify your buses responsibly, bestie π¦π
π¦ 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