diff options
author | Frank Crawford <frank@crawford.emu.id.au> | 2023-04-30 14:50:32 +1000 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-06-08 06:41:17 -0700 |
commit | 339c8f2484a110fd94af4d045e2be9bf25800381 (patch) | |
tree | 7c4b72c05f028ce40e92121f419650995aef4329 /drivers/hwmon/it87.c | |
parent | 6a01a12d7e1609defa9a025e22e8730008a62104 (diff) |
hwmon: (it87) Allow for chips with only 4 temp sensors
Some chips are known to only have 4 temperature sensors and there is no
requirement to test for more. Currently only the IT8622E fits this
category.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230430045032.1723288-1-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r-- | drivers/hwmon/it87.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 96c17660ff0f..4c3641d28a6a 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -319,6 +319,7 @@ struct it87_devices { #define FEAT_CONF_NOEXIT BIT(19) /* Chip should not exit conf mode */ #define FEAT_FOUR_FANS BIT(20) /* Supports four fans */ #define FEAT_FOUR_PWM BIT(21) /* Supports four fan controls */ +#define FEAT_FOUR_TEMP BIT(22) static const struct it87_devices it87_devices[] = { [it87] = { @@ -475,7 +476,7 @@ static const struct it87_devices it87_devices[] = { .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_FIVE_FANS | FEAT_FIVE_PWM | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2 - | FEAT_AVCC3 | FEAT_VIN3_5V, + | FEAT_AVCC3 | FEAT_VIN3_5V | FEAT_FOUR_TEMP, .peci_mask = 0x07, .smbus_bitmap = BIT(1) | BIT(2), }, @@ -527,6 +528,7 @@ static const struct it87_devices it87_devices[] = { FEAT_SIX_PWM)) #define has_six_pwm(data) ((data)->features & FEAT_SIX_PWM) #define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2) +#define has_four_temp(data) ((data)->features & FEAT_FOUR_TEMP) #define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP) #define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V) #define has_conf_noexit(data) ((data)->features & FEAT_CONF_NOEXIT) @@ -3393,7 +3395,9 @@ static int it87_probe(struct platform_device *pdev) data->need_in7_reroute = sio_data->need_in7_reroute; data->has_in = 0x3ff & ~sio_data->skip_in; - if (has_six_temp(data)) { + if (has_four_temp(data)) { + data->has_temp |= BIT(3); + } else if (has_six_temp(data)) { u8 reg = it87_read_value(data, IT87_REG_TEMP456_ENABLE); /* Check for additional temperature sensors */ |