STRUCT WMI_DRIVER(9)
π 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 usenotify_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 πΈ
- kernel file
./include/linux/wmi.h struct wmi_device(9)to_wmi_device(9)struct wmi_buffer(9)struct wmi_string(9)to_wmi_driver(9)wmi_driver_register(9)module_wmi_driver(9)
like a whole little friend group of related man pages. go say hi to all of them π
reminder bestie:notifyis deprecated. i'm not being dramatic, the page says it, so it's real. usenotify_newand set yourmin_event_sizeaccordingly π
β 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
- 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