[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8609825.NyiUUSuA9g@rjwysocki.net>
Date: Thu, 26 Jun 2025 20:12:25 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux ACPI <linux-acpi@...r.kernel.org>,
Linux PCI <linux-pci@...r.kernel.org>, Ulf Hansson <ulf.hansson@...aro.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject:
[PATCH v2 8/9] ACPI: PM: Set/clear power.strict_midlayer in prepare/complete
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
The ACPI general PM domain and the LPSS PM domain do not expect their
mid-layer runtime PM callbacks to be invoked at any point during
system-wide suspend and resume, so make acpi_subsys_prepare() set
power.strict_midlayer for the given device to express that expectation
and make acpi_subsys_complete() clear it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
v1 -> v2:
* Set and clear the new flag in "prepare" and "complete" instead of
"attach" and "detach", respectively, to (1) cover the LPSS PM domain as
well as the general ACPI PM domain and (2) allow pm_runtime_force_suspend()
invoked from driver remove callbacks to work.
* Update subject and changelog.
---
drivers/acpi/device_pm.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -1119,6 +1119,8 @@
{
struct acpi_device *adev = ACPI_COMPANION(dev);
+ dev_pm_set_strict_midlayer(dev, true);
+
if (dev->driver && dev->driver->pm && dev->driver->pm->prepare) {
int ret = dev->driver->pm->prepare(dev);
@@ -1147,6 +1149,8 @@
*/
if (pm_runtime_suspended(dev) && pm_resume_via_firmware())
pm_request_resume(dev);
+
+ dev_pm_set_strict_midlayer(dev, false);
}
EXPORT_SYMBOL_GPL(acpi_subsys_complete);
Powered by blists - more mailing lists