Skip to content

Commit f4f3e5d

Browse files
frankcrawfordgroeck
authored andcommitted
hwmon: (it87) Rename FEAT_CONF_NOEXIT to FEAT_NOCONF as more descriptive of requirement
Rename previous definitions to match the new information that they are preinitialised as enabled and should not receive codes to enter or exit configuration mode. Signed-off-by: Frank Crawford <frank@crawford.emu.id.au> Link: https://lore.kernel.org/r/20240428060653.2425296-2-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 35fe06d commit f4f3e5d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/hwmon/it87.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ struct it87_devices {
320320
* second SIO address. Never exit configuration mode on these
321321
* chips to avoid the problem.
322322
*/
323-
#define FEAT_CONF_NOEXIT BIT(19) /* Chip should not exit conf mode */
323+
#define FEAT_NOCONF BIT(19) /* Chip conf mode enabled on startup */
324324
#define FEAT_FOUR_FANS BIT(20) /* Supports four fans */
325325
#define FEAT_FOUR_PWM BIT(21) /* Supports four fan controls */
326326
#define FEAT_FOUR_TEMP BIT(22)
@@ -452,7 +452,7 @@ static const struct it87_devices it87_devices[] = {
452452
.model = "IT8790E",
453453
.features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
454454
| FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL
455-
| FEAT_PWM_FREQ2 | FEAT_FANCTL_ONOFF | FEAT_CONF_NOEXIT,
455+
| FEAT_PWM_FREQ2 | FEAT_FANCTL_ONOFF | FEAT_NOCONF,
456456
.peci_mask = 0x07,
457457
},
458458
[it8792] = {
@@ -461,7 +461,7 @@ static const struct it87_devices it87_devices[] = {
461461
.features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS
462462
| FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI
463463
| FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_FANCTL_ONOFF
464-
| FEAT_CONF_NOEXIT,
464+
| FEAT_NOCONF,
465465
.peci_mask = 0x07,
466466
.old_peci_mask = 0x02, /* Actually reports PCH */
467467
},
@@ -507,7 +507,7 @@ static const struct it87_devices it87_devices[] = {
507507
.features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS
508508
| FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI
509509
| FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL | FEAT_FANCTL_ONOFF
510-
| FEAT_CONF_NOEXIT,
510+
| FEAT_NOCONF,
511511
.peci_mask = 0x07,
512512
.old_peci_mask = 0x02, /* Actually reports PCH */
513513
},
@@ -544,7 +544,7 @@ static const struct it87_devices it87_devices[] = {
544544
#define has_four_temp(data) ((data)->features & FEAT_FOUR_TEMP)
545545
#define has_six_temp(data) ((data)->features & FEAT_SIX_TEMP)
546546
#define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V)
547-
#define has_conf_noexit(data) ((data)->features & FEAT_CONF_NOEXIT)
547+
#define has_noconf(data) ((data)->features & FEAT_NOCONF)
548548
#define has_scaling(data) ((data)->features & (FEAT_12MV_ADC | \
549549
FEAT_10_9MV_ADC))
550550
#define has_fanctl_onoff(data) ((data)->features & FEAT_FANCTL_ONOFF)
@@ -748,7 +748,7 @@ static int smbus_disable(struct it87_data *data)
748748
superio_select(data->sioaddr, PME);
749749
superio_outb(data->sioaddr, IT87_SPECIAL_CFG_REG,
750750
data->ec_special_config & ~data->smbus_bitmap);
751-
superio_exit(data->sioaddr, has_conf_noexit(data));
751+
superio_exit(data->sioaddr, has_noconf(data));
752752
}
753753
return 0;
754754
}
@@ -765,7 +765,7 @@ static int smbus_enable(struct it87_data *data)
765765
superio_select(data->sioaddr, PME);
766766
superio_outb(data->sioaddr, IT87_SPECIAL_CFG_REG,
767767
data->ec_special_config);
768-
superio_exit(data->sioaddr, has_conf_noexit(data));
768+
superio_exit(data->sioaddr, has_noconf(data));
769769
}
770770
return 0;
771771
}
@@ -3143,7 +3143,7 @@ static int __init it87_find(int sioaddr, unsigned short *address,
31433143
}
31443144

31453145
exit:
3146-
superio_exit(sioaddr, config ? has_conf_noexit(config) : false);
3146+
superio_exit(sioaddr, config ? has_noconf(config) : false);
31473147
return err;
31483148
}
31493149

@@ -3540,7 +3540,7 @@ static void it87_resume_sio(struct platform_device *pdev)
35403540
reg2c);
35413541
}
35423542

3543-
superio_exit(data->sioaddr, has_conf_noexit(data));
3543+
superio_exit(data->sioaddr, has_noconf(data));
35443544
}
35453545

35463546
static int it87_resume(struct device *dev)

0 commit comments

Comments
 (0)