]> err.no Git - linux-2.6/commitdiff
hwmon: (w83627hf) Enable VBAT monitoring
authorJean Delvare <khali@linux-fr.org>
Thu, 3 Jan 2008 21:54:13 +0000 (22:54 +0100)
committerMark M. Hoffman <mhoffman@lightlink.com>
Fri, 8 Feb 2008 01:39:45 +0000 (20:39 -0500)
If VBAT monitoring is disabled, enable it. Bug reported on the
lm-sensors trac system:
http://lm-sensors.org/ticket/2282
This is the exact same patch that was applied to the w83627ehf driver
6 months ago.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
drivers/hwmon/w83627hf.c

index 181f4e8590b1cc3eaf5a21dd01fa1b9e9bfa87ae..185ae1b8027df5a5af07a028dcecab9a5143b075 100644 (file)
@@ -1515,6 +1515,11 @@ static void __devinit w83627hf_init_device(struct platform_device *pdev)
                            (w83627hf_read_value(data,
                                                W83781D_REG_CONFIG) & 0xf7)
                            | 0x01);
+
+       /* Enable VBAT monitoring if needed */
+       tmp = w83627hf_read_value(data, W83781D_REG_VBAT);
+       if (!(tmp & 0x01))
+               w83627hf_write_value(data, W83781D_REG_VBAT, tmp | 0x01);
 }
 
 static void w83627hf_update_fan_div(struct w83627hf_data *data)