2020-03-09 05:08:22

by Andy Tang

[permalink] [raw]
Subject: [PATCH] dt-bindings: thermal: make cooling-maps property optional

From: Yuantian Tang <[email protected]>

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 <[email protected]>
---
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


2020-03-16 14:52:50

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional

On 09/03/2020 05:54, [email protected] wrote:
> From: Yuantian Tang <[email protected]>
>
> 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 <[email protected]>

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

2020-03-16 16:16:16

by Amit Kucheria

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional

On Mon, Mar 16, 2020 at 8:22 PM Daniel Lezcano
<[email protected]> wrote:
>
> On 09/03/2020 05:54, [email protected] wrote:
> > From: Yuantian Tang <[email protected]>
> >
> > 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 <[email protected]>

Reviewed-by: Amit Kucheria <[email protected]>

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

2020-03-23 19:57:22

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional

On Mon, 9 Mar 2020 12:54:11 +0800, [email protected] wrote:
> From: Yuantian Tang <[email protected]>
>
> 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 <[email protected]>
> ---
> Documentation/devicetree/bindings/thermal/thermal.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>

2020-03-25 06:37:49

by Amit Kucheria

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional

On Mon, Mar 16, 2020 at 9:43 PM Amit Kucheria <[email protected]> wrote:
>
> On Mon, Mar 16, 2020 at 8:22 PM Daniel Lezcano
> <[email protected]> wrote:
> >
> > On 09/03/2020 05:54, [email protected] wrote:
> > > From: Yuantian Tang <[email protected]>
> > >
> > > 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 <[email protected]>
>
> Reviewed-by: Amit Kucheria <[email protected]>
>
> >
> > 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

2020-03-25 09:10:09

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: make cooling-maps property optional

On 25/03/2020 07:37, Amit Kucheria wrote:
> On Mon, Mar 16, 2020 at 9:43 PM Amit Kucheria <[email protected]> wrote:
>>
>> On Mon, Mar 16, 2020 at 8:22 PM Daniel Lezcano
>> <[email protected]> wrote:
>>>
>>> On 09/03/2020 05:54, [email protected] wrote:
>>>> From: Yuantian Tang <[email protected]>
>>>>
>>>> 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 <[email protected]>
>>
>> Reviewed-by: Amit Kucheria <[email protected]>
>>
>>>
>>> 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