linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Ben Tseng <ben.tseng@mediatek.com>,
	Fan Chen <fan.chen@mediatek.com>, Zhang Rui <rui.zhang@intel.com>,
	linux-pm@vger.kernel.org, srv_heupstream@mediatek.com
Cc: Eduardo Valentin <edubezval@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	hsinyi@chromium.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	Michael Kao <michael.kao@mediatek.com>,
	Yu-Chia Chang <ethan.chang@mediatek.com>
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: <8a38b9fe-0448-3ddc-9ffc-c43137b5ecaa@linaro.org> (raw)
In-Reply-To: <1f92b245537d6390b7b2bde62ce8b99a3df9d445.camel@mediatek.com>


Hi Ben,

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 <michael.kao@mediatek.com>
>>>
>>> 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
>> anyone.
>>
>> [ ... ]
>>
>>
>>
> 
> 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[1] 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
> sensor?

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 |
<http://www.linaro.org/linaro-blog/> Blog

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  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

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=8a38b9fe-0448-3ddc-9ffc-c43137b5ecaa@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=ben.tseng@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=ethan.chang@mediatek.com \
    --cc=fan.chen@mediatek.com \
    --cc=hsinyi@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=michael.kao@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=srv_heupstream@mediatek.com \
    /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;
as well as URLs for NNTP newsgroup(s).