1 // SPDX-License-Identifier: GPL-2.0-only
3 * X86 ACPI Utility Functions
7 * Based on various non upstream patches to support the CHT Whiskey Cove PMIC:
8 * Copyright (C) 2013-2015 Intel Corporation. All rights reserved.
11 #define pr_fmt(fmt) "ACPI: " fmt
13 #include <linux/acpi.h>
14 #include <linux/dmi.h>
15 #include <linux/pci.h>
16 #include <linux/platform_device.h>
17 #include <asm/cpu_device_id.h>
18 #include <asm/intel-family.h>
19 #include "../internal.h"
22 * Some ACPI devices are hidden (status == 0x0) in recent BIOS-es because
23 * some recent Windows drivers bind to one device but poke at multiple
24 * devices at the same time, so the others get hidden.
26 * Some BIOS-es (temporarily) hide specific APCI devices to work around Windows
27 * driver bugs. We use DMI matching to match known cases of this.
29 * Likewise sometimes some not-actually present devices are sometimes
30 * reported as present, which may cause issues.
32 * We work around this by using the below quirk list to override the status
33 * reported by the _STA method with a fixed value (ACPI_STA_DEFAULT or 0).
34 * Note this MUST only be done for devices where this is safe.
36 * This status overriding is limited to specific CPU (SoC) models both to
37 * avoid potentially causing trouble on other models and because some HIDs
38 * are re-used on different SoCs for completely different devices.
40 struct override_status_id {
41 struct acpi_device_id hid[2];
42 struct x86_cpu_id cpu_ids[2];
43 struct dmi_system_id dmi_ids[2]; /* Optional */
46 unsigned long long status;
49 #define ENTRY(status, hid, uid, path, cpu_vfm, dmi...) { \
51 { X86_MATCH_VFM(cpu_vfm, NULL), {} }, \
52 { { .matches = dmi }, {} }, \
58 #define PRESENT_ENTRY_HID(hid, uid, cpu_vfm, dmi...) \
59 ENTRY(ACPI_STA_DEFAULT, hid, uid, NULL, cpu_vfm, dmi)
61 #define NOT_PRESENT_ENTRY_HID(hid, uid, cpu_vfm, dmi...) \
62 ENTRY(0, hid, uid, NULL, cpu_vfm, dmi)
64 #define PRESENT_ENTRY_PATH(path, cpu_vfm, dmi...) \
65 ENTRY(ACPI_STA_DEFAULT, "", NULL, path, cpu_vfm, dmi)
67 #define NOT_PRESENT_ENTRY_PATH(path, cpu_vfm, dmi...) \
68 ENTRY(0, "", NULL, path, cpu_vfm, dmi)
70 static const struct override_status_id override_status_ids[] = {
72 * Bay / Cherry Trail PWM directly poked by GPU driver in win10,
73 * but Linux uses a separate PWM driver, harmless if not used.
75 PRESENT_ENTRY_HID("80860F09", "1", INTEL_ATOM_SILVERMONT, {}),
76 PRESENT_ENTRY_HID("80862288", "1", INTEL_ATOM_AIRMONT, {}),
78 /* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
79 PRESENT_ENTRY_HID("80862289", "2", INTEL_ATOM_AIRMONT, {
80 DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
81 DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
85 * The INT0002 device is necessary to clear wakeup interrupt sources
86 * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
88 PRESENT_ENTRY_HID("INT0002", "1", INTEL_ATOM_AIRMONT, {}),
90 * On the Dell Venue 11 Pro 7130 and 7139, the DSDT hides
91 * the touchscreen ACPI device until a certain time
92 * after _SB.PCI0.GFX0.LCD.LCD1._ON gets called has passed
93 * *and* _STA has been called at least 3 times since.
95 PRESENT_ENTRY_HID("SYNA7500", "1", INTEL_HASWELL_L, {
96 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
97 DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"),
99 PRESENT_ENTRY_HID("SYNA7500", "1", INTEL_HASWELL_L, {
100 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
101 DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7139"),
105 * The Dell XPS 15 9550 has a SMO8110 accelerometer /
106 * HDD freefall sensor which is wrongly marked as not present.
108 PRESENT_ENTRY_HID("SMO8810", "1", INTEL_SKYLAKE, {
109 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
110 DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9550"),
114 * The GPD win BIOS dated 20170221 has disabled the accelerometer, the
115 * drivers sometimes cause crashes under Windows and this is how the
116 * manufacturer has solved this :| The DMI match may not seem unique,
117 * but it is. In the 67000+ DMI decode dumps from linux-hardware.org
118 * only 116 have board_vendor set to "AMI Corporation" and of those 116
119 * only the GPD win and pocket entries' board_name is "Default string".
121 * Unfortunately the GPD pocket also uses these strings and its BIOS
122 * was copy-pasted from the GPD win, so it has a disabled KIOX000A
123 * node which we should not enable, thus we also check the BIOS date.
125 PRESENT_ENTRY_HID("KIOX000A", "1", INTEL_ATOM_AIRMONT, {
126 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
127 DMI_MATCH(DMI_BOARD_NAME, "Default string"),
128 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
129 DMI_MATCH(DMI_BIOS_DATE, "02/21/2017")
131 PRESENT_ENTRY_HID("KIOX000A", "1", INTEL_ATOM_AIRMONT, {
132 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
133 DMI_MATCH(DMI_BOARD_NAME, "Default string"),
134 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
135 DMI_MATCH(DMI_BIOS_DATE, "03/20/2017")
137 PRESENT_ENTRY_HID("KIOX000A", "1", INTEL_ATOM_AIRMONT, {
138 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
139 DMI_MATCH(DMI_BOARD_NAME, "Default string"),
140 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
141 DMI_MATCH(DMI_BIOS_DATE, "05/25/2017")
145 * The GPD win/pocket have a PCI wifi card, but its DSDT has the SDIO
146 * mmc controller enabled and that has a child-device which _PS3
147 * method sets a GPIO causing the PCI wifi card to turn off.
148 * See above remark about uniqueness of the DMI match.
150 NOT_PRESENT_ENTRY_PATH("\\_SB_.PCI0.SDHB.BRC1", INTEL_ATOM_AIRMONT, {
151 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
152 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
153 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
154 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
158 * The LSM303D on the Lenovo Yoga Tablet 2 series is present
159 * as both ACCL0001 and MAGN0001. As we can only ever register an
160 * i2c client for one of them, ignore MAGN0001.
162 NOT_PRESENT_ENTRY_HID("MAGN0001", "1", INTEL_ATOM_SILVERMONT, {
163 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
164 DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"),
168 bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status)
173 for (i = 0; i < ARRAY_SIZE(override_status_ids); i++) {
174 if (!x86_match_cpu(override_status_ids[i].cpu_ids))
177 if (override_status_ids[i].dmi_ids[0].matches[0].slot &&
178 !dmi_check_system(override_status_ids[i].dmi_ids))
181 if (override_status_ids[i].path) {
182 struct acpi_buffer path = { ACPI_ALLOCATE_BUFFER, NULL };
185 if (acpi_get_name(adev->handle, ACPI_FULL_PATHNAME, &path))
188 match = strcmp((char *)path.pointer, override_status_ids[i].path) == 0;
194 if (acpi_match_device_ids(adev, override_status_ids[i].hid))
197 if (!acpi_dev_uid_match(adev, override_status_ids[i].uid))
201 *status = override_status_ids[i].status;
210 * AMD systems from Renoir onwards *require* that the NVME controller
211 * is put into D3 over a Modern Standby / suspend-to-idle cycle.
213 * This is "typically" accomplished using the `StorageD3Enable`
214 * property in the _DSD that is checked via the `acpi_storage_d3` function
215 * but some OEM systems still don't have it in their BIOS.
217 * The Microsoft documentation for StorageD3Enable mentioned that Windows has
218 * a hardcoded allowlist for D3 support as well as a registry key to override
219 * the BIOS, which has been used for these cases.
221 * This allows quirking on Linux in a similar fashion.
223 * Cezanne systems shouldn't *normally* need this as the BIOS includes
224 * StorageD3Enable. But for two reasons we have added it.
225 * 1) The BIOS on a number of Dell systems have ambiguity
226 * between the same value used for _ADR on ACPI nodes GPP1.DEV0 and GPP1.NVME.
227 * GPP1.NVME is needed to get StorageD3Enable node set properly.
228 * https://bugzilla.kernel.org/show_bug.cgi?id=216440
229 * https://bugzilla.kernel.org/show_bug.cgi?id=216773
230 * https://bugzilla.kernel.org/show_bug.cgi?id=217003
231 * 2) On at least one HP system StorageD3Enable is missing on the second NVME
232 * disk in the system.
233 * 3) On at least one HP Rembrandt system StorageD3Enable is missing on the only
236 bool force_storage_d3(void)
238 if (!cpu_feature_enabled(X86_FEATURE_ZEN))
240 return acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0;
244 * x86 ACPI boards which ship with only Android as their factory image usually
245 * declare a whole bunch of bogus I2C devices in their ACPI tables and sometimes
246 * there are issues with serdev devices on these boards too, e.g. the resource
247 * points to the wrong serdev_controller.
249 * Instantiating I2C / serdev devs for these bogus devs causes various issues,
250 * e.g. GPIO/IRQ resource conflicts because sometimes drivers do bind to them.
251 * The Android x86 kernel fork shipped on these devices has some special code
252 * to remove the bogus I2C clients (and AFAICT serdevs are ignored completely).
254 * The acpi_quirk_skip_*_enumeration() functions below are used by the I2C or
255 * serdev code to skip instantiating any I2C or serdev devs on broken boards.
257 * In case of I2C an exception is made for HIDs on the i2c_acpi_known_good_ids
258 * list. These are known to always be correct (and in case of the audio-codecs
259 * the drivers heavily rely on the codec being enumerated through ACPI).
261 * Note these boards typically do actually have I2C and serdev devices,
262 * just different ones then the ones described in their DSDT. The devices
263 * which are actually present are manually instantiated by the
264 * drivers/platform/x86/x86-android-tablets.c kernel module.
266 #define ACPI_QUIRK_SKIP_I2C_CLIENTS BIT(0)
267 #define ACPI_QUIRK_UART1_SKIP BIT(1)
268 #define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(2)
269 #define ACPI_QUIRK_PNP_UART1_SKIP BIT(3)
270 #define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(4)
271 #define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(5)
272 #define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(6)
274 static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
276 * 1. Devices with only the skip / don't-skip AC and battery quirks,
277 * sorted alphabetically.
280 /* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */
282 DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
284 .driver_data = (void *)ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY
287 /* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */
289 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
290 DMI_MATCH(DMI_PRODUCT_NAME, "80XF"),
291 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
293 .driver_data = (void *)ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY
297 * 2. Devices which also have the skip i2c/serdev quirks and which
298 * need the x86-android-tablets module to properly work.
300 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
302 /* Acer Iconia One 7 B1-750 */
304 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
305 DMI_MATCH(DMI_PRODUCT_NAME, "VESPA2"),
307 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
308 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
309 ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
313 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
314 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ME176C"),
316 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
317 ACPI_QUIRK_UART1_TTY_UART2_SKIP |
318 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
319 ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
322 /* Lenovo Yoga Book X90F/L */
324 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
325 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
326 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
328 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
329 ACPI_QUIRK_UART1_SKIP |
330 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
331 ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
335 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
336 DMI_MATCH(DMI_PRODUCT_NAME, "TF103C"),
338 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
339 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
340 ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
343 /* Lenovo Yoga Tablet 2 1050F/L */
345 DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
346 DMI_MATCH(DMI_PRODUCT_NAME, "VALLEYVIEW C0 PLATFORM"),
347 DMI_MATCH(DMI_BOARD_NAME, "BYT-T FFD8"),
348 /* Partial match on beginning of BIOS version */
349 DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"),
351 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
352 ACPI_QUIRK_PNP_UART1_SKIP |
353 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
356 /* Lenovo Yoga Tab 3 Pro X90F */
358 DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
359 DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
361 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
362 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
365 /* Medion Lifetab S10346 */
367 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
368 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
369 /* Way too generic, also match on BIOS data */
370 DMI_MATCH(DMI_BIOS_DATE, "10/22/2015"),
372 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
373 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
376 /* Nextbook Ares 8 (BYT version)*/
378 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
379 DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"),
381 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
382 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
383 ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
386 /* Nextbook Ares 8A (CHT version)*/
388 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
389 DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
390 DMI_MATCH(DMI_BIOS_VERSION, "M882"),
392 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
393 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
396 /* Vexia Edu Atla 10 tablet 9V version */
398 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
399 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
400 /* Above strings are too generic, also match on BIOS date */
401 DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"),
403 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
404 ACPI_QUIRK_UART1_SKIP |
405 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
406 ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
409 /* Whitelabel (sold as various brands) TM800A550L */
411 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
412 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
413 /* Above strings are too generic, also match on BIOS version */
414 DMI_MATCH(DMI_BIOS_VERSION, "ZY-8-BI-PX4S70VTR400-X423B-005-D"),
416 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
417 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
423 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
424 static const struct acpi_device_id i2c_acpi_known_good_ids[] = {
425 { "10EC5640", 0 }, /* RealTek ALC5640 audio codec */
426 { "10EC5651", 0 }, /* RealTek ALC5651 audio codec */
427 { "INT33F4", 0 }, /* X-Powers AXP288 PMIC */
428 { "INT33FD", 0 }, /* Intel Crystal Cove PMIC */
429 { "INT34D3", 0 }, /* Intel Whiskey Cove PMIC */
430 { "NPCE69A", 0 }, /* Asus Transformer keyboard dock */
434 bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
436 const struct dmi_system_id *dmi_id;
439 dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
443 quirks = (unsigned long)dmi_id->driver_data;
444 if (!(quirks & ACPI_QUIRK_SKIP_I2C_CLIENTS))
447 return acpi_match_device_ids(adev, i2c_acpi_known_good_ids);
449 EXPORT_SYMBOL_GPL(acpi_quirk_skip_i2c_client_enumeration);
451 static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
453 struct acpi_device *adev = ACPI_COMPANION(controller_parent);
454 const struct dmi_system_id *dmi_id;
458 dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
462 quirks = (unsigned long)dmi_id->driver_data;
464 /* uid is left at 0 on errors and 0 is not a valid UART UID */
465 acpi_dev_uid_to_integer(adev, &uid);
467 /* For PCI UARTs without an UID */
468 if (!uid && dev_is_pci(controller_parent)) {
469 struct pci_dev *pdev = to_pci_dev(controller_parent);
472 * Devfn values for PCI UARTs on Bay Trail SoCs, which are
473 * the only devices where this fallback is necessary.
475 if (pdev->devfn == PCI_DEVFN(0x1e, 3))
477 else if (pdev->devfn == PCI_DEVFN(0x1e, 4))
484 if (!dev_is_platform(controller_parent) && !dev_is_pci(controller_parent)) {
485 /* PNP enumerated UARTs */
486 if ((quirks & ACPI_QUIRK_PNP_UART1_SKIP) && uid == 1)
492 if ((quirks & ACPI_QUIRK_UART1_SKIP) && uid == 1)
495 if (quirks & ACPI_QUIRK_UART1_TTY_UART2_SKIP) {
497 return -ENODEV; /* Create tty cdev instead of serdev */
506 bool acpi_quirk_skip_gpio_event_handlers(void)
508 const struct dmi_system_id *dmi_id;
511 dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
515 quirks = (unsigned long)dmi_id->driver_data;
516 return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS);
518 EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers);
520 static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
526 int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
528 struct acpi_device *adev = ACPI_COMPANION(controller_parent);
533 * The DELL0501 ACPI HID represents an UART (CID is set to PNP0501) with
534 * a backlight-controller attached. There is no separate ACPI device with
535 * an UartSerialBusV2() resource to model the backlight-controller.
536 * Set skip to true so that the tty core creates a serdev ctrl device.
537 * The backlight driver will manually create the serdev client device.
539 if (adev && acpi_dev_hid_match(adev, "DELL0501")) {
542 * Create a platform dev for dell-uart-backlight to bind to.
543 * This is a static device, so no need to store the result.
545 platform_device_register_simple("dell-uart-backlight", PLATFORM_DEVID_NONE,
550 return acpi_dmi_skip_serdev_enumeration(controller_parent, skip);
552 EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
554 /* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
555 static const struct {
558 } acpi_skip_ac_and_battery_pmic_ids[] = {
559 { "INT33F4", -1 }, /* X-Powers AXP288 PMIC */
560 { "INT34D3", 3 }, /* Intel Cherrytrail Whiskey Cove PMIC */
563 bool acpi_quirk_skip_acpi_ac_and_battery(void)
565 const struct dmi_system_id *dmi_id;
569 dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids);
571 quirks = (unsigned long)dmi_id->driver_data;
573 if (quirks & ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY)
576 if (quirks & ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY)
579 for (i = 0; i < ARRAY_SIZE(acpi_skip_ac_and_battery_pmic_ids); i++) {
580 if (acpi_dev_present(acpi_skip_ac_and_battery_pmic_ids[i].hid, "1",
581 acpi_skip_ac_and_battery_pmic_ids[i].hrv)) {
582 pr_info_once("found native %s PMIC, skipping ACPI AC and battery devices\n",
583 acpi_skip_ac_and_battery_pmic_ids[i].hid);
590 EXPORT_SYMBOL_GPL(acpi_quirk_skip_acpi_ac_and_battery);
592 /* This section provides a workaround for a specific x86 system
593 * which requires disabling of mwait to work correctly.
595 static int __init acpi_proc_quirk_set_no_mwait(const struct dmi_system_id *id)
597 pr_notice("%s detected - disabling mwait for CPU C-states\n",
599 boot_option_idle_override = IDLE_NOMWAIT;
603 static const struct dmi_system_id acpi_proc_quirk_mwait_dmi_table[] __initconst = {
605 .callback = acpi_proc_quirk_set_no_mwait,
606 .ident = "Extensa 5220",
608 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
609 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
610 DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
611 DMI_MATCH(DMI_BOARD_NAME, "Columbia"),
618 void __init acpi_proc_quirk_mwait_check(void)
621 * Check whether the system is DMI table. If yes, OSPM
622 * should not use mwait for CPU-states.
624 dmi_check_system(acpi_proc_quirk_mwait_dmi_table);