cpufreq: imx6q: Register an Energy Model [Linux 5.1]

cpufreq: imx6q: Register an Energy Model [Linux 5.1]

This Linux kernel change "cpufreq: imx6q: Register an Energy Model" is included in the Linux 5.1 release. This change is authored by Yangtao Li <tiny.windzz [at] gmail.com> on Wed Feb 6 23:34:20 2019 -0500. The commit for this change in Linux stable tree is 3ad63a6 (patch).

cpufreq: imx6q: Register an Energy Model

Try and register an Energy Model from imx6q-cpufreq 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>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/cpufreq/imx6q-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 9fedf62..73bfd5b 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -210,6 +210,7 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
    policy->clk = clks[ARM].clk;
    ret = cpufreq_generic_init(policy, freq_table, transition_latency);
    policy->suspend_freq = max_freq;
+   dev_pm_opp_of_register_em(policy->cpus);

    return ret;
 }

Leave a Reply

Your email address will not be published. Required fields are marked *