[v4,2/5] cpufreq: dt: Register an Energy Model
diff mbox series

Message ID 20190204110952.16025-3-quentin.perret@arm.com
State New
Delegated to: viresh kumar
Headers show
  • Register an Energy Model for Arm reference platforms
Related show

Commit Message

Quentin Perret Feb. 4, 2019, 11:09 a.m. UTC
Now that PM_OPP provides a helper function to estimate the power
consumed by CPUs, make sure to try and register an Energy Model (EM)
from cpufreq-dt, hence ensuring interested subsystems (the task
scheduler, for example) can make use of that information when available.

Signed-off-by: Quentin Perret <quentin.perret@arm.com>
 drivers/cpufreq/cpufreq-dt.c | 2 ++
 1 file changed, 2 insertions(+)

diff mbox series

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index e58bfcb1169e..d74e0402512a 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -280,6 +280,8 @@  static int cpufreq_init(struct cpufreq_policy *policy)
 	policy->cpuinfo.transition_latency = transition_latency;
 	policy->dvfs_possible_from_any_cpu = true;
+	dev_pm_opp_of_register_em(policy->cpus);
 	return 0;