include/linux/wmi.h
Source file repositories/reference/linux-study-clean/include/linux/wmi.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/wmi.h- Extension
.h- Size
- 5009 bytes
- Lines
- 151
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler_attributes.hlinux/device.hlinux/acpi.hlinux/mod_devicetable.hlinux/types.h
Detected Declarations
struct wmi_devicestruct wmi_bufferstruct wmi_stringstruct wmi_driver
Annotated Snippet
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);
};
/**
* to_wmi_driver() - Helper macro to cast a driver to a wmi_driver
* @drv: driver struct
*
* Cast a struct device_driver to a struct wmi_driver.
*/
#define to_wmi_driver(drv) container_of_const(drv, struct wmi_driver, driver)
int __must_check __wmi_driver_register(struct wmi_driver *driver, struct module *owner);
void wmi_driver_unregister(struct wmi_driver *driver);
/**
* wmi_driver_register() - Helper macro to register a WMI driver
* @driver: wmi_driver struct
*
* Helper macro for registering a WMI driver. It automatically passes
* THIS_MODULE to the underlying function.
*/
#define wmi_driver_register(driver) __wmi_driver_register((driver), THIS_MODULE)
/**
* module_wmi_driver() - Helper macro to register/unregister a WMI driver
* @__wmi_driver: wmi_driver struct
*
* Helper macro for WMI drivers which do not do anything special in module
* init/exit. This eliminates a lot of boilerplate. Each module may only
* use this macro once, and calling it replaces module_init() and module_exit().
*/
#define module_wmi_driver(__wmi_driver) \
module_driver(__wmi_driver, wmi_driver_register, \
wmi_driver_unregister)
#endif
Annotation
- Immediate include surface: `linux/compiler_attributes.h`, `linux/device.h`, `linux/acpi.h`, `linux/mod_devicetable.h`, `linux/types.h`.
- Detected declarations: `struct wmi_device`, `struct wmi_buffer`, `struct wmi_string`, `struct wmi_driver`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.