]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
hwmon: (dell-smm) Increment the number of fans
authorKurt Borja <kuurtb@gmail.com>
Tue, 4 Mar 2025 05:52:50 +0000 (00:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:42:00 +0000 (14:42 +0200)
[ Upstream commit dbcfcb239b3b452ef8782842c36fb17dd1b9092f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Documentation/hwmon/dell-smm-hwmon.rst
drivers/hwmon/dell-smm-hwmon.c

index d8f1d6859b964be0cda1fd299cc3a580d33ba62d..1c12fbba440bca916f4185cfe19bebadca0210ad 100644 (file)
@@ -32,12 +32,12 @@ Temperature sensors and fans can be queried and set via the standard
 =============================== ======= =======================================
 Name                           Perm    Description
 =============================== ======= =======================================
-fan[1-3]_input                  RO      Fan speed in RPM.
-fan[1-3]_label                  RO      Fan label.
-fan[1-3]_min                    RO      Minimal Fan speed in RPM
-fan[1-3]_max                    RO      Maximal Fan speed in RPM
-fan[1-3]_target                 RO      Expected Fan speed in RPM
-pwm[1-3]                        RW      Control the fan PWM duty-cycle.
+fan[1-4]_input                  RO      Fan speed in RPM.
+fan[1-4]_label                  RO      Fan label.
+fan[1-4]_min                    RO      Minimal Fan speed in RPM
+fan[1-4]_max                    RO      Maximal Fan speed in RPM
+fan[1-4]_target                 RO      Expected Fan speed in RPM
+pwm[1-4]                        RW      Control the fan PWM duty-cycle.
 pwm1_enable                     WO      Enable or disable automatic BIOS fan
                                         control (not supported on all laptops,
                                         see below for details).
@@ -93,7 +93,7 @@ Again, when you find new codes, we'd be happy to have your patches!
 ---------------------------
 
 The driver also exports the fans as thermal cooling devices with
-``type`` set to ``dell-smm-fan[1-3]``. This allows for easy fan control
+``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control
 using one of the thermal governors.
 
 Module parameters
index 44aaf9b9191d4147a66ec07d3389987a90516c6a..8d94ecc3cc468cda7bb814ea5dc0bf2e0c384a42 100644 (file)
@@ -67,7 +67,7 @@
 #define I8K_POWER_BATTERY      0x01
 
 #define DELL_SMM_NO_TEMP       10
-#define DELL_SMM_NO_FANS       3
+#define DELL_SMM_NO_FANS       4
 
 struct dell_smm_data {
        struct mutex i8k_mutex; /* lock for sensors writes */
@@ -940,11 +940,14 @@ static const struct hwmon_channel_info * const dell_smm_info[] = {
                           HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
                           HWMON_F_TARGET,
                           HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
+                          HWMON_F_TARGET,
+                          HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
                           HWMON_F_TARGET
                           ),
        HWMON_CHANNEL_INFO(pwm,
                           HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
                           HWMON_PWM_INPUT,
+                          HWMON_PWM_INPUT,
                           HWMON_PWM_INPUT
                           ),
        NULL