From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] cpufreq: kirkwood: Add a cpufreq driver for Marvell Kirkwood SoCs
Date: Sun, 27 Jan 2013 16:42:12 +0100 [thread overview]
Message-ID: <20130127154212.GJ29973@lunn.ch> (raw)
In-Reply-To: <CAKohpomWM41MhRjdhFixy-ELXc6QjE0BhCAHfTzovOD0CBPoOQ@mail.gmail.com>
On Sun, Jan 27, 2013 at 08:19:56PM +0530, Viresh Kumar wrote:
> On 27 January 2013 15:37, Andrew Lunn <andrew@lunn.ch> wrote:
> > diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
> > +static void kirkwood_cpufreq_set_cpu_state(unsigned int index)
> > +{
>
> > + if (freqs.old != freqs.new) {
>
> > + switch (state) {
> > + case STATE_CPU_FREQ:
> > + clk_disable(priv.powersave_clk);
> > + break;
> > + case STATE_DDR_FREQ:
> > + clk_enable(priv.powersave_clk);
> > + break;
> > + default:
> > + WARN_ON(1);
>
> I still don't feel this case is required :)
O.K, i will take it out.
> > +static struct platform_driver kirkwood_cpufreq_platform_driver = {
> > + .probe = kirkwood_cpufreq_probe,
> > + .remove = kirkwood_cpufreq_remove,
> > + .driver = {
> > + .name = "kirkwood-cpufreq",
> > + .owner = THIS_MODULE,
> > + },
> > +};
>
> Two things. Any reason why you created an extra layer of platform_driver?
> You could have called cpufreq_probe/remove (with names modified) from
> module init/exit.
And how would the module get loaded? There is no hardware anchor to
make the module load. No enumeration of some bus causing it to be
loaded. In the ARM world, platform drivers are the norm.
Andrew
next prev parent reply other threads:[~2013-01-27 15:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 10:07 [PATCH v3 0/3] Kirkwoode cpufreq driver Andrew Lunn
2013-01-27 10:07 ` [PATCH v3 1/3] cpufreq: kirkwood: Add a cpufreq driver for Marvell Kirkwood SoCs Andrew Lunn
2013-01-27 14:49 ` Viresh Kumar
2013-01-27 15:42 ` Andrew Lunn [this message]
2013-01-27 16:03 ` Viresh Kumar
2013-01-27 16:25 ` Andrew Lunn
2013-01-27 16:45 ` Viresh Kumar
2013-01-27 17:17 ` Andrew Lunn
2013-01-28 3:19 ` Viresh Kumar
2013-01-27 17:11 ` Russell King - ARM Linux
2013-01-27 17:23 ` Andrew Lunn
2013-01-28 6:41 ` Shawn Guo
2013-01-27 18:20 ` Andrew Lunn
2013-01-27 10:07 ` [PATCH v3 2/3] arm: kirkwood: Instantiate cpufreq driver Andrew Lunn
2013-05-26 17:59 ` Jason Cooper
2013-01-27 10:07 ` [PATCH v3 3/3] arm: kirkwood: Enable cpufreq and ondemand on kirkwood_defconfig Andrew Lunn
2013-05-26 18:02 ` Jason Cooper
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=20130127154212.GJ29973@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-arm-kernel@lists.infradead.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).