aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/it87.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r--drivers/hwmon/it87.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index ef4e0527bd21..3bfa866cc82f 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -296,6 +296,7 @@ struct it87_devices {
296#define FEAT_SIX_PWM BIT(14) /* Chip supports 6 pwm chn */ 296#define FEAT_SIX_PWM BIT(14) /* Chip supports 6 pwm chn */
297#define FEAT_PWM_FREQ2 BIT(15) /* Separate pwm freq 2 */ 297#define FEAT_PWM_FREQ2 BIT(15) /* Separate pwm freq 2 */
298#define FEAT_SIX_TEMP BIT(16) /* Up to 6 temp sensors */ 298#define FEAT_SIX_TEMP BIT(16) /* Up to 6 temp sensors */
299#define FEAT_VIN3_5V BIT(17) /* VIN3 connected to +5V */
299 300
300static const struct it87_devices it87_devices[] = { 301static const struct it87_devices it87_devices[] = {
301 [it87] = { 302 [it87] = {
@@ -433,7 +434,7 @@ static const struct it87_devices it87_devices[] = {
433 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS 434 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
434 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_SIX_FANS 435 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_SIX_FANS
435 | FEAT_IN7_INTERNAL | FEAT_SIX_PWM | FEAT_PWM_FREQ2 436 | FEAT_IN7_INTERNAL | FEAT_SIX_PWM | FEAT_PWM_FREQ2
436 | FEAT_SIX_TEMP, 437 | FEAT_SIX_TEMP | FEAT_VIN3_5V,
437 .peci_mask = 0x07, 438 .peci_mask = 0x07,
438 }, 439 },
439 [it8628] = { 440 [it8628] = {
@@ -442,7 +443,7 @@ static const struct it87_devices it87_devices[] = {
442 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS 443 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
443 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_SIX_FANS 444 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_SIX_FANS
444 | FEAT_IN7_INTERNAL | FEAT_SIX_PWM | FEAT_PWM_FREQ2 445 | FEAT_IN7_INTERNAL | FEAT_SIX_PWM | FEAT_PWM_FREQ2
445 | FEAT_SIX_TEMP, 446 | FEAT_SIX_TEMP | FEAT_VIN3_5V,
446 .peci_mask = 0x07, 447 .peci_mask = 0x07,
447 }, 448 },
448}; 449};
@@ -468,6 +469,7 @@ static const struct it87_devices it87_devices[] = {
468#define has_six_pwm(data) ((data)->features & FEAT_SIX_PWM) 469#define has_six_pwm(data) ((data)->features & FEAT_SIX_PWM)
469#define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2) 470#define has_pwm_freq2(data) ((data)->features & FEAT_PWM_FREQ2)
470#define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP) 471#define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP)
472#define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V)
471 473
472struct it87_sio_data { 474struct it87_sio_data {
473 enum chips type; 475 enum chips type;
@@ -1926,7 +1928,9 @@ static ssize_t show_label(struct device *dev, struct device_attribute *attr,
1926 int nr = to_sensor_dev_attr(attr)->index; 1928 int nr = to_sensor_dev_attr(attr)->index;
1927 const char *label; 1929 const char *label;
1928 1930
1929 if (has_12mv_adc(data) || has_10_9mv_adc(data)) 1931 if (has_vin3_5v(data) && nr == 0)
1932 label = labels[0];
1933 else if (has_12mv_adc(data) || has_10_9mv_adc(data))
1930 label = labels_it8721[nr]; 1934 label = labels_it8721[nr];
1931 else 1935 else
1932 label = labels[nr]; 1936 label = labels[nr];