Re: [PATCH v3 3/5] pmdomain: core: Add a genpd config to support unknown initial status
From: Dhruva G
Date: Fri Sep 11 2026 - 12:37:07 EST
On 07-09-2026 16:46, Ulf Hansson wrote:
> It's not always possible for a genpd provider to know the initial status
> for its corresponding PM domain(s). To register the PM domain in a safe
> state, the genpd provider driver may therefore have to initialize the
> genpd's status to be powered off, as a way to prevent the PM domain from
> being used when it actually could be powered off.
>
> In these cases we may end up to power on a PM domain through the genpd
> subsystem, while from the HW point of view it may already be powered on.
> Under these circumstances, it may also be required to keep the PM domain
> powered on until all the consumer devices have been probed. In other words,
> until the ->sync_state() callback for the genpd provider in question have
> been called.
>
> To support this behaviour for a genpd provider, let's introduce a new genpd
> configuration, GENPD_FLAG_POWER_UNKNOWN.
>
> Reported-by: Maulik Shah <maulik.shah@xxxxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/all/20260811-domain_off_ss3-v1-0-6a0a0fc023f5@xxxxxxxxxxxxxxxx/
> Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
> Tested-by: Yuanfang Zhang <yuanfang.zhang@xxxxxxxxxxxxxxxx>
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxxxx>
> ---
Reviewed-by: Dhruva Gole <goledhruva@xxxxxxxxx>
>
> Changes in v3:
> - None.
> Changes in v2:
> - Rename the config to GENPD_FLAG_POWER_UNKNOWN.
> ---
> drivers/pmdomain/core.c | 6 +++++-
> include/linux/pm_domain.h | 9 +++++++++
> 2 files changed, 14 insertions(+), 1 deletion(-)
[...]