]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
cpufreq: OMAP: Register an Energy Model
authorYangtao Li <tiny.windzz@gmail.com>
Thu, 7 Feb 2019 04:35:50 +0000 (23:35 -0500)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 7 Feb 2019 04:37:36 +0000 (10:07 +0530)
Try and register an Energy Model from omap-cpufreq.c to allow
interested subsystems like the task scheduler to use the provided
information.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/omap-cpufreq.c

index 71e81bbf031b22cdc0ca6a227102ffeb7f01271f..68052b74d28fcfc80e6cce5e8c67f2233b18f454 100644 (file)
@@ -133,8 +133,10 @@ static int omap_cpu_init(struct cpufreq_policy *policy)
 
        /* FIXME: what's the actual transition time? */
        result = cpufreq_generic_init(policy, freq_table, 300 * 1000);
-       if (!result)
+       if (!result) {
+               dev_pm_opp_of_register_em(policy->cpus);
                return 0;
+       }
 
        freq_table_free();
 fail: