Skip to contentSkip to conversation

dt-bindings: thermal: make cooling-maps property optional

PATCH In review [email protected] 4 participants 6 messages Mar 9, 2020 – Mar 25, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 Documentation/devicetree/bindings/thermal/thermal.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/thermal/thermal.txt +1 -1
index ca14ba959e0d..f78bec19ca35 100644
@@ -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.
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · 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.

Quoted 4 lines

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.

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

Signature · 5 lines
 <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
Reviewed-by
#2 lore raw
Quoted 10 lines · Daniel Lezcano
Quoted 8 lines · 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.

Quoted 4 lines
Quoted 4 lines

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.

Quoted 3 lines

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

#3 lore raw
Quoted 33 lines · Amit Kucheria
Quoted 10 lines · Daniel Lezcano
Quoted 8 lines · 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.

Quoted 4 lines
Quoted 4 lines

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.

Quoted 3 lines

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.

Quoted 3 lines

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

#4 lore raw
Quoted 34 lines · Amit Kucheria
Quoted 33 lines · Amit Kucheria
Quoted 10 lines · Daniel Lezcano
Quoted 8 lines · 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.

Quoted 4 lines
Quoted 4 lines

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.

Quoted 3 lines

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.

Quoted 7 lines
Quoted 3 lines

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.

Signature · 5 lines
 <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
maintainer Acked-by on v1 1/1
#5 lore raw
In reply to [email protected]
Quoted 8 lines · 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.

Quoted 8 lines

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.

---
 Documentation/devicetree/bindings/thermal/thermal.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)