diff options
author | Konrad Dybcio <konrad.dybcio@linaro.org> | 2023-03-13 21:00:06 +0100 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-03-15 23:40:27 +0100 |
commit | decd6e77e02eff517efe11dfc181ce1b5bef3405 (patch) | |
tree | 85917c7f06017f3cd9a2772f7c46ac636423cd44 | |
parent | soc: qcom: rpmpd: Make bindings assignments consistent (diff) | |
download | linux-decd6e77e02eff517efe11dfc181ce1b5bef3405.tar.xz linux-decd6e77e02eff517efe11dfc181ce1b5bef3405.zip |
soc: qcom: rpmpd: Add parent PD support
In some cases (like with the GPU core clock on GMU-less SoCs) it's
required that we scale more than one voltage domain. This can be achieved
by linking them in a parent-child relationship. Add support for specifying
a parent PD, similarly to what has been done in the RPMhPD driver.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-8-06a4f448ff90@linaro.org
-rw-r--r-- | drivers/soc/qcom/rpmpd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 946630d82b3d..2027c820caa7 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -48,6 +48,7 @@ struct rpmpd_req { struct rpmpd { struct generic_pm_domain pd; + struct generic_pm_domain *parent; struct rpmpd *peer; const bool active_only; unsigned int corner; @@ -969,6 +970,15 @@ static int rpmpd_probe(struct platform_device *pdev) data->domains[i] = &rpmpds[i]->pd; } + /* Add subdomains */ + for (i = 0; i < num; i++) { + if (!rpmpds[i]) + continue; + + if (rpmpds[i]->parent) + pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd); + } + return of_genpd_add_provider_onecell(pdev->dev.of_node, data); } |