Skip to content

Commit 2bc12a8

Browse files
committed
pmdomain: rockchip: Fix regulator dependency with GENPD_FLAG_NO_STAY_ON
The deferred regulator retrieval for Rockchip PM domains are causing some weird dependencies. More precisely, if the power-domain is powered-on from the HW perspective, its corresponding regulator must not be powered-off via regulator_init_complete(), which is a late_initcall_sync. Even on platforms that don't have the domain-supply regulator specified for the power-domain provider, may suffer from these problems. More precisely, things just happen to work before, because genpd_power_off_unused() (also a late_initcall_sync) managed to power-off the PM domain before regulator_init_complete() powered-off the regulator. Ideally this fragile dependency must be fixed properly for the Rockchip PM domains, but until then, let's fallback to the previous behaviour by using the GENPD_FLAG_NO_STAY_ON flag. Link: https://lore.kernel.org/all/20250902-rk3576-lockup-regression-v1-1-c4a0c9daeb00@collabora.com/ Reported-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Sebastian Reichel <sebastian.reichel@collabora.com> Fixes: 0e789b4 ("pmdomain: core: Leave powered-on genpds on until sync_state") Fixes: 13a4b7f ("pmdomain: core: Leave powered-on genpds on until late_initcall_sync") Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 002ebdd commit 2bc12a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pmdomain/rockchip/pm-domains.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
865865
pd->genpd.power_on = rockchip_pd_power_on;
866866
pd->genpd.attach_dev = rockchip_pd_attach_dev;
867867
pd->genpd.detach_dev = rockchip_pd_detach_dev;
868-
pd->genpd.flags = GENPD_FLAG_PM_CLK;
868+
pd->genpd.flags = GENPD_FLAG_PM_CLK | GENPD_FLAG_NO_STAY_ON;
869869
if (pd_info->active_wakeup)
870870
pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
871871
pm_genpd_init(&pd->genpd, NULL,

0 commit comments

Comments
 (0)