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
This commit is contained in:
Jean Delvare committed 2005-01-26 21:42:04 +00:00
1 parent a0a471c8c5
commit d3fa22cae3
1 file changed
+22
+22
View File
@@ -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) */