drivers/platform/x86/dell/dell-wmi-base.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/dell/dell-wmi-base.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/dell/dell-wmi-base.c- Extension
.c- Size
- 23183 bytes
- Lines
- 867
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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/kernel.hlinux/module.hlinux/init.hlinux/slab.hlinux/types.hlinux/input.hlinux/input/sparse-keymap.hlinux/acpi.hlinux/string.hlinux/dmi.hlinux/wmi.hacpi/video.hdell-smbios.hdell-wmi-descriptor.hdell-wmi-privacy.h
Detected Declarations
struct dell_wmi_privstruct dell_bios_keymap_entrystruct dell_bios_hotkey_tablestruct dell_dmi_resultsfunction dmi_matchedfunction dell_wmi_switch_eventfunction dell_wmi_process_keyfunction dell_wmi_notifyfunction have_scancodefunction handle_dmi_entryfunction dell_wmi_input_setupfunction dell_wmi_input_destroyfunction codesfunction dell_wmi_probefunction dell_wmi_removefunction dell_wmi_initfunction dell_wmi_exit
Annotated Snippet
struct dell_wmi_priv {
struct input_dev *input_dev;
struct input_dev *tabletswitch_dev;
u32 interface_version;
};
static int __init dmi_matched(const struct dmi_system_id *dmi)
{
wmi_requires_smbios_request = 1;
return 1;
}
static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
{
.callback = dmi_matched,
.ident = "Dell Inspiron M5110",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron M5110"),
},
},
{
.callback = dmi_matched,
.ident = "Dell Vostro V131",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
},
},
{ }
};
/*
* Keymap for WMI events of type 0x0000
*
* Certain keys are flagged as KE_IGNORE. All of these are either
* notifications (rather than requests for change) or are also sent
* via the keyboard controller so should not be sent again.
*/
static const struct key_entry dell_wmi_keymap_type_0000[] = {
{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
/* Audio mute toggle */
{ KE_KEY, 0x0109, { KEY_MUTE } },
/* Mic mute toggle */
{ KE_KEY, 0x0150, { KEY_MICMUTE } },
/* Meta key lock */
{ KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
/* Meta key unlock */
{ KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
/* Key code is followed by brightness level */
{ KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } },
{ KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } },
/* Battery health status button */
{ KE_KEY, 0xe007, { KEY_BATTERY } },
/* Radio devices state change, key code is followed by other values */
{ KE_IGNORE, 0xe008, { KEY_RFKILL } },
{ KE_KEY, 0xe009, { KEY_EJECTCD } },
/* Key code is followed by: next, active and attached devices */
{ KE_KEY, 0xe00b, { KEY_SWITCHVIDEOMODE } },
/* Key code is followed by keyboard illumination level */
{ KE_IGNORE, 0xe00c, { KEY_KBDILLUMTOGGLE } },
/* BIOS error detected */
{ KE_IGNORE, 0xe00d, { KEY_RESERVED } },
/* Battery was removed or inserted */
{ KE_IGNORE, 0xe00e, { KEY_RESERVED } },
/* Wifi Catcher */
{ KE_KEY, 0xe011, { KEY_WLAN } },
/* Ambient light sensor toggle */
{ KE_IGNORE, 0xe013, { KEY_RESERVED } },
{ KE_IGNORE, 0xe020, { KEY_MUTE } },
/* Unknown, defined in ACPI DSDT */
/* { KE_IGNORE, 0xe023, { KEY_RESERVED } }, */
/* Untested, Dell Instant Launch key on Inspiron 7520 */
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/init.h`, `linux/slab.h`, `linux/types.h`, `linux/input.h`, `linux/input/sparse-keymap.h`, `linux/acpi.h`.
- Detected declarations: `struct dell_wmi_priv`, `struct dell_bios_keymap_entry`, `struct dell_bios_hotkey_table`, `struct dell_dmi_results`, `function dmi_matched`, `function dell_wmi_switch_event`, `function dell_wmi_process_key`, `function dell_wmi_notify`, `function have_scancode`, `function handle_dmi_entry`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: source 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.