drivers/platform/x86/huawei-wmi.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/huawei-wmi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/huawei-wmi.c- Extension
.c- Size
- 20852 bytes
- Lines
- 905
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/debugfs.hlinux/delay.hlinux/dmi.hlinux/input.hlinux/input/sparse-keymap.hlinux/leds.hlinux/module.hlinux/mutex.hlinux/platform_device.hlinux/power_supply.hlinux/sysfs.hlinux/wmi.hacpi/battery.h
Detected Declarations
struct quirk_entrystruct huawei_wmi_debugstruct huawei_wmifunction dmi_matchedfunction huawei_wmi_callfunction parameterfunction huawei_wmi_micmute_led_setfunction huawei_wmi_leds_setupfunction huawei_wmi_battery_getfunction huawei_wmi_battery_setfunction charge_control_start_threshold_showfunction charge_control_end_threshold_showfunction charge_control_thresholds_showfunction charge_control_start_threshold_storefunction charge_control_end_threshold_storefunction charge_control_thresholds_storefunction huawei_wmi_battery_addfunction huawei_wmi_battery_removefunction huawei_wmi_battery_setupfunction huawei_wmi_battery_exitfunction huawei_wmi_fn_lock_getfunction huawei_wmi_fn_lock_setfunction fn_lock_state_showfunction fn_lock_state_storefunction huawei_wmi_fn_lock_setupfunction huawei_wmi_fn_lock_exitfunction huawei_wmi_debugfs_call_dumpfunction huawei_wmi_debugfs_call_showfunction huawei_wmi_debugfs_setupfunction huawei_wmi_debugfs_exitfunction huawei_wmi_process_keyfunction huawei_wmi_input_notifyfunction huawei_wmi_input_setupfunction huawei_wmi_input_exitfunction huawei_wmi_probefunction huawei_wmi_removefunction huawei_wmi_initfunction huawei_wmi_exitmodule init huawei_wmi_init
Annotated Snippet
module_init(huawei_wmi_init);
module_exit(huawei_wmi_exit);
MODULE_ALIAS("wmi:"HWMI_METHOD_GUID);
MODULE_DEVICE_TABLE(wmi, huawei_wmi_events_id_table);
MODULE_AUTHOR("Ayman Bagabas <ayman.bagabas@gmail.com>");
MODULE_DESCRIPTION("Huawei WMI laptop extras driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/debugfs.h`, `linux/delay.h`, `linux/dmi.h`, `linux/input.h`, `linux/input/sparse-keymap.h`, `linux/leds.h`, `linux/module.h`.
- Detected declarations: `struct quirk_entry`, `struct huawei_wmi_debug`, `struct huawei_wmi`, `function dmi_matched`, `function huawei_wmi_call`, `function parameter`, `function huawei_wmi_micmute_led_set`, `function huawei_wmi_leds_setup`, `function huawei_wmi_battery_get`, `function huawei_wmi_battery_set`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.