mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: linux-arm-msm@vger.kernel.org, andersson@kernel.org,
	agross@kernel.org, krzysztof.kozlowski@linaro.org
Cc: marijn.suijten@somainline.org,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support
Date: Wed, 25 Jan 2023 04:27:22 +0100	[thread overview]
Message-ID: <20230125032728.611640-2-konrad.dybcio@linaro.org> (raw)
In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org>

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>
---
 drivers/soc/qcom/rpmpd.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 337b1ad1cd3b..0c2d930ab38f 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -99,6 +99,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;
@@ -673,6 +674,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);
 }
 
-- 
2.39.1


       reply	other threads:[~2023-01-25  3:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230125032728.611640-1-konrad.dybcio@linaro.org>
2023-01-25  3:27 ` Konrad Dybcio [this message]
2023-01-25  3:27 ` [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs Konrad Dybcio
2023-01-25  9:08   ` Dmitry Baryshkov
2023-01-25  3:27 ` [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Konrad Dybcio
2023-01-25  9:07   ` Dmitry Baryshkov
2023-01-25  3:27 ` [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names Konrad Dybcio
2023-01-25  9:02   ` Dmitry Baryshkov
2023-01-25  3:27 ` [PATCH 5/7] soc: qcom: rpmpd: Remove useless comments Konrad Dybcio
2023-01-25  3:27 ` [PATCH 6/7] soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name Konrad Dybcio
2023-01-25  3:27 ` [PATCH 7/7] soc: qcom: rpmpd: Make bindings assignments consistent Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230125032728.611640-2-konrad.dybcio@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®