@@ -97,12 +97,14 @@ static struct rpmhpd sdm845_cx_ao;
static struct rpmhpd sdm845_cx = {
.pd = { .name = "cx", },
.peer = &sdm845_cx_ao,
+ .parent = &sdm845_mx.pd,
.res_name = "cx.lvl",
};
static struct rpmhpd sdm845_cx_ao = {
.pd = { .name = "cx_ao", },
.peer = &sdm845_cx,
+ .parent = &sdm845_mx_ao.pd,
.res_name = "cx.lvl",
};
@@ -372,6 +374,15 @@ static int rpmhpd_probe(struct platform_device *pdev)
data->domains[i] = &rpmhpds[i]->pd;
}
+ /* Add subdomains */
+ for (i = 0; i < num_pds; i++) {
+ if (!rpmhpds[i])
+ continue;
+ if (rpmhpds[i]->parent)
+ pm_genpd_add_subdomain(rpmhpds[i]->parent,
+ &rpmhpds[i]->pd);
+ }
+
return of_genpd_add_provider_onecell(pdev->dev.of_node, data);
}