From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Mark Brown <broonie@kernel.org>, Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, Icenowy Zheng <uwu@icenowy.me>
Subject: Re: [PATCH RESEND RESEND] thermal/of: support thermal zones w/o trips subnode
Date: Sun, 23 Jul 2023 12:12:49 +0200 [thread overview]
Message-ID: <6d1c0915-1485-d9d6-9fff-0413fb16bd3f@linaro.org> (raw)
In-Reply-To: <ZLw4CnzLI/QHPGWx@finisterre.sirena.org.uk>
Hi Mark,
On 22/07/2023 22:11, Mark Brown wrote:
> On Sat, Jul 22, 2023 at 08:25:34PM +0800, Icenowy Zheng wrote:
>> From: Icenowy Zheng <uwu@icenowy.me>
>>
>> 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.
>
> This makes sense to me - it allows people to see the reported
> temperature even if there's no trips defined which seems more
> helpful than refusing to register.
The binding describes the trip points as required and that since the
beginning.
What changed is now the code reflects the required property while before
it was permissive, that was an oversight.
Just a reminder about the thermal framework goals:
1. It protects the silicon (thus critical and hot trip points)
2. It mitigates the temperature (thus cooling device bound to trip
points)
3. It notifies the userspace when a trip point is crossed
So if the thermal zone is described but without any of this goal above,
it is pointless.
If the goal is to report the temperature only, then hwmon should be used
instead.
If the goal is to mitigate by userspace, then the trip point *must* be
used to prevent the userspace polling the temperature. With the trip
point the sensor will be set to fire an interrupt at the given trip
temperature.
IOW, trip points are not optional
--
<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
next prev parent reply other threads:[~2023-07-23 10:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 12:25 Icenowy Zheng
2023-07-22 20:11 ` Mark Brown
2023-07-23 10:12 ` Daniel Lezcano [this message]
2023-07-23 15:05 ` Mark Brown
2023-07-24 2:35 ` Icenowy Zheng
2023-07-24 4:25 ` Chen-Yu Tsai
2023-07-25 4:01 ` Icenowy Zheng
2023-08-01 14:10 ` Icenowy Zheng
2023-08-16 10:04 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d1c0915-1485-d9d6-9fff-0413fb16bd3f@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=rui.zhang@intel.com \
--cc=uwu@icenowy.me \
--cc=zhengxingda@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®