STRUCT WMI_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct wmi_driver(9) πŸ’–

okay bestie, welcome to the struct wmi_driver(9) page from the Kernel API Manual β€” this is the whole entire vibe of what a WMI driver looks like in the kernel, and honestly? it's giving "backbone of the operation" energy. no cap. 🌈


✨ NAME ✨

struct wmi_driver β€” the WMI driver structure itself, the main character πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct wmi_driver {
    struct device_driver driver;
    const struct wmi_device_id *id_table;
    size_t min_event_size;
    bool no_singleton;
    int (*probe)(struct wmi_device *wdev, const void *context);
    void (*remove)(struct wmi_device *wdev);
    void (*shutdown)(struct wmi_device *wdev);
    void (*notify)(struct wmi_device *device, union acpi_object *data);
    void (*notify_new)(struct wmi_device *device, const struct wmi_buffer *data);
 };

like, look at her. so structured. so composed. she ate. πŸ”₯


πŸŽ€ Members πŸŽ€

  • driver β€” the driver model structure. lowkey the foundation of the whole thing, the scaffolding, the bones, iykyk. 🫢
  • id_table β€” the list of WMI GUIDs this driver supports, aka her little roster of faves she's willing to work with ✨
  • min_event_size β€” the minimum event payload size this driver can handle β€” think of it as her boundary, and honestly? respect it πŸ’…
  • no_singleton β€” lets you know the driver can be instantiated multiple times. yes bestie, she can be in multiple group chats at once 😭
  • probe β€” the callback for device binding. this is the "omg hi, we're doing this" moment 🫢
  • remove β€” the callback for device unbinding. the "it's not you, it's the kernel" moment πŸ’€
  • shutdown β€” the callback for device shutdown. the graceful goodbye, the poetic exit πŸ¦‹
  • notify β€” the callback for receiving WMI events. deprecated, so like... she's iconic but she's retired, pls use notify_new πŸ™ˆ
  • notify_new β€” the callback for receiving WMI events. the current fave, the upgrade, the glow-up πŸ‘‘

πŸ’œ Description πŸ’œ

so this struct represents WMI drivers that handle WMI devices β€” that's the whole point of her, periodt.

here's the tea you actually need to know: the data inside the buffer passed to the notify_new callback is guaranteed to be aligned on a 8-byte boundary. yes fr fr, alignment is handled, you don't gotta worry about it.

the minimum supported size for said buffer can be specified using min_event_size β€” set your floor, bestie, know your worth.

and for the WMI drivers that are still using the deprecated notify callback: they can still set min_event_size to 0 to signal that they support WMI events that provide no event data. zero means "empty is fine", no shame in it 🫢


🌸 SEE ALSO 🌸

like a whole little friend group of related man pages. go say hi to all of them πŸ’–


reminder bestie: notify is deprecated. i'm not being dramatic, the page says it, so it's real. use notify_new and set your min_event_size accordingly πŸ’…

⭐ cute little sign-off: this page lives in ./include/linux, dated October 2026, and comes to you as part of the Kernel API Manual β€” struct wmi_driver(9), forever iconic, mwah πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from