From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Todd Brandt <todd.e.brandt@linux.intel.com>,
Xi Pardee <xi.pardee@linux.intel.com>
Subject: [PATCH v1 1/2] ACPI: PM: Let acpi_dev_pm_attach() skip devices without ACPI PM
Date: Sat, 10 Jan 2026 12:57:00 +0100 [thread overview]
Message-ID: <5050298.GXAFRqVoOG@rafael.j.wysocki> (raw)
In-Reply-To: <4715380.LvFx2qVVIh@rafael.j.wysocki>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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>
---
drivers/acpi/device_pm.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -1457,6 +1457,15 @@ int acpi_dev_pm_attach(struct device *de
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
* management twice.
next prev parent reply other threads:[~2026-01-10 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-10 11:55 [PATCH v1 0/2] ACPI: PM: Refine acpi_dev_pm_attach() and stop special-casing buttons Rafael J. Wysocki
2026-01-10 11:57 ` Rafael J. Wysocki [this message]
2026-01-10 11:58 ` [PATCH v1 2/2] ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons Rafael J. Wysocki
2026-01-13 2:51 ` Xi Pardee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5050298.GXAFRqVoOG@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=todd.e.brandt@linux.intel.com \
--cc=xi.pardee@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox