devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	devicetree-discuss@lists.ozlabs.org, wni@nvidia.com,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	lm-sensors@lm-sensors.org, l.stach@pengutronix.de
Subject: Re: [lm-sensors] [RESEND PATCH V1 0/9] thermal: introduce DT thermal zone build
Date: Fri, 19 Jul 2013 09:38:04 -0400	[thread overview]
Message-ID: <51E9413C.2080007@ti.com> (raw)
In-Reply-To: <20130718211154.GB4110@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 7366 bytes --]

On 18-07-2013 17:11, Guenter Roeck wrote:
> On Thu, Jul 18, 2013 at 09:53:05AM -0400, Eduardo Valentin wrote:
>> Hello Guenter,
>>
>> On 17-07-2013 18:09, Guenter Roeck wrote:
>>> On Wed, Jul 17, 2013 at 11:17:19AM -0400, Eduardo Valentin wrote:
>>>> Hello all,
>>>>
>>>> As you noticed, I am working in a way to represent thermal data
>>>> using device tree [1]. Essentially, this should be a way to say
>>>> what to do with a sensor and how to associate (cooling) actions
>>>> with it.
>>>>
>>> Seems to me that goes way beyond the supposed scope of devicetree data.
>>> Devicetree data is supposed to describe hardware, not its configuration or use.
>>> This is clearly a use case.
>>
>> Thanks for rising your voice here. It is important to know what hwmon
>> ppl think about this.
>>
> Sorry, I don't know what ppl stands for.
> 
>>>
>>> Guenter
>>
>> As your answers to the series are giving same argument, I chose to
>> answer on patch 0. I would be happier if you could elaborate a bit more
>> on your concern, specially if you take hwmon cap here, and give your
>> view with that perspective.
>>
>> I also considered that this work could be abusing of DT purposes. But
>> let me explain why I still think it makes sense to have it.
>>
> Ultimately, you are making my point here. If you considered it, did you ask
> devicetree experts for an opinion ? Did you discuss the subject on the
> devicetree-discuss mailing list ? If so, what was the result ?

Although I have asked, I didn't get any feedback.
https://lkml.org/lkml/2013/4/11/760

But now I am requesting feedback in a formal (patch) way.

Consider this patch series as official request for (devicetree experts
and everyone involved) opinions.

> 
>> First thing is that this series intend to describe the thermal data
>> required for a specific board. That means, considering your board
>> layout, mechanics, power dissipation and composition of your ICs, etc,
>> that will impose thermal requirements on your system. That is not
>> configuration, but part of your board design and non-functional
>> requirement. To me, configuration would be something like saying you
>> want to use a specific keyboard layout, or defining your wifi card
>> channel, or display size, etc.
>>
>> Here what is described and setup may get confused with configuration,
>> but it is not because what goes in DT in this case must be actually
>> derived from your HW needs. Putting a sensor  close to your battery has
>> a strong meaning behind. Same if you put a sensor close to your
>> processor. For instance, we have cases we need to consider external heat
>> in order to properly determine our CPU hotspot level, using a board
>> sensor. That is what I mean by HW requirement/need.
>>
>> Again, just to refresh our minds, this is about protecting your board
>> and ICs from operating out of their spec and extending their lifetime.
>> This is not about configuring something just because user has chosen to.
>> That is definitely not a configuration.
>>
>> Being a use case, well, these new DT nodes can still be seen as a use
>> case, yes. But depends on your understanding of use case. Because a
>> sensor device may be used on different needs, composing different use
>> cases. But still here we are talking about HW needs and composition. And
>> yes, if you take that perspective, there are use cases already described
>> in DT.
>>
>> For instance, just because you use an LDO to power a MMC, does it mean
>> you always will use it to power MMC on all boards. Would that be a use
>> case? And in that example, because your MMC requires 2.8V, if you have a
>> DT property to say that, does it mean it is  configuration? Well, yes,
>> but that is based on HW needs, otherwise it wont operate properly. Same
>> thing here, leave your hw operating out of temperature specs and you
>> will see what is the outcome.
>>
>> Similar example would be cpufreq, or OPPs for opp layer. Defining an OPP
>> in DT could be considered a configuration?  Well in theory yes, one can
>> pick what ever configuration for your (D)PLL then match with a
>> minimalist voltage level. And in theory, a voltage level can sustain
>> more than one frequency level. An OPP is still a virtual concept, and we
>> still describe it in DT. Why? To me is because it is a HW need, because
>> HW folks have actually validated that configuration of PLL (frequency)
>> and voltage level. Sometimes they have even optimized it (for low power
>> consumption for instance), as one may achieve same OPP with different
>> configuration. Then why thermal data, which is again, a 'HW
>> configuration' that has been optimized by HW folks, known to be a HW
>> requirement, cannot be described in DT?
>>
>> Similar argument goes to the fact that one may think this is subsystem
>> specific. Again, describing your OPPs is not OPP layer specific?
>> Besides, one can still read the device tree nodes I have written for
>> describing thermal data and implement the HW requirement elsewhere, if
>> wanted (say in user land). I don't see as subsystem specific.
>>
>> Keep in mind that these very same concepts are actually derived from
>> ACPI specification. They don't come from nowhere. And just because your
>> system does not have ACPI support, does not mean it won't have a need to
>> describe thermal?
>>
>> So, because with this work (i) we are describing something that is
>> required for properly usage of your HW (and not choice of the user),
>> because (ii) same data is used on different specification (that is used
>> on different OSes too), because (iii) you don't need thermal fw to read
>> this data and you could implement the HW requirement elsewhere, because
>> (iv) there are other similar requirements already implemented via DT; I
>> still think this work is within DT scope. And that is based on evidence
>> of existing work not because DT is nice and I would want to use it.
>>
>> Hope that clarifies.
>>
>> Of course it is always welcome to hear ppl opinion. I would be really
>> interested to know what ppl from OF think about this topic.
>>
> Yes, me too, or more widely the devicetree community. This is exactly
> why I brought it up.

