Chrome platform driver development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	"Sung-Chi, Li" <lschyi@chromium.org>
Cc: "Conor Dooley" <conor.dooley@microchip.com>,
	"Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Benson Leung" <bleung@chromium.org>,
	"Guenter Roeck" <groeck@chromium.org>,
	"Thomas Weißschuh" <thomas@weissschuh.net>,
	"Jean Delvare" <jdelvare@suse.com>,
	devicetree@vger.kernel.org, chrome-platform@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 2/2] dt-bindings: mfd: Add properties for thermal sensor cells
Date: Mon, 25 Nov 2024 08:41:28 -0800	[thread overview]
Message-ID: <eda10481-d1f2-45c4-a5ff-0f26398fe6bf@roeck-us.net> (raw)
In-Reply-To: <61541768-1b32-4473-a569-850323a6c7a1@kernel.org>

On 11/25/24 07:18, Krzysztof Kozlowski wrote:
> On 25/11/2024 16:13, Guenter Roeck wrote:
>> On 11/25/24 00:52, Krzysztof Kozlowski wrote:
>>> On 13/11/2024 04:05, Guenter Roeck wrote:
>>>> On 11/12/24 18:39, Sung-Chi, Li wrote:
>>>>> The cros_ec supports reading thermal values from thermal sensors
>>>>> connect to it. Add the property '#thermal-sensor-cells' bindings, such
>>>>> that thermal framework can recognize cros_ec as a valid thermal device.
>>>>>
>>>>> Signed-off-by: Sung-Chi, Li <lschyi@chromium.org>
>>>>> Acked-by: Conor Dooley <conor.dooley@microchip.com>
>>>>> ---
>>>>>     Changes in v2:
>>>>>       - Add changes for DTS binding.
>>>>>     Changes in v3:
>>>>>       - Remove unneeded Change-Id tag in commit message.
>>>>> ---
>>>>
>>>> I can't apply this one (not in hwmon space), so
>>>>
>>>> Acked-by: Guenter Roeck <linux@roeck-us.net>
>>>>
>>>> with the assumption that Lee will pick it up.
>>>
>>> This was merged, while I was AFK, so the ship has sailed, but let me
>>> state here objection for any future discussions:
>>>
>>> NAK, this is not a thermal sensor. The commit msg explains what they
>>> want to achieve, but that's not a valid reason to add property from
>>> different class of devices.
>>>
>>> This is some hardware/temperature monitoring device or power supply, not
>>> part of SoC, not integrated into any SoC thermal zone. Calling it
>>
>> I am confused. We have several thermal sensors registering as thermal
>> zone, and fan controllers registering themselves as thermal cooling devices.
>>
>> Are you saying that this is all not permitted because they are not part
>> of a SoC ?
> 
> 
> These are fine, because they monitor or cool down the SoC.  Sensor can
> be under the die.  Fan for battery or for battery charger also would be
> fine, because it is a real cooling device.  It literally cools.
> 

Sorry, I don't get the distinction since you specifically refer to the SoC.
How about drive temperatures ? RAM temperatures ? Temperatures reported
by networking chips ? Power supply temperatures ? We have all those registering
thermal zones. The ASUS EC controller driver registers thermal zones
for its temperature sensors. Dell and HP drivers do the same.

> But treating battery charger as cooling device is not correct, IMHO.

Confused. The patch you object to isn't introducing a cooling device,
it is introducing #thermal-sensor-cells. The EC reports temperature
sensor results, and the driver wants to register those as thermal zones.
Yes, it may well be that one of those temperature sensors is close to
a battery charger, but I am not even sure if that is really the case.

> Battery charger does not cool anything down and already we have there
> properties for managing thermal and current aspects.
> 
Agreed, but unless I am missing something that isn't done here.

> BTW, if power supply bindings miss some thermal aspects, then let's grow
> the common binding first and agree on common aspects.
> 

I don't even know how the two patches are associated with power supplies
or battery chargers in the first place. All they try to do is to enable
adding the temperature sensor values reported by the EC in Chromebooks
to thermal zones. I don't recall any previous limitations on the ability
to register thermal sensors as thermal zone with the thermal subsystem,
and I am trying to understand what those limitations are.

So far my approach was "ok, someone wants to register a thermal sensor as
thermal zone - fine, let's do that. We have close to 50 thermal sensors on
a variety of devices - including but not limited to disk drives, memory,
Ethernet controllers, Ethernet PHYs, SFPs, RTCs, and ECs - registering
as thermal zones from hardware monitoring drivers. I don't recall anyone
ever saying "no, you can't do that".

I am trying to understand if some of those are inappropriate and, if so,
why that is the case.

Thanks,
Guenter


  reply	other threads:[~2024-11-25 16:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11  7:49 [PATCH] hwmon: (cros_ec) register thermal sensors to thermal framework Sung-Chi, Li
2024-11-11  8:16 ` Thomas Weißschuh
2024-11-11  9:50 ` [PATCH v2] " Sung-Chi
2024-11-11  9:50   ` [PATCH v2 2/2] dt-bindings: mfd: Add properties for thermal sensor cells Sung-Chi
2024-11-11 20:08     ` Conor Dooley
2024-11-11 16:30   ` [PATCH v2] hwmon: (cros_ec) register thermal sensors to thermal framework Thomas Weißschuh
2024-11-11 17:01   ` Guenter Roeck
2024-11-12  7:42     ` Sung-Chi, Li
2024-11-13  2:39 ` [PATCH v3 1/2] " Sung-Chi, Li
2024-11-13  2:39   ` [PATCH v3 2/2] dt-bindings: mfd: Add properties for thermal sensor cells Sung-Chi, Li
2024-11-13  3:05     ` Guenter Roeck
2024-11-25  8:52       ` Krzysztof Kozlowski
2024-11-25  8:54         ` Krzysztof Kozlowski
2024-11-25 15:13         ` Guenter Roeck
2024-11-25 15:18           ` Krzysztof Kozlowski
2024-11-25 16:41             ` Guenter Roeck [this message]
2024-11-25 17:12               ` Krzysztof Kozlowski
2024-11-13  3:04   ` [PATCH v3 1/2] hwmon: (cros_ec) register thermal sensors to thermal framework Guenter Roeck

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=eda10481-d1f2-45c4-a5ff-0f26398fe6bf@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=groeck@chromium.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lschyi@chromium.org \
    --cc=robh@kernel.org \
    --cc=thomas@weissschuh.net \
    /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