From 750f943973b020bce4d5854438c451863de4e3fc Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 18 Jun 2007 12:17:05 +0000 Subject: [PATCH] If VBAT monitoring is disabled, enable it. Original patch from an anonymous contributor in ticket #2218. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4455 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/w83627ehf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/chips/w83627ehf.c b/kernel/chips/w83627ehf.c index 7a21a032..a724a47f 100644 --- a/kernel/chips/w83627ehf.c +++ b/kernel/chips/w83627ehf.c @@ -894,6 +894,12 @@ static void w83627ehf_init_client(struct i2c_client *client) tmp & 0xfe); } + /* Enable VBAT monitoring if needed */ + tmp = w83627ehf_read_value(client, W83627EHF_REG_VBAT); + if (!(tmp & 0x01)) { + printk(KERN_INFO "w83627ehf: Enabling VBAT monitoring\n"); + w83627ehf_write_value(client, W83627EHF_REG_VBAT, tmp | 0x01); + } } static int w83627ehf_detect(struct i2c_adapter *adapter, int address,