From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Bjorn Helgaas <helgaas@kernel.org>, Armin Wolf <w_armin@gmx.de>
Subject: [PATCH v1 2/2] ACPI: PM: Register wakeup sources under physical devices
Date: Mon, 08 Dec 2025 13:13:01 +0100 [thread overview]
Message-ID: <3024338.e9J7NaK4W3@rafael.j.wysocki> (raw)
In-Reply-To: <2395536.ElGaqSPkdT@rafael.j.wysocki>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Currently, acpi_add_pm_notifier() registers wakeup sources under
ACPI companions of the devices affected by the handling of wakeup
events which goes against the rule that a struct acpi_device
can only be a parent of another struct acpi_device.
Moreover, it would be more logically consistent to register wakeup
sources under the devices affected by wakeup events handling which
would cause them to appear in more suitable places in sysfs and would
help to identify the devices they are associated with more easily.
Accordingly, update acpi_add_pm_notifier() to register wakeup sources
under the "target" devices directly instead of registering them under
the ACPI companions of those devices.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/device_pm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -586,8 +586,7 @@ acpi_status acpi_add_pm_notifier(struct
goto out;
mutex_lock(&acpi_pm_notifier_lock);
- adev->wakeup.ws = wakeup_source_register(&adev->dev,
- dev_name(&adev->dev));
+ adev->wakeup.ws = wakeup_source_register(dev, dev_name(&adev->dev));
adev->wakeup.context.dev = dev;
adev->wakeup.context.func = func;
adev->wakeup.flags.notifier_present = true;
next prev parent reply other threads:[~2025-12-08 12:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 12:09 [PATCH v1 0/2] PCI: ACPI: PM: Rework root bus wakeup notification setup and wakeup source registration Rafael J. Wysocki
2025-12-08 12:11 ` [PATCH v1 1/2] PCI: ACPI: PM: Rework root bus notification setup Rafael J. Wysocki
2025-12-08 12:13 ` Rafael J. Wysocki [this message]
2025-12-08 20:01 ` [PATCH v1 0/2] PCI: ACPI: PM: Rework root bus wakeup notification setup and wakeup source registration Armin Wolf
2025-12-09 11:31 ` Rafael J. Wysocki
2025-12-09 13:56 ` Armin Wolf
2025-12-09 21:59 ` Armin Wolf
2025-12-09 22:18 ` Rafael J. Wysocki
2025-12-10 0:29 ` Armin Wolf
2025-12-10 1:56 ` Rafael J. Wysocki
2025-12-20 12:56 ` Armin Wolf
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=3024338.e9J7NaK4W3@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=helgaas@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=w_armin@gmx.de \
/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