linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: rjw@sisk.pl
Cc: linaro-kernel@lists.linaro.org, patches@linaro.org,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 29/31] cpufreq: SPEAr: Covert to light weight ->target() routine
Date: Mon, 12 Aug 2013 23:19:05 +0530	[thread overview]
Message-ID: <48a7161dba289f6f98820d6129d82b639f12f3c6.1376329128.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1376329128.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1376329128.git.viresh.kumar@linaro.org>

This patch converts existing .target_old() to newly defined light weight
.target() routine for this driver.

CPUFreq core will call cpufreq_frequency_table_target() before calling this
routine and will pass index to it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/spear-cpufreq.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 31af347..1049917 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -105,20 +105,16 @@ static int spear1340_set_cpu_rate(struct clk *sys_pclk, unsigned long newfreq)
 }
 
 static int spear_cpufreq_target(struct cpufreq_policy *policy,
-		unsigned int target_freq, unsigned int relation)
+		unsigned int index)
 {
 	struct cpufreq_freqs freqs;
 	unsigned long newfreq;
 	struct clk *srcclk;
-	int index, ret, mult = 1;
-
-	if (cpufreq_frequency_table_target(policy, spear_cpufreq.freq_tbl,
-				target_freq, relation, &index))
-		return -EINVAL;
+	int ret, mult = 1;
 
 	freqs.old = spear_cpufreq_get(0);
-
 	newfreq = spear_cpufreq.freq_tbl[index].frequency * 1000;
+
 	if (of_machine_is_compatible("st,spear1340")) {
 		/*
 		 * SPEAr1340 is special in the sense that due to the possibility
@@ -191,7 +187,7 @@ static struct cpufreq_driver spear_cpufreq_driver = {
 	.name		= "cpufreq-spear",
 	.flags		= CPUFREQ_STICKY,
 	.verify		= cpufreq_generic_frequency_table_verify,
-	.target_old	= spear_cpufreq_target,
+	.target		= spear_cpufreq_target,
 	.get		= spear_cpufreq_get,
 	.init		= spear_cpufreq_init,
 	.exit		= cpufreq_generic_exit,
-- 
1.7.12.rc2.18.g61b472e

  parent reply	other threads:[~2013-08-12 17:49 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 17:48 [PATCH 00/31] CPUFreq: Implement light weight ->target(): for 3.13 Viresh Kumar
2013-08-12 17:48 ` [PATCH 01/31] cpufreq: rename ->target() as ->target_old() Viresh Kumar
2013-08-12 17:48 ` [PATCH 02/31] cpufreq: Implement light weight ->target() routine Viresh Kumar
2013-08-12 17:48 ` [PATCH 03/31] cpufreq: acpi: Covert to " Viresh Kumar
2013-08-12 17:48 ` [PATCH 04/31] cpufreq: arm_big_little: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 05/31] cpufreq: blackfin: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 06/31] cpufreq: cpu0: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 07/31] cpufreq: cris: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 08/31] cpufreq: davinci: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 09/31] cpufreq: dbx500: " Viresh Kumar
2013-08-15 19:52   ` Linus Walleij
2013-08-12 17:48 ` [PATCH 10/31] cpufreq: e_powersaver: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 11/31] cpufreq: elanfreq: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 12/31] cpufreq: exynos: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 13/31] cpufreq: ia64: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 14/31] cpufreq: imx6q: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 15/31] cpufreq: kirkwood: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 16/31] cpufreq: longhaul: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 17/31] cpufreq: loongson2: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 18/31] cpufreq: maple: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 19/31] cpufreq: omap: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 20/31] cpufreq: p4: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 21/31] cpufreq: pasemi: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 22/31] cpufreq: pmac32: " Viresh Kumar
2013-08-12 17:48 ` [PATCH 23/31] cpufreq: powernow: " Viresh Kumar
2013-08-12 17:49 ` [PATCH 24/31] cpufreq: ppc: " Viresh Kumar
2013-08-12 17:49 ` [PATCH 25/31] cpufreq: pxa: " Viresh Kumar
2013-08-12 17:49 ` [PATCH 26/31] cpufreq: s3c64xx: " Viresh Kumar
2013-08-12 17:49 ` [PATCH 27/31] cpufreq: sc520: " Viresh Kumar
2013-08-12 17:49 ` [PATCH 28/31] cpufreq: sparc: " Viresh Kumar
2013-08-12 17:49 ` Viresh Kumar [this message]
2013-08-12 17:49 ` [PATCH 30/31] cpufreq: speedstep: " Viresh Kumar
2013-08-12 17:49 ` [PATCH 31/31] cpufreq: tegra: " Viresh Kumar
2013-08-12 22:47 ` [PATCH 00/31] CPUFreq: Implement light weight ->target(): for 3.13 Rafael J. Wysocki
2013-08-13  4:49   ` 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=48a7161dba289f6f98820d6129d82b639f12f3c6.1376329128.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).