ENUM BUS_NOTIFIER_EVENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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