Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Donnefort <vincent.donnefort@arm.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/8] cpufreq: qcom-cpufreq-hw: Use auto-registration for energy model
Date: Tue, 10 Aug 2021 11:26:25 +0100	[thread overview]
Message-ID: <68aa4250-da98-e70a-2850-03d97f768b2c@arm.com> (raw)
In-Reply-To: <0b0d533988c3a4318b9fdc5e10c857348e203132.1628579170.git.viresh.kumar@linaro.org>



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@linaro.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@arm.com>

  reply	other threads:[~2021-08-10 10:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  7:36 [PATCH 0/8] cpufreq: Auto-register with energy model Viresh Kumar
2021-08-10  7:36 ` [PATCH 6/8] cpufreq: qcom-cpufreq-hw: Use auto-registration for " Viresh Kumar
2021-08-10 10:26   ` Lukasz Luba [this message]
2021-08-10  9:17 ` [PATCH 0/8] cpufreq: Auto-register with " Lukasz Luba
2021-08-10  9:27   ` Viresh Kumar
2021-08-10  9:35     ` Lukasz Luba
2021-08-10 12:35 ` Quentin Perret
2021-08-10 13:25   ` Lukasz Luba
2021-08-10 13:53     ` Quentin Perret
2021-08-11  5:18   ` Viresh Kumar
2021-08-11  5:34     ` Viresh Kumar
2021-08-11  9:48       ` Quentin Perret
2021-08-11  9:53         ` Viresh Kumar
2021-08-11 10:12           ` Quentin Perret
2021-08-11 10:14             ` Viresh Kumar
2021-08-11  8:37     ` Quentin Perret
2021-08-11  9:13       ` Viresh Kumar
2021-08-11  9:34         ` Quentin Perret
2021-08-11  9:36           ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68aa4250-da98-e70a-2850-03d97f768b2c@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=vincent.donnefort@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox