From: Stephen Warren <swarren@wwwdotorg.org>
To: Wei Ni <wni@nvidia.com>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"durgadoss.r@intel.com" <durgadoss.r@intel.com>,
"amit.daniel@samsung.com" <amit.daniel@samsung.com>,
"rui.zhang@intel.com" <rui.zhang@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 2/4] thermal: introduce device tree parser
Date: Wed, 10 Jul 2013 09:16:12 -0600 [thread overview]
Message-ID: <51DD7ABC.2010009@wwwdotorg.org> (raw)
In-Reply-To: <51DD03C8.1090207@nvidia.com>
On 07/10/2013 12:48 AM, Wei Ni wrote:
> On 07/09/2013 10:00 PM, Eduardo Valentin wrote:
>> In order to be able to build thermal policies
>> based on generic sensors, like I2C device, that
>> can be places in different points on different boards,
>> there is a need to have a way to feed board dependent
>> data into the thermal framework.
>>
>> This patch introduces a thermal data parser for device
>> tree. The parsed data is used to build thermal zones
>> and thermal binding parameters. The output data
>> can then be used to deploy thermal policies.
>>
>> This patch adds also documentation regarding this
>> API and how to define define tree nodes to use
>> this infrastructure.
>
> It looks good, with this infrastructure, we can add generic sensor
> driver into the thermal fw easily.
>
>
>> +
>> +Below is an example:
>> +thermal_zone {
>> + type = "CPU";
>> + mask = <0x03>; /* trips writability */
>> + passive_delay = <250>; /* milliseconds */
>> + polling_delay = <1000>; /* milliseconds */
>> + governor = "step_wise";
>> + trips {
>> + alert@100000{
>> + temperature = <100000>; /* milliCelsius */
>> + hysteresis = <0>; /* milliCelsius */
>> + type = <1>;
>
> how about to use the trip type name directly, such as named as
> "passive-trip;", I think it's more readable. for example:
> trip0 {
> ....
> passive-trip;
> }
> trip1 {
> ....
> active-trip;
> }
You can always use the C pre-processor in DT now to define named constants:
include/dt-bindings/..../....h
#define THERMAL_PASSIVE_TRIP 0
#define THERMAL_ACTIVE_TRIP 1
*.dts:
type = <THERMAL_PASSIVE_TRIP>;
Having a single 'property = value;' rather than n different Boolean
property names seems better, irrespective of whether value is an integer
or string; parsing and error-checking will be simpler.
next prev parent reply other threads:[~2013-07-10 15:16 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 14:00 [RFC PATCH 0/4] thermal: introduce DT thermal builder Eduardo Valentin
2013-07-09 14:00 ` [RFC PATCH 1/4] thermal: hwmon: move hwmon support to single file Eduardo Valentin
2013-07-09 16:04 ` R, Durgadoss
2013-07-09 16:54 ` Eduardo Valentin
2013-07-09 17:14 ` R, Durgadoss
2013-07-17 9:49 ` Wei Ni
2013-07-17 10:07 ` R, Durgadoss
2013-08-15 6:21 ` Zhang Rui
2013-07-09 14:00 ` [RFC PATCH 2/4] thermal: introduce device tree parser Eduardo Valentin
2013-07-09 16:14 ` R, Durgadoss
2013-07-17 14:51 ` Eduardo Valentin
2013-07-10 6:48 ` Wei Ni
2013-07-10 15:16 ` Stephen Warren [this message]
2013-07-15 14:30 ` Eduardo Valentin
2013-07-15 11:54 ` Eduardo Valentin
2013-07-15 17:03 ` R, Durgadoss
2013-07-15 17:16 ` Eduardo Valentin
2013-07-09 14:00 ` [RFC PATCH 3/4] thermal: ti-soc-thermal: use thermal DT infrastructure Eduardo Valentin
2013-07-15 12:12 ` Lucas Stach
2013-07-15 12:33 ` Eduardo Valentin
2013-07-15 12:59 ` Lucas Stach
2013-07-15 13:25 ` Eduardo Valentin
2013-07-15 13:36 ` Eduardo Valentin
2013-07-15 13:38 ` Eduardo Valentin
2013-07-15 14:05 ` Lucas Stach
2013-07-15 14:14 ` Eduardo Valentin
2013-07-16 9:54 ` Lucas Stach
2013-07-16 13:29 ` Eduardo Valentin
2013-07-15 13:53 ` Lucas Stach
2013-07-15 14:09 ` Eduardo Valentin
2013-07-09 14:00 ` [RFC PATCH 4/4] arm: dts: add omap4430 thermal data Eduardo Valentin
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=51DD7ABC.2010009@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=amit.daniel@samsung.com \
--cc=durgadoss.r@intel.com \
--cc=eduardo.valentin@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=wni@nvidia.com \
/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).