From 3b7685da41838eda57f56e804014091769a93700 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 22 Sep 2025 10:21:07 +0800 Subject: [PATCH] pmdomain: core: Allow power-off for out-of-band wakeup-capable devices Currently, if a device is configured as a system wakeup source, the PM domain core avoids powering off its power domain during system-wide suspend. However, this can lead to unnecessary power consumption, especially for devices whose wakeup logic resides in an always-on domain, i.e., devices with out-of-band wakeup capability. To address this, add a check for device_out_band_wakeup() in genpd_finish_suspend(). If the device supports out-of-band wakeup, its power domain can be safely powered off, just like regular devices without wakeup enabled. And same check in genpd_finish_resume(). This change improves power efficiency without compromising wakeup functionality. Signed-off-by: Peng Fan Reviewed-by: Dhruva Gole Signed-off-by: Ulf Hansson --- drivers/pmdomain/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 61c2277c9ce39..4925bc1c44107 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -1545,7 +1545,8 @@ static int genpd_finish_suspend(struct device *dev, if (ret) return ret; - if (device_awake_path(dev) && genpd_is_active_wakeup(genpd)) + if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) && + !device_out_band_wakeup(dev)) return 0; if (genpd->dev_ops.stop && genpd->dev_ops.start && @@ -1600,7 +1601,8 @@ static int genpd_finish_resume(struct device *dev, if (IS_ERR(genpd)) return -EINVAL; - if (device_awake_path(dev) && genpd_is_active_wakeup(genpd)) + if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) && + !device_out_band_wakeup(dev)) return resume_noirq(dev); genpd_lock(genpd); -- 2.47.3