Preserve other bits when forcing temp2/3 to comparator mode.

Backported from Linux 2.6. Requested by Keith Duthie.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2302 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2004-02-21 14:10:31 +00:00
1 parent ed4282e27c
commit f7b2534fba
2 files changed
+9 -2

No files matched your search

+4 -1
View File
@@ -916,7 +916,10 @@ static void w83627hf_init_client(struct i2c_client *client)
}
/* enable comparator mode for temp2 and temp3 so
alarm indication will work correctly */
w83627hf_write_value(client, W83781D_REG_IRQ, 0x41);
i = w83627hf_read_value(client, W83781D_REG_IRQ);
if (!(i & 0x40))
w83627hf_write_value(client, W83781D_REG_IRQ,
i | 0x40);
}
/* Start monitoring */
+5 -1
View File
@@ -1378,7 +1378,11 @@ static void w83781d_init_client(struct i2c_client *client)
if (type != w83781d) {
/* enable comparator mode for temp2 and temp3 so
alarm indication will work correctly */
w83781d_write_value(client, W83781D_REG_IRQ, 0x41);
i = w83781d_read_value(client, W83781D_REG_IRQ);
if (!(i & 0x40))
w83781d_write_value(client, W83781D_REG_IRQ,
i | 0x40);
for(i = 0; i < 3; i++)
data->pwmenable[i] = 1;
}