Commit 3166383d authored by Ulf Hansson's avatar Ulf Hansson Committed by Viresh Kumar
Browse files

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 248a38d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -94,10 +94,12 @@ struct dev_pm_opp_config {

/**
 * struct dev_pm_opp_data - The data to use to initialize an OPP.
 * @level: The performance level for the OPP.
 * @freq: The clock rate in Hz for the OPP.
 * @u_volt: The voltage in uV for the OPP.
 */
struct dev_pm_opp_data {
	unsigned int level;
	unsigned long freq;
	unsigned long u_volt;
};