[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <c887e9c9b4ce79437286507d3f573c86ecd04b49.1667473008.git.viresh.kumar@linaro.org>
Date: Thu, 3 Nov 2022 16:31:06 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: James Calligeros <jcalligeros99@...il.com>,
Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...nel.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] OPP: Parse named opp-microwatt property too
We missed parsing the named opp-microwatt-<name> property, fix that.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/opp/of.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 605d68673f92..e010e119c42b 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -695,9 +695,19 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
}
}
- /* Search for "opp-microwatt" */
- sprintf(name, "opp-microwatt");
- prop = of_find_property(opp->np, name, NULL);
+ /* Search for "opp-microwatt-<name>" */
+ prop = NULL;
+ if (opp_table->prop_name) {
+ snprintf(name, sizeof(name), "opp-microwatt-%s",
+ opp_table->prop_name);
+ prop = of_find_property(opp->np, name, NULL);
+ }
+
+ if (!prop) {
+ /* Search for "opp-microwatt" */
+ sprintf(name, "opp-microwatt");
+ prop = of_find_property(opp->np, name, NULL);
+ }
if (prop) {
pcount = of_property_count_u32_elems(opp->np, name);
--
2.31.1.272.g89b43f80a514
Powered by blists - more mailing lists