cpufreq: scpi: Register an Energy Model
authorQuentin Perret <quentin.perret@arm.com>
Mon, 4 Feb 2019 11:09:50 +0000 (11:09 +0000)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 7 Feb 2019 04:25:11 +0000 (09:55 +0530)
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 scpi-cpufreq, 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>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/scpi-cpufreq.c

index 87a98ec77773a965078861a84670e70d37697864..c7e177011cff491654be77ae406179f30d0d3a33 100644 (file)
@@ -170,6 +170,9 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy)
        policy->cpuinfo.transition_latency = latency;
 
        policy->fast_switch_possible = false;
+
+       dev_pm_opp_of_register_em(policy->cpus);
+
        return 0;
 
 out_free_cpufreq_table: