linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: thermal: Make cooling-maps property optional
@ 2019-05-15  9:36 Yuantian Tang
  2019-05-24  2:50 ` Eduardo Valentin
  2019-06-04  5:56 ` Andy Tang
  0 siblings, 2 replies; 12+ messages in thread
From: Yuantian Tang @ 2019-05-15  9:36 UTC (permalink / raw)
  To: rui.zhang, edubezval
  Cc: robh+dt, daniel.lezcano, mark.rutland, linux-pm, devicetree,
	linux-kernel, Yuantian Tang

There may be no cooling device on system, or there are no enough
cooling devices for each thermal zone in multiple thermal zone
cases since cooling devices can't be shared.
So make this property optional to remove such limitations.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
---
 .../devicetree/bindings/thermal/thermal.txt        |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index ca14ba9..694e834 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -142,11 +142,11 @@ Required properties:
 - trips:		A sub-node which is a container of only trip point nodes
   Type: sub-node	required to describe the thermal zone.
 
+
+Optional property:
 - cooling-maps:		A sub-node which is a container of only cooling device
   Type: sub-node	map nodes, used to describe the relation between trips
 			and cooling devices.
-
-Optional property:
 - coefficients:		An array of integers (one signed cell) containing
   Type: array		coefficients to compose a linear relation between
   Elem size: one cell	the sensors listed in the thermal-sensors property.
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
  2019-05-15  9:36 [PATCH] dt-bindings: thermal: Make cooling-maps property optional Yuantian Tang
@ 2019-05-24  2:50 ` Eduardo Valentin
  2019-05-24  3:21   ` [EXT] " Andy Tang
  2019-06-04  5:56 ` Andy Tang
  1 sibling, 1 reply; 12+ messages in thread
From: Eduardo Valentin @ 2019-05-24  2:50 UTC (permalink / raw)
  To: Yuantian Tang
  Cc: rui.zhang, robh+dt, daniel.lezcano, mark.rutland, linux-pm,
	devicetree, linux-kernel

On Wed, May 15, 2019 at 05:36:47PM +0800, Yuantian Tang wrote:
> There may be no cooling device on system, or there are no enough
> cooling devices for each thermal zone in multiple thermal zone
> cases since cooling devices can't be shared.
> So make this property optional to remove such limitations.

Yeah, I am  not sure that is enough reason to make this property
optional. Let me maybe ask you why do you care creating a thermal
zone if your control has no actions? Or rather, why bothering
setting up a control that has no actuators?

> 
> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
> ---
>  .../devicetree/bindings/thermal/thermal.txt        |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
> index ca14ba9..694e834 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -142,11 +142,11 @@ Required properties:
>  - trips:		A sub-node which is a container of only trip point nodes
>    Type: sub-node	required to describe the thermal zone.
>  
> +
> +Optional property:
>  - cooling-maps:		A sub-node which is a container of only cooling device
>    Type: sub-node	map nodes, used to describe the relation between trips
>  			and cooling devices.
> -
> -Optional property:
>  - coefficients:		An array of integers (one signed cell) containing
>    Type: array		coefficients to compose a linear relation between
>    Elem size: one cell	the sensors listed in the thermal-sensors property.
> -- 
> 1.7.1
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [EXT] Re: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
  2019-05-24  2:50 ` Eduardo Valentin
@ 2019-05-24  3:21   ` Andy Tang
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Tang @ 2019-05-24  3:21 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: rui.zhang, robh+dt, daniel.lezcano, mark.rutland, linux-pm,
	devicetree, linux-kernel

> -----Original Message-----
> From: Eduardo Valentin <edubezval@gmail.com>
> Sent: 2019年5月24日 10:50
> To: Andy Tang <andy.tang@nxp.com>
> Cc: rui.zhang@intel.com; robh+dt@kernel.org; daniel.lezcano@linaro.org;
> mark.rutland@arm.com; linux-pm@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [EXT] Re: [PATCH] dt-bindings: thermal: Make cooling-maps property
> optional
> 
> Caution: EXT Email
> 
> On Wed, May 15, 2019 at 05:36:47PM +0800, Yuantian Tang wrote:
> > There may be no cooling device on system, or there are no enough
> > cooling devices for each thermal zone in multiple thermal zone cases
> > since cooling devices can't be shared.
> > So make this property optional to remove such limitations.
> 
> Yeah, I am  not sure that is enough reason to make this property optional.
> Let me maybe ask you why do you care creating a thermal zone if your control
> has no actions? Or rather, why bothering setting up a control that has no
> actuators?
No cooling-device map doesn't mean NO ACTIONS. There could be critic trips that trigger CPU reset or shutdown.
The root cause for it here is: there is no enough cooling device for each zone when multiple zone exist.
For example, for our ls2088a platform, there are 7 thermal zones, but we have only one cooling device which is cpufreq.
Due to this option limitation, multiple zones can't be supported.
I believe on most platform, there are only two type of cooling devices, cpufreq and fan. So how many cooling devices it could be?
So making the property optional is reasonable. We can assign cooling devices to certain thermal zones and leave the thermal zone with no cooling device taking default actions.

BR,
Andy
> 
> >
> > Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
> > ---
> >  .../devicetree/bindings/thermal/thermal.txt        |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt
> > b/Documentation/devicetree/bindings/thermal/thermal.txt
> > index ca14ba9..694e834 100644
> > --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> > +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> > @@ -142,11 +142,11 @@ Required properties:
> >  - trips:             A sub-node which is a container of only trip point
> nodes
> >    Type: sub-node     required to describe the thermal zone.
> >
> > +
> > +Optional property:
> >  - cooling-maps:              A sub-node which is a container of only
> cooling device
> >    Type: sub-node     map nodes, used to describe the relation
> between trips
> >                       and cooling devices.
> > -
> > -Optional property:
> >  - coefficients:              An array of integers (one signed cell)
> containing
> >    Type: array                coefficients to compose a linear relation
> between
> >    Elem size: one cell        the sensors listed in the thermal-sensors
> property.
> > --
> > 1.7.1
> >

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
  2019-05-15  9:36 [PATCH] dt-bindings: thermal: Make cooling-maps property optional Yuantian Tang
  2019-05-24  2:50 ` Eduardo Valentin
@ 2019-06-04  5:56 ` Andy Tang
  2019-06-04  6:04   ` Daniel Lezcano
  1 sibling, 1 reply; 12+ messages in thread
From: Andy Tang @ 2019-06-04  5:56 UTC (permalink / raw)
  To: Andy Tang, rui.zhang, edubezval
  Cc: robh+dt, daniel.lezcano, mark.rutland, linux-pm, devicetree,
	linux-kernel

Hi Edubezval, Rui,

Any further comments?

BR,
Andy

