]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pmdomain: renesas: rcar-sysc: Don't keep unused PM domains powered-on
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 9 Sep 2025 11:11:22 +0000 (13:11 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 11 Sep 2025 10:36:43 +0000 (12:36 +0200)
The recent changes to genpd makes a genpd OF provider that is powered-on at
initialization to stay powered-on, until the ->sync_state() callback is
invoked for it.

This may not happen at all, if we wait for a consumer device to be probed,
leading to wasting energy. There are ways to enforce the ->sync_state()
callback to be invoked, through sysfs or via the probe-defer-timeout, but
none of them in its current form are a good fit for rcar-sysc PM domains.

Let's therefore opt-out from this behaviour of genpd for now, by using the
GENPD_FLAG_NO_STAY_ON.

Link: https://lore.kernel.org/all/20250701114733.636510-1-ulf.hansson@linaro.org/
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 0e789b491ba0 ("pmdomain: core: Leave powered-on genpds on until sync_state")
Fixes: 13a4b7fb6260 ("pmdomain: core: Leave powered-on genpds on until late_initcall_sync")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/pmdomain/renesas/rcar-sysc.c

index 2d4161170c63d07b28fede7b530c06ab42d7e2a8..d8a8ffcde38d8b1fd87b2ce8bc8d3c1f7a55eaf8 100644 (file)
@@ -241,6 +241,7 @@ static int __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd)
                }
        }
 
+       genpd->flags |= GENPD_FLAG_NO_STAY_ON;
        genpd->power_off = rcar_sysc_pd_power_off;
        genpd->power_on = rcar_sysc_pd_power_on;