[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a9909f4083d85736a1e28067517ae0899e462f2.camel@rong.moe>
Date: Thu, 15 Jan 2026 21:03:04 +0800
From: Rong Zhang <i@...g.moe>
To: Kurt Borja <kuurtb@...il.com>
Cc: Mark Pearson <mpearson-lenovo@...ebb.ca>, "Derek J. Clark"
<derekjohn.clark@...il.com>, Armin Wolf <W_Armin@....de>, Hans de Goede
<hansg@...nel.org>, Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com>, Guenter Roeck <linux@...ck-us.net>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org
Subject: Re: [PATCH v9 7/7] platform/x86: lenovo-wmi-other: Add HWMON for
fan reporting/tuning
Hi Kurt,
On Wed, 2026-01-14 at 19:16 -0500, Kurt Borja wrote:
> Hi Rong,
>
> On Wed Jan 14, 2026 at 7:27 AM -05, Rong Zhang wrote:
> > Register an HWMON device for fan reporting/tuning according to
> > Capability Data 00 (capdata00) and Fan Test Data (capdata_fan) provided
> > by lenovo-wmi-capdata. The corresponding HWMON nodes are:
> >
> > - fanX_enable: enable/disable the fan (tunable)
> > - fanX_input: current RPM
> > - fanX_max: maximum RPM
> > - fanX_min: minimum RPM
> > - fanX_target: target RPM (tunable)
> >
> > Information from capdata00 and capdata_fan are used to control the
> > visibility and constraints of HWMON attributes. Fan info from capdata00
> > is collected on bind, while fan info from capdata_fan is collected in a
> > callback. Once all fan info is collected, register the HWMON device.
> >
> > Signed-off-by: Rong Zhang <i@...g.moe>
> > Reviewed-by: Derek J. Clark <derekjohn.clark@...il.com>
> > ---
>
> ...
>
> > diff --git a/Documentation/wmi/devices/lenovo-wmi-other.rst b/Documentation/wmi/devices/lenovo-wmi-other.rst
> > index 821282e07d93c..bd1d733ff286d 100644
> > --- a/Documentation/wmi/devices/lenovo-wmi-other.rst
> > +++ b/Documentation/wmi/devices/lenovo-wmi-other.rst
> > @@ -31,6 +31,8 @@ under the following path:
> >
> > /sys/class/firmware-attributes/lenovo-wmi-other/attributes/<attribute>/
> >
> > +Additionally, this driver also exports attributes to HWMON.
> > +
> > LENOVO_CAPABILITY_DATA_00
> > -------------------------
> >
> > @@ -39,6 +41,11 @@ WMI GUID ``362A3AFE-3D96-4665-8530-96DAD5BB300E``
> > The LENOVO_CAPABILITY_DATA_00 interface provides various information that
> > does not rely on the gamezone thermal mode.
> >
> > +The following HWMON attributes are implemented:
> > + - fanX_enable: enable/disable the fan (tunable)
>
> I was testing this series and I'm a bit confused about fanX_enable.
Thanks for testing!
> Judging by this comment and also by taking a quick look at the code, it
> looks like writting 0 to this attribute disables the fan.
>
> This is however (per hwmon ABI documentation [1]) not how this attribute
> should work. IIUC, it is intended for devices which can disable the fan
> sensor, not the actual fan.
Hmm, what a confusing name :-/
> I fail to see how this feature is useful and I also find it dangerous
> for this to be exposed by default, considering the same could be
> achieved with the relaxed module parameter, which at least tells the
> user to be careful.
Makes sense. I will remove the attribute and mention such behavior in
the module parameter.
> Apologies if I missed some previous discussion on this.
>
> [1] https://elixir.bootlin.com/linux/v6.19-rc5/source/Documentation/ABI/testing/sysfs-class-hwmon#L279
Thanks,
Rong
Powered by blists - more mailing lists