> -----Original Message-----
> From: Yuantian Tang <andy.tang@nxp.com>
> Sent: 2019年5月15日 17:37
> To: rui.zhang@intel.com; edubezval@gmail.com
> Cc: robh+dt@kernel.org; daniel.lezcano@linaro.org; mark.rutland@arm.com;
> linux-pm@vger.kernel.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org; Andy Tang <andy.tang@nxp.com>
> Subject: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
> 
> There may be no cooling device on system, or there are no enough cooling
> devices for each thermal zone in multiple thermal zone cases since cooling
> devices can't be shared.
> So make this property optional to remove such limitations.
> 
> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
> ---
>  .../devicetree/bindings/thermal/thermal.txt        |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt
> b/Documentation/devicetree/bindings/thermal/thermal.txt
> index ca14ba9..694e834 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> @@ -142,11 +142,11 @@ Required properties:
>  - trips:		A sub-node which is a container of only trip point nodes
>    Type: sub-node	required to describe the thermal zone.
> 
> +
> +Optional property:
>  - cooling-maps:		A sub-node which is a container of only cooling device
>    Type: sub-node	map nodes, used to describe the relation between
> trips
>  			and cooling devices.
> -
> -Optional property:
>  - coefficients:		An array of integers (one signed cell) containing
>    Type: array		coefficients to compose a linear relation between
>    Elem size: one cell	the sensors listed in the thermal-sensors property.
> --
> 1.7.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
  2019-06-04  5:56 ` Andy Tang
@ 2019-06-04  6:04   ` Daniel Lezcano
  2019-06-24  7:32     ` [EXT] " Andy Tang
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Lezcano @ 2019-06-04  6:04 UTC (permalink / raw)
  To: Andy Tang, rui.zhang, edubezval
  Cc: robh+dt, mark.rutland, linux-pm, devicetree, linux-kernel

On 04/06/2019 07:56, Andy Tang wrote:
> Hi Edubezval, Rui,
> 
> Any further comments?

From my POV, this patch makes sense. We may be interested to show up the
thermal zones in sysfs and optionally mitigate them via an userspace
governor.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

>> -----Original Message-----
>> From: Yuantian Tang <andy.tang@nxp.com>
>> Sent: 2019年5月15日 17:37
>> To: rui.zhang@intel.com; edubezval@gmail.com
>> Cc: robh+dt@kernel.org; daniel.lezcano@linaro.org; mark.rutland@arm.com;
>> linux-pm@vger.kernel.org; devicetree@vger.kernel.org;
>> linux-kernel@vger.kernel.org; Andy Tang <andy.tang@nxp.com>
>> Subject: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
>>
>> There may be no cooling device on system, or there are no enough cooling
>> devices for each thermal zone in multiple thermal zone cases since cooling
>> devices can't be shared.
>> So make this property optional to remove such limitations.
>>
>> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
>> ---
>>  .../devicetree/bindings/thermal/thermal.txt        |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt
>> b/Documentation/devicetree/bindings/thermal/thermal.txt
>> index ca14ba9..694e834 100644
>> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
>> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
>> @@ -142,11 +142,11 @@ Required properties:
>>  - trips:		A sub-node which is a container of only trip point nodes
>>    Type: sub-node	required to describe the thermal zone.
>>
>> +
>> +Optional property:
>>  - cooling-maps:		A sub-node which is a container of only cooling device
>>    Type: sub-node	map nodes, used to describe the relation between
>> trips
>>  			and cooling devices.
>> -
>> -Optional property:
>>  - coefficients:		An array of integers (one signed cell) containing
>>    Type: array		coefficients to compose a linear relation between
>>    Elem size: one cell	the sensors listed in the thermal-sensors property.
>> --
>> 1.7.1
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [EXT] Re: [PATCH] dt-bindings: thermal: Make cooling-maps property optional
  2019-06-04  6:04   ` Daniel Lezcano
