Skip to contentSkip to conversation

hwmon/dme1737: fix temp fault attribute

PATCH RESEND In review Juerg Haefliger 3 participants 3 messages Jul 20, 2007 – Jul 25, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 hwmon/dme1737: fix temp fault attribute

Fix temp?_fault attribute. The temp was incorrectly compared against 0x0800 rather than 0x8000. Only the upper 8 bits are compared as the datasheet doesn't specify what happens to the lower bits in case of a diode fault.

Signed-off-by Juerg Haefliger <juergh at gmail.com>

---

Fix temp?_fault attribute. The temp was incorrectly compared against 0x0800 rather than 0x8000. Only the upper 8 bits are compared as the datasheet doesn't specify what happens to the lower bits in case of a diode fault.

Signed-off-by Juerg Haefliger <juergh at gmail.com>

---

drivers/hwmon/dme1737.c +1 -1
Index: linux-2.6/drivers/hwmon/dme1737.c
===================================================================
@@ -750,7 +750,7 @@
 		res = (data->alarms >> DME1737_BIT_ALARM_TEMP[ix]) & 0x01;
 		break;
 	case SYS_TEMP_FAULT:
-		res = (data->temp[ix] == 0x0800);
+		res = (((u16)data->temp[ix] & 0xff00) == 0x8000);
 		break;
 	default:
 		res = 0;

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

Acked-by on v1 1/1
#1 lore raw

Re: [lm-sensors] [PATCH RESEND] hwmon/dme1737: fix temp fault

Quoted 6 lines · Juerg Haefliger

Fix temp?_fault attribute. The temp was incorrectly compared against 0x0800 rather than 0x8000. Only the upper 8 bits are compared as the datasheet doesn't specify what happens to the lower bits in case of a diode fault.

Signed-off-by Juerg Haefliger <juergh at gmail.com>
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw

Re: [lm-sensors] [PATCH RESEND] hwmon/dme1737: fix temp fault

In reply to Juerg Haefliger

Hi Juerg, Jean:

Quoted 9 lines · Jean Delvare
Quoted 6 lines · Juerg Haefliger

Fix temp?_fault attribute. The temp was incorrectly compared against 0x0800 rather than 0x8000. Only the upper 8 bits are compared as the datasheet doesn't specify what happens to the lower bits in case of a diode fault.

Signed-off-by Juerg Haefliger <juergh at gmail.com>

Applied to hwmon-2.6.git/testing, thanks.

Signature · 8 lines
Mark M. Hoffman
[email protected]


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors