]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ACPI: PM: Let acpi_dev_pm_attach() skip devices without ACPI PM
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 Jan 2026 11:57:00 +0000 (12:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Jan 2026 13:27:38 +0000 (14:27 +0100)
It is pointless to attach the generic ACPI PM domain to devices whose
ACPI companions don't support ACPI power management and don't have a
wakeup GPE, so update acpi_dev_pm_attach() to skip such devices.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/5050298.GXAFRqVoOG@rafael.j.wysocki
drivers/acpi/device_pm.c

index 4e0583274b8f4fe6bacf2bcdfbcd3d0747c8cfe6..c7d64ab1fe5d1e2ae009f8f3e88a1353d4d230cf 100644 (file)
@@ -1457,6 +1457,15 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
        if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
                return 0;
 
+       /*
+        * Skip devices whose ACPI companions don't support power management and
+        * don't have a wakeup GPE.
+        */
+       if (!acpi_device_power_manageable(adev) && !acpi_device_can_wakeup(adev)) {
+               dev_dbg(dev, "No ACPI power management or wakeup GPE\n");
+               return 0;
+       }
+
        /*
         * Only attach the power domain to the first device if the
         * companion is shared by multiple. This is to prevent doing power