]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal/of: support thermal zones w/o trips subnode
authorIcenowy Zheng <uwu@icenowy.me>
Fri, 18 Oct 2024 07:31:36 +0000 (15:31 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 4 Nov 2024 14:38:29 +0000 (15:38 +0100)
commit725f31f300e300a9d94976bd8f1db6e746f95f63
treee94d2a347ef09681af7f19fd33b4cc2ea3286496
parentc5426dcc5a3a064bbd2de383e29035a14fe933e0
thermal/of: support thermal zones w/o trips subnode

Although the current device tree binding of thermal zones require the
trips subnode, the binding in kernel v5.15 does not require it, and many
device trees shipped with the kernel, for example,
allwinner/sun50i-a64.dtsi and mediatek/mt8183-kukui.dtsi in ARM64, still
comply to the old binding and contain no trips subnode.

Allow the code to successfully register thermal zones w/o trips subnode
for DT binding compatibility now.

Furtherly, the inconsistency between DTs and bindings should be resolved
by either adding empty trips subnode or dropping the trips subnode
requirement.

Fixes: d0c75fa2c17f ("thermal/of: Initialize trip points separately")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
[wenst@chromium.org: Reworked logic and kernel log messages]
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20241018073139.1268995-1-wenst@chromium.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal_of.c