[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68aa4250-da98-e70a-2850-03d97f768b2c@arm.com>
Date: Tue, 10 Aug 2021 11:26:25 +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>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/8] cpufreq: qcom-cpufreq-hw: 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/qcom-cpufreq-hw.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index f86859bf76f1..221433c6dcb0 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -362,8 +362,6 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
> goto error;
> }
>
> - dev_pm_opp_of_register_em(cpu_dev, policy->cpus);
> -
> if (policy_has_boost_freq(policy)) {
> ret = cpufreq_enable_boost_support();
> if (ret)
> @@ -406,7 +404,8 @@ static struct freq_attr *qcom_cpufreq_hw_attr[] = {
> static struct cpufreq_driver cpufreq_qcom_hw_driver = {
> .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK |
> CPUFREQ_HAVE_GOVERNOR_PER_POLICY |
> - CPUFREQ_IS_COOLING_DEV,
> + CPUFREQ_IS_COOLING_DEV |
> + CPUFREQ_REGISTER_WITH_EM,
> .verify = cpufreq_generic_frequency_table_verify,
> .target_index = qcom_cpufreq_hw_target_index,
> .get = qcom_cpufreq_hw_get,
>
Reviewed-by: Lukasz Luba <lukasz.luba@....com>
Powered by blists - more mailing lists