[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230713141738.23970-10-ulf.hansson@linaro.org>
Date: Thu, 13 Jul 2023 16:17:36 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>,
Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...nel.org>
Cc: Nikunj Kela <nkela@...cinc.com>,
Prasad Sodagudi <psodagud@...cinc.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Ulf Hansson <ulf.hansson@...aro.org>, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 09/11] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells
The performance domain-id can be described in DT using the power-domains
property or the clock property. The latter is already supported, so let's
add support for the power-domains too.
Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
---
Changes in v2:
- New patch.
---
drivers/cpufreq/scmi-cpufreq.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 78f53e388094..b42f43d9bd89 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -72,13 +72,19 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy,
static int scmi_cpu_domain_id(struct device *cpu_dev)
{
- struct of_phandle_args clkspec;
+ struct of_phandle_args domain_id;
if (of_parse_phandle_with_args(cpu_dev->of_node, "clocks",
- "#clock-cells", 0, &clkspec))
- return -EINVAL;
+ "#clock-cells", 0, &domain_id)) {
- return clkspec.args[0];
+ if (of_parse_phandle_with_args(cpu_dev->of_node,
+ "power-domains",
+ "#power-domain-cells", 0,
+ &domain_id))
+ return -EINVAL;
+ }
+
+ return domain_id.args[0];
}
static int
--
2.34.1
Powered by blists - more mailing lists