linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kukjin Kim <kgene@kernel.org>
To: 'amit daniel kachhap' <amit.daniel@samsung.com>,
	'Viresh Kumar' <viresh.kumar@linaro.org>
Cc: "'Rafael J. Wysocki'" <rjw@sisk.pl>,
	linaro-kernel@lists.linaro.org, patches@linaro.org,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: RE: [PATCH 19/44] cpufreq: exynos: Use generic cpufreq routines
Date: Mon, 19 Aug 2013 07:00:45 +0900	[thread overview]
Message-ID: <15fe01ce9c5e$6411a560$2c34f020$@org> (raw)
In-Reply-To: <CADGdYn5xkUN8bO19Hbf2S-WcCNUe_TFOONkqyxNUF8QRAnnVzA@mail.gmail.com>

amit daniel kachhap wrote:
> 
> On Sat, Aug 10, 2013 at 12:14 PM, Viresh Kumar <viresh.kumar@linaro.org>
> wrote:
> > Most of the CPUFreq drivers do similar things in .exit() and .verify()
> routines
> > and .attr. So its better if we have generic routines for them which can
> be used
> > by cpufreq drivers then.
> >
> > This patch uses these generic routines for this driver.
> >
> > Cc: Kukjin Kim <kgene.kim@samsung.com>

Looks good.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks,
Kukjin

> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> The consolidation code looks fine,
> Acked-By: Amit Daniel Kachhap <amit.daniel@samsung.com>
> 
> Thanks,
> Amit Daniel
> > ---
> >  drivers/cpufreq/exynos-cpufreq.c     | 23 +++--------------------
> >  drivers/cpufreq/exynos5440-cpufreq.c | 15 ++-------------
> >  2 files changed, 5 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-
> cpufreq.c
> > index 71c4926..7663a96 100644
> > --- a/drivers/cpufreq/exynos-cpufreq.c
> > +++ b/drivers/cpufreq/exynos-cpufreq.c
> > @@ -31,12 +31,6 @@ static unsigned int locking_frequency;
> >  static bool frequency_locked;
> >  static DEFINE_MUTEX(cpufreq_lock);
> >
> > -static int exynos_verify_speed(struct cpufreq_policy *policy)
> > -{
> > -       return cpufreq_frequency_table_verify(policy,
> > -                                             exynos_info->freq_table);
> > -}
> > -
> >  static unsigned int exynos_getspeed(unsigned int cpu)
> >  {
> >         return clk_get_rate(exynos_info->cpu_clk) / 1000;
> > @@ -257,26 +251,15 @@ static int exynos_cpufreq_cpu_init(struct
> cpufreq_policy *policy)
> >         return cpufreq_table_validate_and_show(policy, exynos_info-
> >freq_table);
> >  }
> >
> > -static int exynos_cpufreq_cpu_exit(struct cpufreq_policy *policy)
> > -{
> > -       cpufreq_frequency_table_put_attr(policy->cpu);
> > -       return 0;
> > -}
> > -
> > -static struct freq_attr *exynos_cpufreq_attr[] = {
> > -       &cpufreq_freq_attr_scaling_available_freqs,
> > -       NULL,
> > -};
> > -
> >  static struct cpufreq_driver exynos_driver = {
> >         .flags          = CPUFREQ_STICKY,
> > -       .verify         = exynos_verify_speed,
> > +       .verify         = cpufreq_generic_frequency_table_verify,
> >         .target         = exynos_target,
> >         .get            = exynos_getspeed,
> >         .init           = exynos_cpufreq_cpu_init,
> > -       .exit           = exynos_cpufreq_cpu_exit,
> > +       .exit           = cpufreq_generic_exit,
> >         .name           = "exynos_cpufreq",
> > -       .attr           = exynos_cpufreq_attr,
> > +       .attr           = cpufreq_generic_attr,
> >  #ifdef CONFIG_PM
> >         .suspend        = exynos_cpufreq_suspend,
> >         .resume         = exynos_cpufreq_resume,
> > diff --git a/drivers/cpufreq/exynos5440-cpufreq.c
> b/drivers/cpufreq/exynos5440-cpufreq.c
> > index b9dfc91..f139b3b 100644
> > --- a/drivers/cpufreq/exynos5440-cpufreq.c
> > +++ b/drivers/cpufreq/exynos5440-cpufreq.c
> > @@ -209,12 +209,6 @@ static void exynos_enable_dvfs(void)
> >                                 dvfs_info->base + XMU_DVFS_CTRL);
> >  }
> >
> > -static int exynos_verify_speed(struct cpufreq_policy *policy)
> > -{
> > -       return cpufreq_frequency_table_verify(policy,
> > -                                             dvfs_info->freq_table);
> > -}
> > -
> >  static unsigned int exynos_getspeed(unsigned int cpu)
> >  {
> >         return dvfs_info->cur_frequency;
> > @@ -336,18 +330,13 @@ static int exynos_cpufreq_cpu_init(struct
> cpufreq_policy *policy)
> >         return 0;
> >  }
> >
> > -static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
> > -{
> > -       cpufreq_frequency_table_put_attr(policy->cpu);
> > -}
> > -
> >  static struct cpufreq_driver exynos_driver = {
> >         .flags          = CPUFREQ_STICKY,
> > -       .verify         = exynos_verify_speed,
> > +       .verify         = cpufreq_generic_frequency_table_verify,
> >         .target         = exynos_target,
> >         .get            = exynos_getspeed,
> >         .init           = exynos_cpufreq_cpu_init,
> > -       .exit           = exynos_cpufreq_cpu_exit,
> > +       .exit           = cpufreq_generic_exit,
> >         .name           = CPUFREQ_NAME,
> >  };
> >
> > --
> > 1.7.12.rc2.18.g61b472e


  reply	other threads:[~2013-08-18 22:00 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-10  6:43 [PATCH 00/44] cpufreq: define generic routines for cpufreq drivers: for 3.13 Viresh Kumar
2013-08-10  6:43 ` [PATCH 01/44] cpufreq: arm_big_little: call cpufreq_frequency_table_put_attr() Viresh Kumar
2013-08-10  6:43 ` [PATCH 02/44] cpufreq: blackfin: " Viresh Kumar
2013-08-10  6:43 ` [PATCH 03/44] cpufreq: exynos: " Viresh Kumar
2013-08-12  6:18   ` Viresh Kumar
2013-08-18 10:00   ` amit daniel kachhap
2013-08-18 21:59     ` Kukjin Kim
2013-08-10  6:44 ` [PATCH 04/44] cpufreq: loongson2: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 05/44] cpufreq: omap: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 06/44] cpufreq: pxa: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 07/44] cpufreq: sparc: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 08/44] cpufreq: define generic .attr, .exit() and .verify() routines Viresh Kumar
2013-08-10  6:44 ` [PATCH 09/44] cpufreq: acpi: Use generic cpufreq routines Viresh Kumar
2013-08-10  6:44 ` [PATCH 10/44] cpufreq: arm_big_little: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 11/44] cpufreq: at32ap: " Viresh Kumar
2013-08-10  8:23   ` Hans-Christian Egtvedt
2013-08-12  6:07     ` Viresh Kumar
2013-08-12  7:10       ` Hans-Christian Egtvedt
2013-08-12  7:13         ` Viresh Kumar
2013-08-12  7:30           ` Hans-Christian Egtvedt
2013-08-12  7:39             ` Viresh Kumar
2013-08-12 19:11               ` Hans-Christian Egtvedt
2013-08-13  4:54                 ` Viresh Kumar
2013-08-10  6:44 ` [PATCH 12/44] cpufreq: blackfin: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 13/44] cpufreq: cpu0: " Viresh Kumar
2013-08-12  7:58   ` Shawn Guo
2013-08-10  6:44 ` [PATCH 14/44] cpufreq: cris: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 15/44] cpufreq: davinci: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 16/44] cpufreq: dbx500: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 17/44] cpufreq: e_powersaver: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 18/44] cpufreq: elanfreq: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 19/44] cpufreq: exynos: " Viresh Kumar
2013-08-18 10:03   ` amit daniel kachhap
2013-08-18 22:00     ` Kukjin Kim [this message]
2013-08-10  6:44 ` [PATCH 20/44] cpufreq: ia64-acpi: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 21/44] cpufreq: imx6q: " Viresh Kumar
2013-08-12  7:58   ` Shawn Guo
2013-08-12  8:10     ` Viresh Kumar
2013-08-12  8:34       ` Shawn Guo
2013-08-10  6:44 ` [PATCH 22/44] cpufreq: kirkwood: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 23/44] cpufreq: longhaul: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 24/44] cpufreq: loongson2: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 25/44] cpufreq: maple: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 26/44] cpufreq: omap: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 27/44] cpufreq: p4-clockmod: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 28/44] cpufreq: pasemi: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 29/44] cpufreq: pcc: " Viresh Kumar
2013-08-12  6:08   ` Viresh Kumar
2013-08-10  6:44 ` [PATCH 30/44] cpufreq: pmac: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 31/44] cpufreq: powernow: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 32/44] cpufreq: ppc-corenet: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 33/44] cpufreq: ppc_cbe: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 34/44] cpufreq: pxa: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 35/44] cpufreq: s3cx4xx: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 36/44] cpufreq: s5pv210: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 37/44] cpufreq: sc520: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 38/44] cpufreq: sh: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 39/44] cpufreq: sparc: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 40/44] cpufreq: spear: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 41/44] cpufreq: speedstep: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 42/44] cpufreq: tegra: " Viresh Kumar
2013-08-10  6:44 ` [PATCH 43/44] cpufreq: unicore2: " Viresh Kumar
2013-08-12  6:08   ` Viresh Kumar
2013-08-10  6:44 ` [PATCH 44/44] cpufreq: pass suitable index instead of freq to cpufreq_driver->target() Viresh Kumar
2013-08-10  7:45   ` Viresh Kumar
2013-08-12  6:50   ` Viresh Kumar
2013-08-10  7:46 ` [PATCH 00/44] cpufreq: define generic routines for cpufreq drivers: for 3.13 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='15fe01ce9c5e$6411a560$2c34f020$@org' \
    --to=kgene@kernel.org \
    --cc=amit.daniel@samsung.com \
    --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 \
    --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;
as well as URLs for NNTP newsgroup(s).