]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pmdomain: core: Leave powered-on genpds on until sync_state
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 1 Jul 2025 11:47:24 +0000 (13:47 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 9 Jul 2025 11:29:57 +0000 (13:29 +0200)
commit0e789b491ba04c31de5c71249487593e386baa67
treeebe02b41c8f1168b86d7028249597beb71713f5d
parent13a4b7fb62600e1c0738fdb0b7176555ff05aadf
pmdomain: core: Leave powered-on genpds on until sync_state

Powering-off a genpd that was on during boot, before all of its consumer
devices have been probed, is certainly prone to problems.

For OF based platforms we can rely on using the sync_state mechanism that
the fw_devlink provides, to understand when all consumers for a genpd
provider have been probed. Let's therefore prevent these genpds from being
powered-off until the ->sync_state() callback gets called.

Note that, for non-OF based platform we will keep relying on the
late_initcall_sync, which seems to be the best we can do for now.

Suggested-by: Saravana Kannan <saravanak@google.com>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Colibri iMX8X
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> # TI AM62A,Xilinx ZynqMP ZCU106
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250701114733.636510-23-ulf.hansson@linaro.org
drivers/pmdomain/core.c