Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Sung-Chi Li" <lschyi@chromium.org>
Cc: Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 3/3] hwmon: (cros_ec) register fans into thermal framework cooling devices
Date: Wed, 30 Apr 2025 08:38:06 -0700	[thread overview]
Message-ID: <63b2d985-92d4-40dd-b2b2-ab55796abc52@roeck-us.net> (raw)
In-Reply-To: <2518c6a3-6524-48b3-8e64-8990a61cc608@t-8ch.de>

On 4/30/25 07:36, Thomas Weißschuh wrote:
> On 2025-04-30 09:51:03+0800, Sung-Chi Li wrote:
>> On Tue, Apr 29, 2025 at 10:45:56PM +0200, Thomas Weißschuh wrote:
>>> On 2025-04-29 16:14:23+0800, Sung-Chi Li via B4 Relay wrote:
>>>> From: Sung-Chi Li <lschyi@chromium.org>
>>>>
>>>> Register fans connected under EC as thermal cooling devices as well, so
>>>> these fans can then work with the thermal framework.
>>>>
>>>> During the driver probing phase, we will also try to register each fan
>>>> as a thermal cooling device based on previous probe result (whether the
>>>> there are fans connected on that channel, and whether EC supports fan
>>>> control). The basic get max state, get current state, and set current
>>>> state methods are then implemented as well.
>>>
>>> There is also HWMON_C_REGISTER_TZ, however it depends on OF.
>>> But this patch looks very generic, so maybe it makes sense to implement
>>> it in the hwmon core.
>>>
>>
>> Hi, the HWMON_C_REGISTER_TZ is for registering a thermal sensor, and here I
>> registered it as thermal cooling devices, so they are different. I followed
>> other hwmon drivers:
>>
>>    - gpio-fan.c
>>    - aspeed-pwm-tacho.c
>>    - max6650.c
>>    - qnap-mcu-hwmon.c
>>    - ...
> 
> Indeed, sorry.
> 
>> . These hwmon drivers also manually registered other cooling devices, and that
>> makes sense to me, so I think it is good to just register cooling devices rather
>> than make big changes to hwmon core.
> 
> The implementation does look like a lot of boilerplate.
> If Guenter doesn't chime in, let's stick with the current approach.
> 

Someone could make the necessary improvements to the hwmon core and clean up the drivers
implementing that boilerplate today, but that should be a separate patch series, and this
series should not depend on it.

Patches welcome ...

Thanks,
Guenter


  reply	other threads:[~2025-04-30 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  8:14 [PATCH 0/3] Export fan control and register fans as cooling devices Sung-Chi Li via B4 Relay
2025-04-29  8:14 ` [PATCH 1/3] platform/chrome: update pwm fan control host commands Sung-Chi Li via B4 Relay
2025-04-30  1:28   ` Tzung-Bi Shih
2025-04-29  8:14 ` [PATCH 2/3] hwmon: (cros_ec) add PWM control over fans Sung-Chi Li via B4 Relay
2025-04-29 21:20   ` Thomas Weißschuh
2025-04-30  7:00     ` Sung-Chi Li
2025-04-30 14:48       ` Thomas Weißschuh
2025-05-02  5:31         ` Sung-Chi Li
2025-04-29  8:14 ` [PATCH 3/3] hwmon: (cros_ec) register fans into thermal framework cooling devices Sung-Chi Li via B4 Relay
2025-04-29 20:45   ` Thomas Weißschuh
2025-04-30  1:51     ` Sung-Chi Li
2025-04-30 14:36       ` Thomas Weißschuh
2025-04-30 15:38         ` Guenter Roeck [this message]
2025-05-02  5:35           ` Sung-Chi Li

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=63b2d985-92d4-40dd-b2b2-ab55796abc52@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=corbet@lwn.net \
    --cc=groeck@chromium.org \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=lschyi@chromium.org \
    /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