summaryrefslogtreecommitdiff
path: root/drivers/opp
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2022-11-02 16:57:05 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2022-11-04 10:59:03 +0530
commit71b09429e82e5cd402bedc763c25b5962fdc9d71 (patch)
tree4df8b4914df8410f9f11b102f0f217d2121b6b06 /drivers/opp
parent1b91dba2474ed61c34e453a48c4968833ebd68c6 (diff)
OPP: Parse named opp-microwatt property too
We missed parsing the named opp-microwatt-<name> property, fix that. Tested-by: James Calligeros <jcalligeros99@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp')
-rw-r--r--drivers/opp/of.c16
1 files 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);