From: Jean Delvare Date: Sun, 24 Jun 2007 09:20:13 +0000 (+0200) Subject: hwmon/w83627ehf: Enable VBAT monitoring X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3130f0e30745b406af233897a27834eb5285f45;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git hwmon/w83627ehf: Enable VBAT monitoring If VBAT monitoring is disabled, enable it. Original patch from an anonymous contributor on the lm-sensors trac system: http://lm-sensors.org/ticket/2218 Signed-off-by: Jean Delvare Signed-off-by: Mark M. Hoffman --- diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index a336793c1caf..e87fcf87a6e2 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1205,6 +1205,11 @@ static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data) W83627EHF_REG_TEMP_CONFIG[i], tmp & 0xfe); } + + /* Enable VBAT monitoring if needed */ + tmp = w83627ehf_read_value(data, W83627EHF_REG_VBAT); + if (!(tmp & 0x01)) + w83627ehf_write_value(data, W83627EHF_REG_VBAT, tmp | 0x01); } static int __devinit w83627ehf_probe(struct platform_device *pdev)