Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Peng Fan and committed by
Ulf Hansson
3b7685da 4acbfb6c

+4 -2
+4 -2
drivers/pmdomain/core.c
··· 1545 1545 if (ret) 1546 1546 return ret; 1547 1547 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)) 1549 1550 return 0; 1550 1551 1551 1552 if (genpd->dev_ops.stop && genpd->dev_ops.start && ··· 1601 1600 if (IS_ERR(genpd)) 1602 1601 return -EINVAL; 1603 1602 1604 - if (device_awake_path(dev) && genpd_is_active_wakeup(genpd)) 1603 + if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) && 1604 + !device_out_band_wakeup(dev)) 1605 1605 return resume_noirq(dev); 1606 1606 1607 1607 genpd_lock(genpd);