From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Nishanth Menon <nm@ti.com>, Rob Herring <rob.herring@linaro.org>,
Abhilash Kesavan <kesavan.abhilash@gmail.com>,
Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
Thomas Abraham <ta.omasab@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Chander Kashyap <k.chander@samsung.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Rafael Wysocki <rjw@rjwysocki.net>,
Sudeep Holla <Sudeep.Holla@arm.com>,
"olof@lixom.net" <olof@lixom.net>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
Mike Turquette <mike.turquette@linaro.org>,
santosh shilimkar <santosh.shilimkar@oracle.com>,
Grant Likely <grant.likely@linaro.org>,
Arnd Bergmann <arnd.bergmann@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers
Date: Mon, 01 Dec 2014 15:05:57 +0100 [thread overview]
Message-ID: <5607434.rlEIdu4yyh@wuerfel> (raw)
In-Reply-To: <CAKohpo=EPOH-WJ4mmAr-1BzzAEpvC-F0Y99Ox_yL7meUcRNx6Q@mail.gmail.com>
On Monday 01 December 2014 18:59:20 Viresh Kumar wrote:
> On 1 December 2014 at 18:24, Arnd Bergmann <arnd@arndb.de> wrote:
> > Thanks a lot for working on this, we really need to figure it out one day!
>
> :)
>
> > Your patches seem well-implemented, so if everybody thinks the general
> > approach is the best solution, we should do that. From my point of view,
> > there are two things I would do differently:
> >
> > - In the DT binding, I would strongly prefer anything but the root compatible
> > property as the key for the new platforms. Clearly we have to keep using
> > it for the backwards-compatibility case, as you do, but I think there
> > are more appropriate places to put it. Sorting from most favorite to least
> > favorite, my list would be:
> > 1. a new property in /cpus/
> > 2. a new property each /cpus/cpu@... node.
>
> I did it this way earlier and named it dvfs-method but probably putting this
> into the /cpus/ node is far better. But then Sudeep asked to utilize
> compatible property only..
>
> Are you fine with the name here? "dvfs-method"
No objection here, whatever makes sense to you.
> > +static bool dt_cpufreq_available(void)
> > +{
> > + struct device_node *node;
> > + bool ret;
> > +
> > + node = of_find_node_by_path("/cpus");
> > + if (!node)
> > + return 0;
> > +
> > + /* the specific property needs to be debated */
> > + ret = of_property_read_bool("linux,cpu-frequency-scaling");
>
> How can this be a bool? We need to differentiate on which binding
> wants to go for arm-bl or cupfreq-dt or any other driver. So we surely
> need a string ?
I guess a string would be better here, the idea here was to
have a different bool property per driver, which would also
work.
> > @@ -367,29 +404,19 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
> > if (!IS_ERR(cpu_reg))
> > regulator_put(cpu_reg);
> >
> > - dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev);
> > -
>
> We still need this, and its about how clocks are shared between CPUs.
I didn't see where this comes from. Who is setting up this platform
data?
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers
Date: Mon, 01 Dec 2014 15:05:57 +0100 [thread overview]
Message-ID: <5607434.rlEIdu4yyh@wuerfel> (raw)
In-Reply-To: <CAKohpo=EPOH-WJ4mmAr-1BzzAEpvC-F0Y99Ox_yL7meUcRNx6Q@mail.gmail.com>
On Monday 01 December 2014 18:59:20 Viresh Kumar wrote:
> On 1 December 2014 at 18:24, Arnd Bergmann <arnd@arndb.de> wrote:
> > Thanks a lot for working on this, we really need to figure it out one day!
>
> :)
>
> > Your patches seem well-implemented, so if everybody thinks the general
> > approach is the best solution, we should do that. From my point of view,
> > there are two things I would do differently:
> >
> > - In the DT binding, I would strongly prefer anything but the root compatible
> > property as the key for the new platforms. Clearly we have to keep using
> > it for the backwards-compatibility case, as you do, but I think there
> > are more appropriate places to put it. Sorting from most favorite to least
> > favorite, my list would be:
> > 1. a new property in /cpus/
> > 2. a new property each /cpus/cpu at ... node.
>
> I did it this way earlier and named it dvfs-method but probably putting this
> into the /cpus/ node is far better. But then Sudeep asked to utilize
> compatible property only..
>
> Are you fine with the name here? "dvfs-method"
No objection here, whatever makes sense to you.
> > +static bool dt_cpufreq_available(void)
> > +{
> > + struct device_node *node;
> > + bool ret;
> > +
> > + node = of_find_node_by_path("/cpus");
> > + if (!node)
> > + return 0;
> > +
> > + /* the specific property needs to be debated */
> > + ret = of_property_read_bool("linux,cpu-frequency-scaling");
>
> How can this be a bool? We need to differentiate on which binding
> wants to go for arm-bl or cupfreq-dt or any other driver. So we surely
> need a string ?
I guess a string would be better here, the idea here was to
have a different bool property per driver, which would also
work.
> > @@ -367,29 +404,19 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
> > if (!IS_ERR(cpu_reg))
> > regulator_put(cpu_reg);
> >
> > - dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev);
> > -
>
> We still need this, and its about how clocks are shared between CPUs.
I didn't see where this comes from. Who is setting up this platform
data?
Arnd
next prev parent reply other threads:[~2014-12-01 14:06 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 11:41 [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 1/8] cpufreq: Reuse "compatible" binding to probe " Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 2/8] cpufreq: Create cpufreq platform-device based on "compatible" from DT Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 3/8] cpufreq: imx: reuse dt_device.c to create cpufreq platform device Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 4/8] cpufreq: mvebu: " Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 5/8] cpufreq: shmobile: " Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 6/8] cpufreq: zynq: " Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 7/8] cpufreq: calxeda: " Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 11:41 ` [RFC V1 8/8] cpufreq: exynos: " Viresh Kumar
2014-12-01 11:41 ` Viresh Kumar
2014-12-01 12:54 ` [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers Arnd Bergmann
2014-12-01 12:54 ` Arnd Bergmann
2014-12-01 13:29 ` Viresh Kumar
2014-12-01 13:29 ` Viresh Kumar
2014-12-01 13:35 ` Sudeep Holla
2014-12-01 13:35 ` Sudeep Holla
2014-12-01 14:11 ` Arnd Bergmann
2014-12-01 14:11 ` Arnd Bergmann
2014-12-01 14:48 ` Viresh Kumar
2014-12-01 14:48 ` Viresh Kumar
2014-12-01 15:07 ` Sudeep Holla
2014-12-01 15:07 ` Sudeep Holla
2014-12-01 16:03 ` Arnd Bergmann
2014-12-01 16:03 ` Arnd Bergmann
2014-12-01 16:56 ` Sudeep Holla
2014-12-01 16:56 ` Sudeep Holla
2014-12-01 14:05 ` Arnd Bergmann [this message]
2014-12-01 14:05 ` Arnd Bergmann
2014-12-01 14:48 ` Viresh Kumar
2014-12-01 14:48 ` Viresh Kumar
2014-12-01 14:59 ` Arnd Bergmann
2014-12-01 14:59 ` Arnd Bergmann
2014-12-02 8:20 ` Thomas Petazzoni
2014-12-02 8:20 ` Thomas Petazzoni
2014-12-01 18:14 ` Rob Herring
2014-12-01 18:14 ` Rob Herring
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=5607434.rlEIdu4yyh@wuerfel \
--to=arnd@arndb.de \
--cc=Lorenzo.Pieralisi@arm.com \
--cc=Sudeep.Holla@arm.com \
--cc=arnd.bergmann@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=k.chander@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=mike.turquette@linaro.org \
--cc=nm@ti.com \
--cc=olof@lixom.net \
--cc=rjw@rjwysocki.net \
--cc=rob.herring@linaro.org \
--cc=santosh.shilimkar@oracle.com \
--cc=sboyd@codeaurora.org \
--cc=ta.omasab@gmail.com \
--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 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.