Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (dell-smm) Increment the number of fans

Some Alienware laptops that support the SMM interface, may have up to 4
fans.

Tested on an Alienware x15 r1.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250304055249.51940-2-kuurtb@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Kurt Borja and committed by
Guenter Roeck
dbcfcb23 79536059

+11 -8
+7 -7
Documentation/hwmon/dell-smm-hwmon.rst
··· 32 32 =============================== ======= ======================================= 33 33 Name Perm Description 34 34 =============================== ======= ======================================= 35 - fan[1-3]_input RO Fan speed in RPM. 36 - fan[1-3]_label RO Fan label. 37 - fan[1-3]_min RO Minimal Fan speed in RPM 38 - fan[1-3]_max RO Maximal Fan speed in RPM 39 - fan[1-3]_target RO Expected Fan speed in RPM 40 - pwm[1-3] RW Control the fan PWM duty-cycle. 35 + fan[1-4]_input RO Fan speed in RPM. 36 + fan[1-4]_label RO Fan label. 37 + fan[1-4]_min RO Minimal Fan speed in RPM 38 + fan[1-4]_max RO Maximal Fan speed in RPM 39 + fan[1-4]_target RO Expected Fan speed in RPM 40 + pwm[1-4] RW Control the fan PWM duty-cycle. 41 41 pwm1_enable WO Enable or disable automatic BIOS fan 42 42 control (not supported on all laptops, 43 43 see below for details). ··· 93 93 --------------------------- 94 94 95 95 The driver also exports the fans as thermal cooling devices with 96 - ``type`` set to ``dell-smm-fan[1-3]``. This allows for easy fan control 96 + ``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control 97 97 using one of the thermal governors. 98 98 99 99 Module parameters
+4 -1
drivers/hwmon/dell-smm-hwmon.c
··· 73 73 #define DELL_SMM_LEGACY_EXECUTE 0x1 74 74 75 75 #define DELL_SMM_NO_TEMP 10 76 - #define DELL_SMM_NO_FANS 3 76 + #define DELL_SMM_NO_FANS 4 77 77 78 78 struct smm_regs { 79 79 unsigned int eax; ··· 1074 1074 HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX | 1075 1075 HWMON_F_TARGET, 1076 1076 HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX | 1077 + HWMON_F_TARGET, 1078 + HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX | 1077 1079 HWMON_F_TARGET 1078 1080 ), 1079 1081 HWMON_CHANNEL_INFO(pwm, 1080 1082 HWMON_PWM_INPUT | HWMON_PWM_ENABLE, 1083 + HWMON_PWM_INPUT, 1081 1084 HWMON_PWM_INPUT, 1082 1085 HWMON_PWM_INPUT 1083 1086 ),