@ 2019-06-24  7:32     ` Andy Tang
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Tang @ 2019-06-24  7:32 UTC (permalink / raw)
  To: Daniel Lezcano, rui.zhang, edubezval
  Cc: robh+dt, mark.rutland, linux-pm, devicetree, linux-kernel

Hi Edubezval, Rui,

Are you going to pick up this patch?

BR,
Andy

> -----Original Message-----
> From: Daniel Lezcano <daniel.lezcano@linaro.org>
> Sent: 2019年6月4日 14:04
> To: Andy Tang <andy.tang@nxp.com>; rui.zhang@intel.com;
> edubezval@gmail.com
> Cc: robh+dt@kernel.org; mark.rutland@arm.com; linux-pm@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [EXT] Re: [PATCH] dt-bindings: thermal: Make cooling-maps property
> optional
> 
> Caution: EXT Email
> 
> On 04/06/2019 07:56, Andy Tang wrote:
> > Hi Edubezval, Rui,
> >
> > Any further comments?
> 
> From my POV, this patch makes sense. We may be interested to show up the
> thermal zones in sysfs and optionally mitigate them via an userspace
> governor.
> 
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> >> -----Original Message-----
> >> From: Yuantian Tang <andy.tang@nxp.com>
> >> Sent: 2019年5月15日 17:37
> >> To: rui.zhang@intel.com; edubezval@gmail.com
> >> Cc: robh+dt@kernel.org; daniel.lezcano@linaro.org;
> >> mark.rutland@arm.com; linux-pm@vger.kernel.org;
> >> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Andy Tang
> >> <andy.tang@nxp.com>
> >> Subject: [PATCH] dt-bindings: thermal: Make cooling-maps property
> >> optional
> >>
> >> There may be no cooling device on system, or there are no enough
> >> cooling devices for each thermal zone in multiple thermal zone cases
> >> since cooling devices can't be shared.
> >> So make this property optional to remove such limitations.
> >>
> >> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
> >> ---
> >>  .../devicetree/bindings/thermal/thermal.txt        |    4 ++--
> >>  1 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt
> >> b/Documentation/devicetree/bindings/thermal/thermal.txt
> >> index ca14ba9..694e834 100644
> >> --- a/Documentation/devicetree/bindings/thermal/thermal.txt
> >> +++ b/Documentation/devicetree/bindings/thermal/thermal.txt
> >> @@ -142,11 +142,11 @@ Required properties:
> >>  - trips:            A sub-node which is a container of only trip point
> nodes
> >>    Type: sub-node    required to describe the thermal zone.
> >>
> >> +
> >> +Optional property:
> >>  - cooling-maps:             A sub-node which is a container of only
> cooling device
> >>    Type: sub-node    map nodes, used to describe the relation
> between
> >> trips
> >>                      and cooling devices.
> >> -
> >> -Optional property:
> >>  - coefficients:             An array of integers (one signed cell)
> containing
> >>    Type: array               coefficients to compose a linear relation
> between
> >>    Elem size: one cell       the sensors listed in the thermal-sensors
> property.
> >> --
> >> 1.7.1
> >
> 
> 
> --
> 
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> linaro.org%2F&amp;data=02%7C01%7Candy.tang%40nxp.com%7C2287a987
> 116c4240ed8408d6e8b27b81%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C
> 0%7C0%7C636952250606346540&amp;sdata=D8XH3corlkEU91u7FguNtCF8
> hkzR8viNntDQ4NjF9OM%3D&amp;reserved=0> Linaro.org │ Open source
> software for ARM SoCs
> 
> Follow Linaro:
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> facebook.com%2Fpages%2FLinaro&amp;data=02%7C01%7Candy.tang%40nx
> p.com%7C2287a987116c4240ed8408d6e8b27b81%7C686ea1d3bc2b4c6fa92
> cd99c5c301635%7C0%7C0%7C636952250606356528&amp;sdata=hRuvmW
> %2BrQ61tDEy7XIHKhTaTqxL%2FJC6gRy29YgsEazk%3D&amp;reserved=0>
> Facebook |
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftwitte
> r.com%2F%23!%2Flinaroorg&amp;data=02%7C01%7Candy.tang%40nxp.com
> %7C2287a987116c4240ed8408d6e8b27b81%7C686ea1d3bc2b4c6fa92cd99c
> 5c301635%7C0%7C0%7C636952250606356528&amp;sdata=j6yO88tkG0uQs
> ViSV%2F9SCOYLa3iJ6pXs8mqxs6qt4uA%3D&amp;reserved=0> Twitter |
> <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> linaro.org%2Flinaro-blog%2F&amp;data=02%7C01%7Candy.tang%40nxp.co
> m%7C2287a987116c4240ed8408d6e8b27b81%7C686ea1d3bc2b4c6fa92cd99
> c5c301635%7C0%7C0%7C636952250606356528&amp;sdata=q9tOF%2FiOL6
> GpdvpSiT%2FyFIFL33Dx0%2FuBBaOxcmdD1Ro%3D&amp;reserved=0> Blog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional
  2020-03-25  6:37     ` Amit Kucheria
@ 2020-03-25  9:08       ` Daniel Lezcano
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Lezcano @ 2020-03-25  9:08 UTC (permalink / raw)
  To: Amit Kucheria
  Cc: Yuantian Tang, Zhang Rui, Linux PM list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

On 25/03/2020 07:37, Amit Kucheria wrote:
> On Mon, Mar 16, 2020 at 9:43 PM Amit Kucheria <amit.kucheria@linaro.org> wrote:
>>
>> On Mon, Mar 16, 2020 at 8:22 PM Daniel Lezcano
>> <daniel.lezcano@linaro.org> wrote:
>>>
>>> On 09/03/2020 05:54, andy.tang@nxp.com wrote:
>>>> From: Yuantian Tang <andy.tang@nxp.com>
>>>>
>>>> Cooling-maps doesn't have to be a required property because there may
>>>> be no cooling device on system, or there are no enough cooling devices for
>>>> each thermal zone in multiple thermal zone cases since cooling devices
>>>> can't be shared.
>>>> So make this property optional to remove such limitations.
>>>>
>>>> For thermal zones with no cooling-maps, there could be critic trips
>>>> that can trigger CPU reset or shutdown. So they still can take actions.
>>>>
>>>> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
>>
>> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
>>
>>>
>>> Amit, I'm about to pick this patch, it will collide with the yaml
>>> conversion changes.
>>
>> Thanks for the headsup. I can fixup v3 when I respin.
>>
>> However, I've always interpreted this binding as follows:
>> - cooling-maps should be mandatory for active and passive trip types
>> otherwise there will be no cooling
>> - cooling-maps make no sense for critical trip type since we're
>> invoking system shutdown
>> - cooling-maps are optional for hot trip types.
>>
>> Is this your understanding too?
>>
>> We should be able to enforce this in YAML.
> 
> Rui, Daniel,
> 
> What do you think about the above interpretation of the cooling-maps bindings?

Yes, I agree with the interpretation.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional
  2020-03-16 16:13   ` Amit Kucheria
