[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1d23a96-d9af-7151-3023-c279f6b0c970@arm.com>
Date: Tue, 10 Aug 2021 11:24:53 +0100
From: Lukasz Luba <lukasz.luba@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Rafael Wysocki <rjw@...ysocki.net>,
Vincent Donnefort <vincent.donnefort@....com>,
Kevin Hilman <khilman@...nel.org>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/8] cpufreq: omap: Use auto-registration for energy model
On 8/10/21 8:36 AM, Viresh Kumar wrote:
> Use the CPUFREQ_REGISTER_WITH_EM flag to allow cpufreq core to
> automatically register with the energy model.
>
> This allows removal of boiler plate code from the driver and fixes the
> unregistration part as well.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
> drivers/cpufreq/omap-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
> index e035ee216b0f..303136f97773 100644
> --- a/drivers/cpufreq/omap-cpufreq.c
> +++ b/drivers/cpufreq/omap-cpufreq.c
> @@ -131,7 +131,6 @@ static int omap_cpu_init(struct cpufreq_policy *policy)
>
> /* FIXME: what's the actual transition time? */
> cpufreq_generic_init(policy, freq_table, 300 * 1000);
> - dev_pm_opp_of_register_em(mpu_dev, policy->cpus);
>
> return 0;
> }
> @@ -144,7 +143,8 @@ static int omap_cpu_exit(struct cpufreq_policy *policy)
> }
>
> static struct cpufreq_driver omap_driver = {
> - .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK,
> + .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK |
> + CPUFREQ_REGISTER_WITH_EM,
> .verify = cpufreq_generic_frequency_table_verify,
> .target_index = omap_target,
> .get = cpufreq_generic_get,
>
Reviewed-by: Lukasz Luba <lukasz.luba@....com>
Powered by blists - more mailing lists