[PATCH 1/2] pmdomain: imx8mp-blk-ctrl: set awake path for power_dev if attached device needs wakeup
Xu Yang
xu.yang_2 at nxp.com
Sun Feb 1 23:47:29 PST 2026
Current design will power off all dependent GPC power domains in
imx8mp_blk_ctrl_suspend(), even though the user device has enabled
wakeup capability. The result is that wakeup function never works
for such device.
An example will be USB wakeup on i.MX8MP. PHY device '382f0040.usb-phy'
is attached to power domain 'hsioblk-usb-phy2' which is spawned by hsio
block control. A virtual power domain device 'genpd:3:32f10000.blk-ctrl'
is created to build connection with 'hsioblk-usb-phy2' and it depends on
GPC power domain 'usb-otg2'. If device '382f0040.usb-phy' enable wakeup,
only power domain 'hsioblk-usb-phy2' keeps on during system suspend,
power domain 'usb-otg2' is off all the time. So the wakeup event can't
happen.
Let's propagate wakeup path to virtual power domain device so the wakeup
event can happen properly.
Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
Cc: stable at kernel.org
Signed-off-by: Xu Yang <xu.yang_2 at nxp.com>
---
drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
index 34576be606e3..f3bfd6d22722 100644
--- a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
@@ -804,12 +804,20 @@ static int imx8mp_blk_ctrl_suspend(struct device *dev)
for (i = 0; i < bc->onecell_data.num_domains; i++) {
struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i];
+ struct pm_domain_data *pdd;
ret = pm_runtime_get_sync(domain->power_dev);
if (ret < 0) {
pm_runtime_put_noidle(domain->power_dev);
goto out_fail;
}
+
+ list_for_each_entry(pdd, &domain->genpd.dev_list, list_node) {
+ if (device_awake_path(pdd->dev)) {
+ device_set_awake_path(domain->power_dev);
+ break;
+ }
+ }
}
return 0;
--
2.34.1
More information about the linux-arm-kernel
mailing list