]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: lenovo-wmi-other: Add HWMON for fan reporting/tuning
authorRong Zhang <i@rong.moe>
Tue, 20 Jan 2026 18:20:08 +0000 (02:20 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 21 Jan 2026 08:49:58 +0000 (10:49 +0200)
commit51ed34282f63fab5b3996477cc56135eb4de5284
treeaf370ab1c91f8725a252553bc1475d92665fe6d8
parent67d9a39ce85fafc2d88f82c9229ace111aaa8c1f
platform/x86: lenovo-wmi-other: Add HWMON for fan reporting/tuning

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_div: internal RPM divisor
 - fanX_input: current RPM
 - fanX_max: maximum RPM
 - fanX_min: minimum RPM
 - fanX_target: target RPM (tunable, 0=auto)

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@rong.moe>
Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Tested-by: Kurt Borja <kuurtb@gmail.com>
Link: https://patch.msgid.link/20260120182104.163424-8-i@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Documentation/wmi/devices/lenovo-wmi-other.rst
drivers/platform/x86/lenovo/Kconfig
drivers/platform/x86/lenovo/wmi-other.c