Skip to contentSkip to conversation

hwmon: (it87) Don't configure 16 bit fan counters it not necessary

PATCH In review Guenter Roeck 2 participants 2 messages Feb 25, 2015 – Feb 26, 2015

Subsystems (2)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH v2 1/5 hwmon: (it87) Don't configure 16 bit fan counters it not necessary

On IT8728F, IT8771E, and IT8772E, fans counters are always 16 bit and don't need to be configured for it.

---
v2: Separated changed functionality from 'Add feature flags' patch.

 drivers/hwmon/it87.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/hwmon/it87.c +6 -3
index ed25e4b..e8cbefb 100644
@@ -2463,9 +2463,12 @@ static void it87_init_device(struct platform_device *pdev)
 	}
 	data->has_fan = (data->fan_main_ctrl >> 4) & 0x07;
 
-	/* Set tachometers to 16-bit mode if needed, IT8603E (and IT8728F?)
-	 * has it by default */
-	if (has_16bit_fans(data) && data->type != it8603) {
+	/*
+	 * Set tachometers to 16-bit mode if needed. IT8603E, IT8728F,
+	 * IT8771E (guesswork), and IT8772E have it by default.
+	 */
+	if (has_16bit_fans(data) && data->type != it8603 && data->type != it8728
+	    && data->type != it8771 && data->type != it8772) {
 		tmp = it87_read_value(data, IT87_REG_FAN_16BIT);
 		if (~tmp & 0x07 & data->has_fan) {
 			dev_dbg(&pdev->dev,
Signature · 7 lines
2.1.0


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Reviewed-by on v2 1/5
#1 lore raw
Quoted 20 lines · Guenter Roeck

On IT8728F, IT8771E, and IT8772E, fans counters are always 16 bit and don't need to be configured for it.

---
v2: Separated changed functionality from 'Add feature flags' patch.

 drivers/hwmon/it87.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/hwmon/it87.c +0 -2
index ed25e4b..e8cbefb 100644
@@ -2463,9 +2463,12 @@ static void it87_init_device(struct platform_device *pdev)
 	}
 	data->has_fan = (data->fan_main_ctrl >> 4) & 0x07;
 
-	/* Set tachometers to 16-bit mode if needed, IT8603E (and IT8728F?)
-	 * has it by default */

drivers/hwmon/it87.c static void it87_init_device(struct platform_device *pdev) · line 2474

Quoted 10 lines
drivers/hwmon/it87.c +6 -1
-	if (has_16bit_fans(data) && data->type != it8603) {
+	/*
+	 * Set tachometers to 16-bit mode if needed. IT8603E, IT8728F,
+	 * IT8771E (guesswork), and IT8772E have it by default.
+	 */
+	if (has_16bit_fans(data) && data->type != it8603 && data->type != it8728
+	    && data->type != it8771 && data->type != it8772) {
 		tmp = it87_read_value(data, IT87_REG_FAN_16BIT);
 		if (~tmp & 0x07 & data->has_fan) {
 			dev_dbg(&pdev->dev,

Thanks,

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors