@@ -56,6 +56,19 @@
#define U16_MSB(num) (((num) & 0xFF00) >> 8)
#define U16_LSB(num) ((num) & 0x00FF)
+#define FAN_INFO_1_TO_6 \
+ (HWMON_F_PULSES | \
+ HWMON_F_ENABLE | \
+ HWMON_F_INPUT | \
+ HWMON_F_TARGET | \
+ HWMON_F_FAULT)
+
+#define FAN_INFO_7_TO_12 \
+ (HWMON_F_PULSES | \
+ HWMON_F_ENABLE | \
+ HWMON_F_INPUT | \
+ HWMON_F_FAULT)
+
static const struct regmap_range max31790_ro_range = {
.range_min = MAX31790_REG_TACH_COUNT(0),
.range_max = MAX31790_REG_PWMOUT(0) - 1,
@@ -513,18 +526,18 @@ static umode_t max31790_is_visible(const void *data,
static const struct hwmon_channel_info *max31790_info[] = {
HWMON_CHANNEL_INFO(fan,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_FAULT,
- HWMON_F_PULSES | HWMON_F_ENABLE | HWMON_F_INPUT | HWMON_F_FAULT),
+ FAN_INFO_1_TO_6,
+ FAN_INFO_1_TO_6,
+ FAN_INFO_1_TO_6,
+ FAN_INFO_1_TO_6,
+ FAN_INFO_1_TO_6,
+ FAN_INFO_1_TO_6,
+ FAN_INFO_7_TO_12,
+ FAN_INFO_7_TO_12,
+ FAN_INFO_7_TO_12,
+ FAN_INFO_7_TO_12,
+ FAN_INFO_7_TO_12,
+ FAN_INFO_7_TO_12),
HWMON_CHANNEL_INFO(pwm,
HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
The line was starting to get a little long. Signed-off-by: Václav Kubernát <kubernat@cesnet.cz> --- drivers/hwmon/max31790.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-)