* [PATCH] dt-bindings: thermal: Fix definition of cooling-maps contribution property
@ 2021-11-09 10:30 Niklas Söderlund
2021-11-29 20:30 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Niklas Söderlund @ 2021-11-09 10:30 UTC (permalink / raw)
To: Rob Herring, Rafael J . Wysocki, Daniel Lezcano, Amit Kucheria,
linux-pm, devicetree
Cc: linux-renesas-soc, Niklas Söderlund, Kieran Bingham
When converting the thermal-zones bindings to yaml the definition of the
contribution property changed. The intention is the same, an integer
value expressing a ratio of a sum on how much cooling is provided by the
device to the zone. But after the conversion the integer value is
limited to the range 0 to 100 and expressed as a percentage.
This is problematic for two reasons.
- This do not match how the binding is used. Out of the 18 files that
make use of the property only two (ste-dbx5x0.dtsi and
ste-hrefv60plus.dtsi) sets it at a value that satisfy the binding,
100. The remaining 16 files set the value higher and fail to validate.
- Expressing the value as a percentage instead of a ratio of the sum is
confusing as there is nothing to enforce the sum in the zone is not
greater then 100.
This patch restore the pre yaml conversion description and removes the
value limitation allowing the usage of the bindings to validate.
Fixes: 1202a442a31fd2e5 ("dt-bindings: thermal: Add yaml bindings for thermal zones")
Reported-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
.../devicetree/bindings/thermal/thermal-zones.yaml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
index a07de5ed0ca6ae2d..2d34f3ccb2572ddb 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@@ -199,12 +199,11 @@ patternProperties:
contribution:
$ref: /schemas/types.yaml#/definitions/uint32
- minimum: 0
- maximum: 100
description:
- The percentage contribution of the cooling devices at the
- specific trip temperature referenced in this map
- to this thermal zone
+ The cooling contribution to the thermal zone of the referred
+ cooling device at the referred trip point. The contribution is
+ a ratio of the sum of all cooling contributions within a
+ thermal zone.
required:
- trip
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] dt-bindings: thermal: Fix definition of cooling-maps contribution property
2021-11-09 10:30 [PATCH] dt-bindings: thermal: Fix definition of cooling-maps contribution property Niklas Söderlund
@ 2021-11-29 20:30 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-11-29 20:30 UTC (permalink / raw)
To: Niklas Söderlund
Cc: Amit Kucheria, Rob Herring, Kieran Bingham, Daniel Lezcano,
Rafael J . Wysocki, linux-renesas-soc, linux-pm, devicetree
On Tue, 09 Nov 2021 11:30:45 +0100, Niklas Söderlund wrote:
> When converting the thermal-zones bindings to yaml the definition of the
> contribution property changed. The intention is the same, an integer
> value expressing a ratio of a sum on how much cooling is provided by the
> device to the zone. But after the conversion the integer value is
> limited to the range 0 to 100 and expressed as a percentage.
>
> This is problematic for two reasons.
>
> - This do not match how the binding is used. Out of the 18 files that
> make use of the property only two (ste-dbx5x0.dtsi and
> ste-hrefv60plus.dtsi) sets it at a value that satisfy the binding,
> 100. The remaining 16 files set the value higher and fail to validate.
>
> - Expressing the value as a percentage instead of a ratio of the sum is
> confusing as there is nothing to enforce the sum in the zone is not
> greater then 100.
>
> This patch restore the pre yaml conversion description and removes the
> value limitation allowing the usage of the bindings to validate.
>
> Fixes: 1202a442a31fd2e5 ("dt-bindings: thermal: Add yaml bindings for thermal zones")
> Reported-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> .../devicetree/bindings/thermal/thermal-zones.yaml | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-29 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-09 10:30 [PATCH] dt-bindings: thermal: Fix definition of cooling-maps contribution property Niklas Söderlund
2021-11-29 20:30 ` 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).