LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Lezcano <email@example.com>
To: Ben Tseng <firstname.lastname@example.org>,
Fan Chen <email@example.com>, Zhang Rui <firstname.lastname@example.org>,
Cc: Eduardo Valentin <email@example.com>,
Rob Herring <firstname.lastname@example.org>,
Mark Rutland <email@example.com>,
Matthias Brugger <firstname.lastname@example.org>,
Michael Kao <email@example.com>,
Yu-Chia Chang <firstname.lastname@example.org>
Subject: Re: [PATCH v5 2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones
Date: Mon, 16 Aug 2021 20:56:54 +0200 [thread overview]
Message-ID: <email@example.com> (raw)
On 23/07/2021 08:17, Ben Tseng wrote:
> On Mon, 2021-06-21 at 13:26 +0200, Daniel Lezcano wrote:
>> On 17/06/2021 13:47, Ben Tseng wrote:
>>> From: Michael Kao <firstname.lastname@example.org>
>>> Add a LVTS (Low voltage thermal sensor) driver to report junction
>>> temperatures in Mediatek SoC and register the maximum temperature
>>> of sensors and each sensor as a thermal zone.
>> I think we already talked about that. We don't want a thermal sensor
>> driver to aggregate the temperatures but create some kindof virtual
>> sensor with a property (min, max, avg, ...) which is usable by
>> [ ... ]
> Dear Daniel,
> Sorry for the late reply.
sorry too, missed to answer. Another thread pointed to this one and I
figured out I forgot to answer.
> After survey ,I'm not sure whether the patch is the architecture of
> virtual thermal sensor which you commented.
Ah, yes that is kind of what it would be requested but really generic so
anyone can use it.
> Or, is there any existing framework on mainline already support virtual
No unfortunately, it is not done [yet].
> Could you help to provide reference to us?
Ok, we had this discussion several times on the mailing list and at the
different events like the Linux Plumbers conference. But I was not able
to find out a pointer.
Basically the idea is simple, we don't want drivers doing weird things
in their get_temp callback. This callback must return the temperature
associated to a physical sensor in a 1:1 manner.
However, some people want to define a thermal zone but with an
aggregation of different sensors.
At this point, we are unsure how to do that.
Having a virtual sensor would be more adequate as it won't impact
anything except the DT for a configuration. And we can make it to evolve
without having to change all the thermal framework internals.
From a DT point of view, a virtual sensor device cuold have phandles to
the different sensors and let's say a property telling what do to (avg,
min, max, ...). The thermal zone will point to the virtual device.
In the driver itself, the get_temp will just call get_temp of all the
sensors and do the operation specified in the property.
With that, the drivers stay consistent and we have the flexibility to do
whatever we want.
Does it make sense ?
<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 |
next prev parent reply other threads:[~2021-08-16 18:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 11:47 [PATCH v5 0/3] thermal: mediatek: Add LVTS architecture thermal controller Ben Tseng
2021-06-17 11:47 ` [PATCH v5 1/3] thermal: mediatek: Relocate driver to mediatek folder Ben Tseng
2021-06-18 13:56 ` Matthias Brugger
2021-06-17 11:47 ` [PATCH v5 2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones Ben Tseng
2021-06-21 11:26 ` Daniel Lezcano
2021-07-23 6:17 ` Ben Tseng
2021-08-16 18:56 ` Daniel Lezcano [this message]
2022-04-05 10:53 ` AngeloGioacchino Del Regno
2021-06-17 11:47 ` [PATCH v5 3/3] dt-bindings: thermal: Add binding document for mt6873 thermal controller Ben Tseng
2021-06-18 19:10 ` Rob Herring
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--subject='Re: [PATCH v5 2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones' \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).