@ 2020-03-25  6:37     ` Amit Kucheria
  2020-03-25  9:08       ` Daniel Lezcano
  0 siblings, 1 reply; 12+ messages in thread
From: Amit Kucheria @ 2020-03-25  6:37 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Yuantian Tang, Zhang Rui, Linux PM list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

On Mon, Mar 16, 2020 at 9:43 PM Amit Kucheria <amit.kucheria@linaro.org> wrote:
>
> On Mon, Mar 16, 2020 at 8:22 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
> >
> > On 09/03/2020 05:54, andy.tang@nxp.com wrote:
> > > From: Yuantian Tang <andy.tang@nxp.com>
> > >
> > > Cooling-maps doesn't have to be a required property because there may
> > > be no cooling device on system, or there are no enough cooling devices for
> > > each thermal zone in multiple thermal zone cases since cooling devices
> > > can't be shared.
> > > So make this property optional to remove such limitations.
> > >
> > > For thermal zones with no cooling-maps, there could be critic trips
> > > that can trigger CPU reset or shutdown. So they still can take actions.
> > >
> > > Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
>
> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
>
> >
> > Amit, I'm about to pick this patch, it will collide with the yaml
> > conversion changes.
>
> Thanks for the headsup. I can fixup v3 when I respin.
>
> However, I've always interpreted this binding as follows:
> - cooling-maps should be mandatory for active and passive trip types
> otherwise there will be no cooling
> - cooling-maps make no sense for critical trip type since we're
> invoking system shutdown
> - cooling-maps are optional for hot trip types.
>
> Is this your understanding too?
>
> We should be able to enforce this in YAML.

Rui, Daniel,

What do you think about the above interpretation of the cooling-maps bindings?

Regards,
Amit

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional
  2020-03-09  4:54 [PATCH] dt-bindings: thermal: make " andy.tang
  2020-03-16 14:52 ` Daniel Lezcano
@ 2020-03-23 19:56 ` Rob Herring
  1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2020-03-23 19:56 UTC (permalink / raw)
  To: andy.tang
  Cc: daniel.lezcano, edubezval, rui.zhang, linux-pm, devicetree,
	linux-kernel, Yuantian Tang

On Mon,  9 Mar 2020 12:54:11 +0800, andy.tang@nxp.com wrote:
> From: Yuantian Tang <andy.tang@nxp.com>
> 
> Cooling-maps doesn't have to be a required property because there may
> be no cooling device on system, or there are no enough cooling devices for
> each thermal zone in multiple thermal zone cases since cooling devices
> can't be shared.
> So make this property optional to remove such limitations.
> 
> For thermal zones with no cooling-maps, there could be critic trips
> that can trigger CPU reset or shutdown. So they still can take actions.
> 
> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
> ---
>  Documentation/devicetree/bindings/thermal/thermal.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional
  2020-03-16 14:52 ` Daniel Lezcano
@ 2020-03-16 16:13   ` Amit Kucheria
  2020-03-25  6:37     ` Amit Kucheria
  0 siblings, 1 reply; 12+ messages in thread
From: Amit Kucheria @ 2020-03-16 16:13 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Yuantian Tang, Eduardo Valentin, Zhang Rui, Linux PM list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

On Mon, Mar 16, 2020 at 8:22 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> On 09/03/2020 05:54, andy.tang@nxp.com wrote:
> > From: Yuantian Tang <andy.tang@nxp.com>
> >
> > Cooling-maps doesn't have to be a required property because there may
> > be no cooling device on system, or there are no enough cooling devices for
> > each thermal zone in multiple thermal zone cases since cooling devices
> > can't be shared.
> > So make this property optional to remove such limitations.
> >
> > For thermal zones with no cooling-maps, there could be critic trips
> > that can trigger CPU reset or shutdown. So they still can take actions.
> >
> > Signed-off-by: Yuantian Tang <andy.tang@nxp.com>

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

>
> Amit, I'm about to pick this patch, it will collide with the yaml
> conversion changes.

Thanks for the headsup. I can fixup v3 when I respin.

However, I've always interpreted this binding as follows:
- cooling-maps should be mandatory for active and passive trip types
otherwise there will be no cooling
- cooling-maps make no sense for critical trip type since we're
invoking system shutdown
- cooling-maps are optional for hot trip types.

Is this your understanding too?

We should be able to enforce this in YAML.

Regards,
Amit

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional
  2020-03-09  4:54 [PATCH] dt-bindings: thermal: make " andy.tang
@ 2020-03-16 14:52 ` Daniel Lezcano
  2020-03-16 16:13   ` Amit Kucheria
  2020-03-23 19:56 ` Rob Herring
  1 sibling, 1 reply; 12+ messages in thread
From: Daniel Lezcano @ 2020-03-16 14:52 UTC (permalink / raw)
  To: andy.tang, edubezval, rui.zhang
  Cc: linux-pm, devicetree, linux-kernel, Amit Kucheria

On 09/03/2020 05:54, andy.tang@nxp.com wrote:
> From: Yuantian Tang <andy.tang@nxp.com>
> 
> Cooling-maps doesn't have to be a required property because there may
> be no cooling device on system, or there are no enough cooling devices for
> each thermal zone in multiple thermal zone cases since cooling devices
> can't be shared.
> So make this property optional to remove such limitations.
> 
> For thermal zones with no cooling-maps, there could be critic trips
> that can trigger CPU reset or shutdown. So they still can take actions.
> 
> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>

Amit, I'm about to pick this patch, it will collide with the yaml
conversion changes.



-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] dt-bindings: thermal: make cooling-maps property optional
@ 2020-03-09  4:54 andy.tang
  2020-03-16 14:52 ` Daniel Lezcano
  2020-03-23 19:56 ` Rob Herring
  0 siblings, 2 replies; 12+ messages in thread
From: andy.tang @ 2020-03-09  4:54 UTC (permalink / raw)
  To: daniel.lezcano, edubezval, rui.zhang
  Cc: linux-pm, devicetree, linux-kernel, Yuantian Tang

From: Yuantian Tang <andy.tang@nxp.com>

Cooling-maps doesn't have to be a required property because there may
be no cooling device on system, or there are no enough cooling devices for
each thermal zone in multiple thermal zone cases since cooling devices
can't be shared.
So make this property optional to remove such limitations.

For thermal zones with no cooling-maps, there could be critic trips
that can trigger CPU reset or shutdown. So they still can take actions.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
---
 Documentation/devicetree/bindings/thermal/thermal.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index ca14ba959e0d..f78bec19ca35 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -142,11 +142,11 @@ Required properties:
 - trips:		A sub-node which is a container of only trip point nodes
   Type: sub-node	required to describe the thermal zone.
 
+Optional property:
 - cooling-maps:		A sub-node which is a container of only cooling device
   Type: sub-node	map nodes, used to describe the relation between trips
 			and cooling devices.
 
-Optional property:
 - coefficients:		An array of integers (one signed cell) containing
   Type: array		coefficients to compose a linear relation between
   Elem size: one cell	the sensors listed in the thermal-sensors property.
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-03-25  9:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15  9:36 [PATCH] dt-bindings: thermal: Make cooling-maps property optional Yuantian Tang
2019-05-24  2:50 ` Eduardo Valentin
2019-05-24  3:21   ` [EXT] " Andy Tang
2019-06-04  5:56 ` Andy Tang
2019-06-04  6:04   ` Daniel Lezcano
2019-06-24  7:32     ` [EXT] " Andy Tang
2020-03-09  4:54 [PATCH] dt-bindings: thermal: make " andy.tang
2020-03-16 14:52 ` Daniel Lezcano
2020-03-16 16:13   ` Amit Kucheria
2020-03-25  6:37     ` Amit Kucheria
2020-03-25  9:08       ` Daniel Lezcano
2020-03-23 19:56 ` Rob Herring

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).