cpufreq: mediatek: Use .register_em() to register with energy model
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 10 Aug 2021 06:54:36 +0000 (12:24 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 12 Aug 2021 04:24:07 +0000 (09:54 +0530)
Set the newly added .register_em() callback with
cpufreq_register_em_with_opp() to register with the EM core.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/mediatek-cpufreq.c

index 87019d5..8661638 100644 (file)
@@ -448,8 +448,6 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy)
        policy->driver_data = info;
        policy->clk = info->cpu_clk;
 
-       dev_pm_opp_of_register_em(info->cpu_dev, policy->cpus);
-
        return 0;
 }
 
@@ -471,6 +469,7 @@ static struct cpufreq_driver mtk_cpufreq_driver = {
        .get = cpufreq_generic_get,
        .init = mtk_cpufreq_init,
        .exit = mtk_cpufreq_exit,
+       .register_em = cpufreq_register_em_with_opp,
        .name = "mtk-cpufreq",
        .attr = cpufreq_generic_attr,
 };