Skip to contentSkip to conversation

hwmon: (w83627ehf) Detect current and voltage mode for thermal diodes

PATCH In review Guenter Roeck 1 participant 2 messages Mar 13, 2013 – Mar 14, 2013 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 2/5 hwmon: (w83627ehf) Detect current and voltage mode for thermal diodes

---
 drivers/hwmon/w83627ehf.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/hwmon/w83627ehf.c +6 -0
index d985406..5058b3a 100644
@@ -192,6 +192,7 @@ static const u16 W83627EHF_REG_TEMP_CONFIG[] = { 0, 0x152, 0x252, 0 };
 #define W83627EHF_REG_FANDIV2		0x4B
 #define W83627EHF_REG_VBAT		0x5D
 #define W83627EHF_REG_DIODE		0x59
+#define W83627EHF_REG_DIODE_2		0x5E
 #define W83627EHF_REG_SMI_OVT		0x4C
 
 /* NCT6775F has its own fan divider registers */
@@ -1913,6 +1914,11 @@ static inline void w83627ehf_init_device(struct w83627ehf_data *data,
 	case w83627uhg:
 		diode = 0x00;
 		break;
+	case nct6775:
+	case nct6776:
+		/* Select current vs. voltage mode */
+		diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE_2) << 3;
+		break;
 	default:
 		diode = 0x70;
 	}
Signature · 7 lines
1.7.9.7


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