Skip to contentSkip to conversation

Hangs with w83781d

PATCH New Jean Delvare 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Hangs with w83781d

Hi Greg,

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.

I have backported this change to the w83781d driver in our CVS repository, as well as in our w83627hf, which had the same problem.

Please apply.
Thanks.

drivers/i2c/chips/w83781d.c renamed from drivers/i2c/chips/w83781d.c.orig +5 -1
@@ -1632,7 +1632,11 @@
 		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;
 		}
Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
Applied
#1 lore raw

PATCH 1/1 Hangs with w83781d

Quoted 8 lines · Jean Delvare

Hi Greg,

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.

Quoted 4 lines

I have backported this change to the w83781d driver in our CVS repository, as well as in our w83627hf, which had the same problem.

Please apply.

Applied, thanks.

greg k-h