hwmon: (mlxreg-fan) Extend number of supported fans
authorVadim Pasternak <vadimp@nvidia.com>
Thu, 24 Aug 2023 16:40:06 +0000 (16:40 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 25 Aug 2023 14:43:04 +0000 (07:43 -0700)
Some new big modular systems can be equipped with up to 24 fans.
Extend maximum number of fans accordingly.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20230824164006.26868-1-vadimp@nvidia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/mlxreg-fan.c

index c2a96468c9b47e6f9396ceeea7b298bdcbf97074..a5f89aab3fb4d2c48ef08e7d759b3fefa5a2004c 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/regmap.h>
 #include <linux/thermal.h>
 
-#define MLXREG_FAN_MAX_TACHO           14
+#define MLXREG_FAN_MAX_TACHO           24
 #define MLXREG_FAN_MAX_PWM             4
 #define MLXREG_FAN_PWM_NOT_CONNECTED   0xff
 #define MLXREG_FAN_MAX_STATE           10
@@ -300,6 +300,16 @@ static const struct hwmon_channel_info * const mlxreg_fan_hwmon_info[] = {
                           HWMON_F_INPUT | HWMON_F_FAULT,
                           HWMON_F_INPUT | HWMON_F_FAULT,
                           HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
                           HWMON_F_INPUT | HWMON_F_FAULT),
        HWMON_CHANNEL_INFO(pwm,
                           HWMON_PWM_INPUT,