drivers/acpi/x86/utils.c
Source file repositories/reference/linux-study-clean/drivers/acpi/x86/utils.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/x86/utils.c- Extension
.c- Size
- 22046 bytes
- Lines
- 668
- Domain
- Driver Families
- Bucket
- drivers/acpi
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/dmi.hlinux/pci.hlinux/platform_device.hasm/cpu_device_id.hasm/intel-family.h../internal.h
Detected Declarations
struct override_status_idfunction acpi_device_override_statusfunction force_storage_d3function clientsfunction acpi_quirk_skip_i2c_client_enumerationfunction acpi_dmi_skip_serdev_enumerationfunction acpi_quirk_skip_gpio_event_handlersfunction acpi_dmi_skip_serdev_enumerationfunction acpi_quirk_skip_serdev_enumerationfunction UARTfunction acpi_quirk_skip_acpi_ac_and_batteryfunction acpi_proc_quirk_set_no_mwaitfunction acpi_proc_quirk_mwait_checkexport acpi_quirk_skip_i2c_client_enumerationexport acpi_quirk_skip_gpio_event_handlersexport acpi_quirk_skip_serdev_enumerationexport acpi_quirk_skip_acpi_ac_and_battery
Annotated Snippet
struct override_status_id {
struct acpi_device_id hid[2];
struct x86_cpu_id cpu_ids[2];
struct dmi_system_id dmi_ids[2]; /* Optional */
const char *uid;
const char *path;
unsigned long long status;
};
#define ENTRY(status, hid, uid, path, cpu_vfm, dmi...) { \
{ { hid, }, {} }, \
{ X86_MATCH_VFM(cpu_vfm, NULL), {} }, \
{ { .matches = dmi }, {} }, \
uid, \
path, \
status, \
}
#define PRESENT_ENTRY_HID(hid, uid, cpu_vfm, dmi...) \
ENTRY(ACPI_STA_DEFAULT, hid, uid, NULL, cpu_vfm, dmi)
#define NOT_PRESENT_ENTRY_HID(hid, uid, cpu_vfm, dmi...) \
ENTRY(0, hid, uid, NULL, cpu_vfm, dmi)
#define PRESENT_ENTRY_PATH(path, cpu_vfm, dmi...) \
ENTRY(ACPI_STA_DEFAULT, "", NULL, path, cpu_vfm, dmi)
#define NOT_PRESENT_ENTRY_PATH(path, cpu_vfm, dmi...) \
ENTRY(0, "", NULL, path, cpu_vfm, dmi)
static const struct override_status_id override_status_ids[] = {
/*
* Bay / Cherry Trail PWM directly poked by GPU driver in win10,
* but Linux uses a separate PWM driver, harmless if not used.
*/
PRESENT_ENTRY_HID("80860F09", "1", INTEL_ATOM_SILVERMONT, {}),
PRESENT_ENTRY_HID("80862288", "1", INTEL_ATOM_AIRMONT, {}),
/* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
PRESENT_ENTRY_HID("80862289", "2", INTEL_ATOM_AIRMONT, {
DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
}),
/*
* Lenovo Yoga Book uses PWM2 for touch keyboard backlight control.
* It needs to be enabled only for the Android device version (YB1-X90*
* aka YETI-11); the Windows version (YB1-X91*) uses ACPI control
* methods.
*/
PRESENT_ENTRY_HID("80862289", "2", INTEL_ATOM_AIRMONT, {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
}),
/*
* The INT0002 device is necessary to clear wakeup interrupt sources
* on Cherry Trail devices, without it we get nobody cared IRQ msgs.
*/
PRESENT_ENTRY_HID("INT0002", "1", INTEL_ATOM_AIRMONT, {}),
/*
* On the Dell Venue 11 Pro 7130 and 7139, the DSDT hides
* the touchscreen ACPI device until a certain time
* after _SB.PCI0.GFX0.LCD.LCD1._ON gets called has passed
* *and* _STA has been called at least 3 times since.
*/
PRESENT_ENTRY_HID("SYNA7500", "1", INTEL_HASWELL_L, {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"),
}),
PRESENT_ENTRY_HID("SYNA7500", "1", INTEL_HASWELL_L, {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
}),
/*
* The Dell XPS 15 9550 has a SMO8110 accelerometer /
* HDD freefall sensor which is wrongly marked as not present.
*/
PRESENT_ENTRY_HID("SMO8810", "1", INTEL_SKYLAKE, {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9550"),
}),
/*
* The GPD win BIOS dated 20170221 has disabled the accelerometer, the
* drivers sometimes cause crashes under Windows and this is how the
* manufacturer has solved this :| The DMI match may not seem unique,
* but it is. In the 67000+ DMI decode dumps from linux-hardware.org
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/dmi.h`, `linux/pci.h`, `linux/platform_device.h`, `asm/cpu_device_id.h`, `asm/intel-family.h`, `../internal.h`.
- Detected declarations: `struct override_status_id`, `function acpi_device_override_status`, `function force_storage_d3`, `function clients`, `function acpi_quirk_skip_i2c_client_enumeration`, `function acpi_dmi_skip_serdev_enumeration`, `function acpi_quirk_skip_gpio_event_handlers`, `function acpi_dmi_skip_serdev_enumeration`, `function acpi_quirk_skip_serdev_enumeration`, `function UART`.
- Atlas domain: Driver Families / drivers/acpi.
- 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.