Skip to content

Commit decd6e7

Browse files
konradybcioandersson
authored andcommitted
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
1 parent d338fe4 commit decd6e7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/soc/qcom/rpmpd.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct rpmpd_req {
4848

4949
struct rpmpd {
5050
struct generic_pm_domain pd;
51+
struct generic_pm_domain *parent;
5152
struct rpmpd *peer;
5253
const bool active_only;
5354
unsigned int corner;
@@ -969,6 +970,15 @@ static int rpmpd_probe(struct platform_device *pdev)
969970
data->domains[i] = &rpmpds[i]->pd;
970971
}
971972

973+
/* Add subdomains */
974+
for (i = 0; i < num; i++) {
975+
if (!rpmpds[i])
976+
continue;
977+
978+
if (rpmpds[i]->parent)
979+
pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd);
980+
}
981+
972982
return of_genpd_add_provider_onecell(pdev->dev.of_node, data);
973983
}
974984

0 commit comments

Comments
 (0)