From d3fa22cae3a5c21c663cc9eb48858b06248a9a43 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 26 Jan 2005 21:42:04 +0000 Subject: [PATCH] Make sure that temp2 and temp3 are not disabled. Let's just hope it won't cause trouble if these channels are actually not connected. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2872 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/w83627hf.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/kernel/chips/w83627hf.c b/kernel/chips/w83627hf.c index 296fb6eb..f2da7a2c 100644 --- a/kernel/chips/w83627hf.c +++ b/kernel/chips/w83627hf.c @@ -924,6 +924,28 @@ static void w83627hf_init_client(struct i2c_client *client) data->pwmenable[2] = 1; if(init) { + /* Enable temp2 */ + tmp = w83627hf_read_value(client, W83781D_REG_TEMP2_CONFIG); + if (tmp & 0x01) { + printk(KERN_WARNING "w83627hf: temp2 was disabled, " + "readings might not make sense\n"); + w83627hf_write_value(client, W83781D_REG_TEMP2_CONFIG, + tmp & 0xfe); + } + + /* Enable temp3 */ + if (type != w83697hf) { + tmp = w83627hf_read_value(client, + W83781D_REG_TEMP3_CONFIG); + if (tmp & 0x01) { + printk(KERN_WARNING "w83627hf: temp3 was " + "disabled, readings might not make " + "sense\n"); + w83627hf_write_value(client, + W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); + } + } + if (type == w83627hf) { /* enable PWM2 control (can't hurt since PWM reg should have been reset to 0xff) */