]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
dt-bindings: thermal: Fix definition of cooling-maps contribution property
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tue, 9 Nov 2021 10:30:45 +0000 (11:30 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:00:01 +0000 (11:00 +0100)
commit134eabd539814002970b04c023210f4a057045ae
tree02287df7e91c58a892e0013ff071f7cd11663a48
parent0f4a3613dae02e490ff0aa58d3088f57abef8e45
dt-bindings: thermal: Fix definition of cooling-maps contribution property

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 49bcb1506f2e095262c01bda7fd1c0db524c91e2 ]

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>
Link: https://lore.kernel.org/r/20211109103045.1403686-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Documentation/devicetree/bindings/thermal/thermal-zones.yaml