Commit 0285be0a authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: fix Hangs with w83781d

Here is a patch for the w83781d driver that prevents register bits from
being arbitrary changed when we force temp2/3 to comparator mode. Keith
Duthie had been reporting various problems with that driver and finally
found that this arbitrary change was the cause of them. He also tested
this patch, which he confirmed to work.
parent 60a1cfac
......@@ -1632,7 +1632,11 @@ 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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment