Re: [PATCH v1 1/3] drivers/platform: lenovo-t14s-ec: Add hwmon support for temperatures and fan speed

From: Daniel Lezcano

Date: Mon Jun 29 2026 - 04:50:57 EST


On 6/29/26 10:26, Konrad Dybcio wrote:
On 6/28/26 4:02 PM, Guenter Roeck wrote:
On 6/28/26 06:50, Sebastian Reichel wrote:
Hi,

On Wed, Jun 24, 2026 at 11:08:23PM +0200, Daniel Lezcano wrote:
Expose the Lenovo ThinkPad T14s EC environmental sensors through
the hwmon subsystem.

The driver now registers a hwmon device providing access to six EC
temperature sensors corresponding to the SoC, keyboard area, base
cover, PMIC/charging circuitry, QTM module and SSD. Sensor labels
are exported to allow user space to identify each measurement.

Additionally, expose the system fan speed by reading the fan RPM
registers from the embedded controller.

This allows standard monitoring tools such as lm-sensors to report
platform temperatures and fan speed.

Signed-off-by: Daniel Lezcano daniel.lezcano@xxxxxxxxxxxxxxxx
---

I gave this a try and for me the fan data is always 65535 (i.e. -1):

$ cat /sys/class/hwmon/hwmon66/{name,fan1_input}
t14s_ec
65535

This is with the fan running:

$ cat /sys/class/hwmon/hwmon57/{name,fan1_input}
fan-controller
2564


Not really my concern, but those names really add zero value,
and I would argue that they do not "allow user space to identify
each measurement".

Also, do you really have 66 hwmon devices on those systems ?
Seems unusual.

There's a couple dozen thermal sensors on the SoC and each one is
registered with a thermal zone, plus a couple here and there for
other onboard peripherals (PMICs and whatnot)

Yes, the amount of sensors on the SoC is incredibility high and when adding the platform sensors it is even more. Here on my laptop there are 59 thermal zones and 68 hwmon sensors.

I agree with Guenter comment. With all these sensors, from userspace it is painful to find out a specific sensor without going through all sensors name.

While testing the changes at every reboot, the sensor number changed and I have to find out which one it is. It is annoying.

Would it make sense to have a per-name link pointing to the corresponding hwmon / thermal zone directory ?