Skip to content

Commit b9ea0ba

Browse files
committed
ACPI: PM: Avoid attaching ACPI PM domain to certain devices
Certain ACPI-enumerated devices represented as platform devices in Linux, like fans, require special low-level power management handling implemented by their drivers that is not in agreement with the ACPI PM domain behavior. That leads to problems with managing ACPI fans during system-wide suspend and resume. For this reason, make acpi_dev_pm_attach() skip the affected devices by adding a list of device IDs to avoid to it and putting the IDs of the affected devices into that list. Fixes: e5cc8ef (ACPI / PM: Provide ACPI PM callback routines for subsystems) Reported-by: Zhang Rui <[email protected]> Tested-by: Todd Brandt <[email protected]> Cc: 3.10+ <[email protected]> # 3.10+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent e42617b commit b9ea0ba

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

drivers/acpi/device_pm.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,9 +1314,19 @@ static void acpi_dev_pm_detach(struct device *dev, bool power_off)
13141314
*/
13151315
int acpi_dev_pm_attach(struct device *dev, bool power_on)
13161316
{
1317+
/*
1318+
* Skip devices whose ACPI companions match the device IDs below,
1319+
* because they require special power management handling incompatible
1320+
* with the generic ACPI PM domain.
1321+
*/
1322+
static const struct acpi_device_id special_pm_ids[] = {
1323+
{"PNP0C0B", }, /* Generic ACPI fan */
1324+
{"INT3404", }, /* Fan */
1325+
{}
1326+
};
13171327
struct acpi_device *adev = ACPI_COMPANION(dev);
13181328

1319-
if (!adev)
1329+
if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
13201330
return 0;
13211331

13221332
/*

0 commit comments

Comments
 (0)