Skip to contentSkip to conversation

hwmon: (w83627ehf) Force initial bank selection

PATCH In review Jean Delvare 2 participants 2 messages Oct 26, 2012 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (w83627ehf) Force initial bank selection

Don't assume bank 0 is selected at device probe time. This may not be the case. Force bank selection at first register access to guarantee that we read the right registers upon driver loading.

---
 drivers/hwmon/w83627ehf.c |    1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/w83627ehf.c +1 -0
@@ -2083,6 +2083,7 @@ static int __devinit w83627ehf_probe(str
 	mutex_init(&data->lock);
 	mutex_init(&data->update_lock);
 	data->name = w83627ehf_device_names[sio_data->kind];
+	data->bank = 0xff;		/* Force initial bank selection */
 	platform_set_drvdata(pdev, data);
 
 	/* 627EHG and 627EHF have 10 voltage inputs; 627DHG and 667HG have 9 */
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jean Delvare

Don't assume bank 0 is selected at device probe time. This may not be the case. Force bank selection at first register access to guarantee that we read the right registers upon driver loading.

Excellent idea.

Quoted 19 lines
---
 drivers/hwmon/w83627ehf.c |    1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/w83627ehf.c +1 -0
@@ -2083,6 +2083,7 @@ static int __devinit w83627ehf_probe(str
 	mutex_init(&data->lock);
 	mutex_init(&data->update_lock);
 	data->name = w83627ehf_device_names[sio_data->kind];
+	data->bank = 0xff;		/* Force initial bank selection */
 	platform_set_drvdata(pdev, data);
 
 	/* 627EHG and 627EHF have 10 voltage inputs; 627DHG and 667HG have 9 */
Signature · 2 lines
-- 
Jean Delvare

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