And that is why I copied them.

> 
>> If still, this does not fit DT, I would like to understand a proper
>> argument. Better than, this is configuration/use case.
>>
> 
> I am not a devicetree expert. One of the complaints by the devicetree
> folks is that much is added to devicetree which should not be there.
> I find this use case questionable. Maybe I am wrong and it isn't,

ok..

> which may well be. But you thought about it as well, so I don't think
> I am that far off track.

Well, what I meant was more like, yes, I considered DT requirements
before writing this code.

> 
> This needs to be discussed and determined by devicetree experts, not me.
> I'll be happy with your patch series if you get an agreement or an Ack
> by the devicetree maintainer for your patch series.

Ok. Thanks for your review and taking the time to express your judgment,
Guenter. Let s wait for Grant and dt folks to express their too.

> 
> Guenter
> 
> 


-- 
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]

  reply	other threads:[~2013-07-19 13:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 15:17 [RESEND PATCH V1 0/9] thermal: introduce DT thermal zone build Eduardo Valentin
2013-07-17 15:17 ` [RESEND PATCH V1 1/9] cpufreq: cpufreq-cpu0: add dt node parsing for 'needs-cooling' Eduardo Valentin
2013-07-25 23:28   ` Rafael J. Wysocki
2013-07-26 13:27     ` Eduardo Valentin
2013-07-17 15:17 ` [RESEND PATCH V1 2/9] thermal: hwmon: move hwmon support to single file Eduardo Valentin
2013-07-17 16:29   ` [lm-sensors] " R, Durgadoss
2013-07-17 15:17 ` [RESEND PATCH V1 3/9] thermal: thermal_core: allow binding with limits on bind_params Eduardo Valentin
2013-07-17 16:25   ` [lm-sensors] " R, Durgadoss
2013-07-17 15:17 ` [RESEND PATCH V1 4/9] arm: dts: flag omap4430 with needs-cooling for cpu node Eduardo Valentin
2013-07-17 15:17 ` [RESEND PATCH V1 5/9] thermal: introduce device tree parser Eduardo Valentin
2013-07-17 15:17 ` [RESEND PATCH V1 6/9] thermal: ti-soc-thermal: use thermal DT infrastructure Eduardo Valentin
2013-07-17 15:17 ` [RESEND PATCH V1 7/9] arm: dts: add omap4430 thermal data Eduardo Valentin
2013-07-17 15:17 ` [RESEND PATCH V1 8/9] hwmon: lm75: expose to thermal fw via DT nodes Eduardo Valentin
2013-07-18  5:33   ` Wei Ni
2013-07-18 13:12     ` Eduardo Valentin
2013-07-19  7:43       ` Wei Ni
2013-07-18  7:22   ` Guenter Roeck
2013-07-17 15:17 ` [RESEND PATCH V1 9/9] hwmon: tmp102: " Eduardo Valentin
2013-07-18  7:23   ` Guenter Roeck
2013-07-17 22:09 ` [lm-sensors] [RESEND PATCH V1 0/9] thermal: introduce DT thermal zone build Guenter Roeck
2013-07-18 13:53   ` Eduardo Valentin
2013-07-18 17:18     ` Stephen Warren
2013-07-18 21:21       ` Guenter Roeck
2013-07-19 13:03         ` Eduardo Valentin
2013-07-19 18:48         ` Stephen Warren
     [not found]           ` <51E98A07.4050402-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-21 11:08             ` Guenter Roeck
2013-07-22 19:43               ` Stephen Warren
2013-07-22 21:46                 ` Guenter Roeck
     [not found]     ` <51E7F341.8020508-l0cyMroinI0@public.gmane.org>
2013-07-18 21:11       ` Guenter Roeck
2013-07-19 13:38         ` Eduardo Valentin [this message]
     [not found]           ` <51E9413C.2080007-l0cyMroinI0@public.gmane.org>
2013-07-19 18:45             ` Stephen Warren
2013-07-19 18:56               ` Eduardo Valentin
     [not found]                 ` <51E98BD3.8000307-l0cyMroinI0@public.gmane.org>
2013-07-21 10:14                   ` Guenter Roeck

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=51E9413C.2080007@ti.com \
    --to=eduardo.valentin@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=rob.herring@calxeda.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).