Skip to content

Commit 3b7685d

Browse files
MrVanUlf Hansson
authored andcommitted
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 <peng.fan@nxp.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 4acbfb6 commit 3b7685d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/pmdomain/core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,8 @@ static int genpd_finish_suspend(struct device *dev,
15451545
if (ret)
15461546
return ret;
15471547

1548-
if (device_awake_path(dev) && genpd_is_active_wakeup(genpd))
1548+
if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) &&
1549+
!device_out_band_wakeup(dev))
15491550
return 0;
15501551

15511552
if (genpd->dev_ops.stop && genpd->dev_ops.start &&
@@ -1600,7 +1601,8 @@ static int genpd_finish_resume(struct device *dev,
16001601
if (IS_ERR(genpd))
16011602
return -EINVAL;
16021603

1603-
if (device_awake_path(dev) && genpd_is_active_wakeup(genpd))
1604+
if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) &&
1605+
!device_out_band_wakeup(dev))
16041606
return resume_noirq(dev);
16051607

16061608
genpd_lock(genpd);

0 commit comments

Comments
 (0)