drivers/platform/x86/hp/hp-wmi.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/hp/hp-wmi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/hp/hp-wmi.c- Extension
.c- Size
- 70732 bytes
- Lines
- 2787
- 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.
- 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/cleanup.hlinux/compiler_attributes.hlinux/dmi.hlinux/fixp-arith.hlinux/hwmon.hlinux/init.hlinux/input.hlinux/input/sparse-keymap.hlinux/kernel.hlinux/limits.hlinux/minmax.hlinux/module.hlinux/mutex.hlinux/platform_device.hlinux/platform_profile.hlinux/power_supply.hlinux/rfkill.hlinux/slab.hlinux/string.hlinux/types.hlinux/workqueue.h
Detected Declarations
struct thermal_profile_paramsstruct bios_argsstruct victus_power_limitsstruct victus_gpu_power_modesstruct bios_returnstruct bios_rfkill2_device_statestruct bios_rfkill2_statestruct rfkill2_devicestruct hp_wmi_hwmon_privstruct victus_s_fan_table_headerstruct victus_s_fan_table_entrystruct victus_s_fan_tableenum hp_ec_offsetsenum hp_thermal_profile_omen_v0enum hp_thermal_profile_omen_v1enum hp_thermal_profile_omen_flagsenum hp_thermal_profile_victusenum hp_thermal_profile_victus_senum hp_thermal_profileenum hp_wmi_radioenum hp_wmi_event_idsenum hp_wmi_commandtypeenum hp_wmi_gm_commandtypeenum hp_wmi_commandenum hp_wmi_hardware_maskenum hp_return_valueenum hp_wireless2_bitsenum pwm_modesfunction rpm_to_pwmfunction pwm_to_rpmfunction encode_outsize_for_pvszfunction hp_wmi_perform_queryfunction hp_wmi_get_fan_count_userdefine_triggerfunction hp_wmi_get_fan_speedfunction hp_wmi_get_fan_speed_victus_sfunction hp_wmi_read_intfunction hp_wmi_get_dock_statefunction hp_wmi_get_tablet_modefunction omen_thermal_profile_setfunction is_omen_thermal_profilefunction omen_get_thermal_policy_versionfunction omen_thermal_profile_getfunction hp_wmi_fan_speed_max_setfunction hp_wmi_fan_speed_setfunction hp_wmi_fan_speed_resetfunction hp_wmi_fan_speed_max_resetfunction hp_wmi_bios_2008_laterfunction hp_wmi_bios_2009_later
Annotated Snippet
module_init(hp_wmi_init);
static void __exit hp_wmi_exit(void)
{
if (is_omen_thermal_profile() || is_victus_thermal_profile())
omen_unregister_powersource_event_handler();
if (is_victus_s_thermal_profile())
victus_s_unregister_powersource_event_handler();
if (wmi_has_guid(HPWMI_EVENT_GUID))
hp_wmi_input_destroy();
if (camera_shutter_input_dev)
input_unregister_device(camera_shutter_input_dev);
if (hp_wmi_platform_dev) {
platform_device_unregister(hp_wmi_platform_dev);
platform_driver_unregister(&hp_wmi_driver);
}
}
module_exit(hp_wmi_exit);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/cleanup.h`, `linux/compiler_attributes.h`, `linux/dmi.h`, `linux/fixp-arith.h`, `linux/hwmon.h`, `linux/init.h`, `linux/input.h`.
- Detected declarations: `struct thermal_profile_params`, `struct bios_args`, `struct victus_power_limits`, `struct victus_gpu_power_modes`, `struct bios_return`, `struct bios_rfkill2_device_state`, `struct bios_rfkill2_state`, `struct rfkill2_device`, `struct hp_wmi_hwmon_priv`, `struct victus_s_fan_table_header`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: integration 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.