summaryrefslogtreecommitdiff
path: root/drivers/opp
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2023-09-25 15:17:10 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2023-10-06 12:37:34 +0530
commit3166383da081461244918aeed7ad028ef11b17cc (patch)
tree5707714a946a7414e92e5de6ce32a518def682b7 /drivers/opp
parent248a38d5cc3f3505e6cfbbc0514435c9f1ba00af (diff)
OPP: Extend dev_pm_opp_data with a level
Let's extend the dev_pm_opp_data with a level variable, to allow users to specify a corresponding level (performance state) for a dynamically added OPP. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp')
-rw-r--r--drivers/opp/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 54b6138e1189..ca8d1304b508 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2035,6 +2035,7 @@ int _opp_add_v1(struct opp_table *opp_table, struct device *dev,
/* populate the opp table */
new_opp->rates[0] = data->freq;
+ new_opp->level = data->level;
tol = u_volt * opp_table->voltage_tolerance_v1 / 100;
new_opp->supplies[0].u_volt = u_volt;
new_opp->supplies[0].u_volt_min = u_volt - tol;