From: Rob Herring <robherring2@gmail.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Kevin Hilman <khilman@ti.com>, Nishanth Menon <nm@ti.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Mike Turquette <mturquette@linaro.org>,
devicetree-discuss@lists.ozlabs.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Shilimkar Santosh <santosh.shilimkar@ti.com>,
Richard Zhao <richard.zhao@freescale.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/4] PM / OPP: Initialize OPP table from device tree
Date: Sun, 05 Aug 2012 23:43:04 -0500 [thread overview]
Message-ID: <501F4B58.4020308@gmail.com> (raw)
In-Reply-To: <20120806031916.GC22302@S2101-09.ap.freescale.net>
On 08/05/2012 10:19 PM, Shawn Guo wrote:
> On Sun, Aug 05, 2012 at 09:50:32PM -0500, Rob Herring wrote:
>>> +Properties:
>>> +- operating-points: An array of 3-tuples items, and each item consists
>>
>> 3 tuples?
>>
> It's the case of v1, and I forgot updating it. Thanks for spotting it.
>
>>> + of frequency and voltage like <freq-kHz vol-uV>.
>>> + freq: clock frequency in kHz
>>> + vol: voltage in microvolt
>>
>> Although maybe 3 fields would be good for a flags field? I'm concerned
>> it's a pretty generic name and not very future proof. What about
>> transition times? Not sure how you would represent that as it probably
>> depends on which points you are changing between rather than a property
>> of the opp.
>>
> This is a binding for OPP, which does not define transition times.
>
> As for cpufreq, we only need to represent a possible maximum transition
> latency. The driver will ask regulator subsystem for voltage latency,
> while the clock latency is defined in DT.
>
>> I think this whole function can be written more concisely. Just iterate
>> over the property and avoid the intermediate array allocation.
>>
> I'm not sure about that, since directly iterating over the property
> means we have to take care of all these sanity checks done in API
> of_property_read_u32_array().
>
This won't work?:
of_property_for_each_u32(...) {
if (i & 0x1) {
volt = val;
ret = opp_add(dev, freq, volt);
if (ret)
...
} else
freq = val * 1000;
i++;
}
Rob
next prev parent reply other threads:[~2012-08-06 4:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-05 15:05 [PATCH v2 0/4] Add a generic cpufreq-cpu0 driver Shawn Guo
[not found] ` <1344179121-17738-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-08-05 15:05 ` [PATCH v2 1/4] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp Shawn Guo
2012-08-05 15:05 ` [PATCH v2 2/4] PM / OPP: Initialize OPP table from device tree Shawn Guo
[not found] ` <1344179121-17738-3-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-08-06 2:50 ` Rob Herring
2012-08-06 3:19 ` Shawn Guo
2012-08-06 4:43 ` Rob Herring [this message]
2012-08-06 5:23 ` Shawn Guo
2012-08-05 15:05 ` [PATCH v2 3/4] regulator: add a new API regulator_set_voltage_tol() Shawn Guo
2012-08-08 13:35 ` Mark Brown
2012-08-08 14:30 ` Shawn Guo
2012-08-09 10:53 ` Mark Brown
2012-08-05 15:05 ` [PATCH v2 4/4] cpufreq: Add a generic cpufreq-cpu0 driver Shawn Guo
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=501F4B58.4020308@gmail.com \
--to=robherring2@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cpufreq@vger.kernel.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mturquette@linaro.org \
--cc=nm@ti.com \
--cc=richard.zhao@freescale.com \
--cc=rjw@sisk.pl \
--cc=santosh.shilimkar@ti.com \
--cc=shawn.guo@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).