All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Donnefort <vincent.donnefort@arm.com>,
	lukasz.luba@arm.com, Kevin Hilman <khilman@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] cpufreq: omap: Use auto-registration for energy model
Date: Tue, 10 Aug 2021 13:06:52 +0530	[thread overview]
Message-ID: <a17b0f64c3a4cd84a126b3315539c13b15b4738c.1628579170.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1628579170.git.viresh.kumar@linaro.org>

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/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,
-- 
2.31.1.272.g89b43f80a514


  parent reply	other threads:[~2021-08-10  7:37 UTC|newest]

Thread overview: 91+ 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 ` Viresh Kumar
2021-08-10  7:36 ` Viresh Kumar
2021-08-10  7:36 ` [PATCH 1/8] cpufreq: Auto-register with energy model if asked Viresh Kumar
2021-08-10  9:36   ` Lukasz Luba
2021-08-10  9:38     ` Viresh Kumar
2021-08-10 15:33       ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 2/8] cpufreq: dt: Use auto-registration for energy model Viresh Kumar
2021-08-10 10:19   ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 3/8] cpufreq: imx6q: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:20   ` Lukasz Luba
2021-08-10 10:20     ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 4/8] cpufreq: mediatek: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:20   ` Lukasz Luba
2021-08-10 10:20     ` Lukasz Luba
2021-08-10 10:20     ` Lukasz Luba
2021-08-10  7:36 ` Viresh Kumar [this message]
2021-08-10 10:24   ` [PATCH 5/8] cpufreq: omap: " Lukasz Luba
2021-08-10  7:36 ` [PATCH 6/8] cpufreq: qcom-cpufreq-hw: " Viresh Kumar
2021-08-10 10:26   ` Lukasz Luba
2021-08-10  7:36 ` [PATCH 7/8] cpufreq: scpi: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:27   ` Lukasz Luba
2021-08-10 10:27     ` Lukasz Luba
2021-08-11  2:40   ` Sudeep Holla
2021-08-11  2:40     ` Sudeep Holla
2021-08-10  7:36 ` [PATCH 8/8] cpufreq: vexpress: " Viresh Kumar
2021-08-10  7:36   ` Viresh Kumar
2021-08-10 10:05   ` Lukasz Luba
2021-08-10 10:05     ` Lukasz Luba
2021-08-10 10:06     ` Viresh Kumar
2021-08-10 10:06       ` Viresh Kumar
2021-08-10 10:11       ` Lukasz Luba
2021-08-10 10:11         ` Lukasz Luba
2021-08-10 10:12         ` Viresh Kumar
2021-08-10 10:12           ` Viresh Kumar
2021-08-10 10:30   ` Lukasz Luba
2021-08-10 10:30     ` Lukasz Luba
2021-08-11  2:40   ` Sudeep Holla
2021-08-11  2:40     ` Sudeep Holla
2021-08-10  9:17 ` [PATCH 0/8] cpufreq: Auto-register with " Lukasz Luba
2021-08-10  9:17   ` Lukasz Luba
2021-08-10  9:17   ` Lukasz Luba
2021-08-10  9:27   ` Viresh Kumar
2021-08-10  9:27     ` Viresh Kumar
2021-08-10  9:27     ` Viresh Kumar
2021-08-10  9:35     ` Lukasz Luba
2021-08-10  9:35       ` Lukasz Luba
2021-08-10  9:35       ` Lukasz Luba
2021-08-10 12:35 ` Quentin Perret
2021-08-10 12:35   ` Quentin Perret
2021-08-10 12:35   ` Quentin Perret
2021-08-10 13:25   ` Lukasz Luba
2021-08-10 13:25     ` Lukasz Luba
2021-08-10 13:25     ` Lukasz Luba
2021-08-10 13:53     ` Quentin Perret
2021-08-10 13:53       ` Quentin Perret
2021-08-10 13:53       ` Quentin Perret
2021-08-11  5:18   ` Viresh Kumar
2021-08-11  5:18     ` Viresh Kumar
2021-08-11  5:18     ` Viresh Kumar
2021-08-11  5:34     ` Viresh Kumar
2021-08-11  5:34       ` Viresh Kumar
2021-08-11  5:34       ` Viresh Kumar
2021-08-11  9:48       ` Quentin Perret
2021-08-11  9:48         ` Quentin Perret
2021-08-11  9:48         ` Quentin Perret
2021-08-11  9:53         ` Viresh Kumar
2021-08-11  9:53           ` Viresh Kumar
2021-08-11  9:53           ` Viresh Kumar
2021-08-11 10:12           ` Quentin Perret
2021-08-11 10:12             ` Quentin Perret
2021-08-11 10:12             ` Quentin Perret
2021-08-11 10:14             ` Viresh Kumar
2021-08-11 10:14               ` Viresh Kumar
2021-08-11 10:14               ` Viresh Kumar
2021-08-11  8:37     ` Quentin Perret
2021-08-11  8:37       ` Quentin Perret
2021-08-11  8:37       ` Quentin Perret
2021-08-11  9:13       ` Viresh Kumar
2021-08-11  9:13         ` Viresh Kumar
2021-08-11  9:13         ` Viresh Kumar
2021-08-11  9:34         ` Quentin Perret
2021-08-11  9:34           ` Quentin Perret
2021-08-11  9:34           ` Quentin Perret
2021-08-11  9:36           ` Viresh Kumar
2021-08-11  9:36             ` Viresh Kumar
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=a17b0f64c3a4cd84a126b3315539c13b15b4738c.1628579170.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=vincent.donnefort@arm.com \
    --cc=vincent.guittot@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.