Skip to contentSkip to conversation

thmc50: fixed alarms clearing

PATCH In review Krzysztof Helt 2 participants 2 messages Sep 9, 2007 – Sep 11, 2007 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thmc50: fixed alarms clearing

From: Krzysztof Helt <[email protected]>

This patch make use the interrupt status register instead of the interrupt status mirror register. Reading of the mirror register does not clear alarms.

---

This is just register change (THMC50_REG_INTR_MIRROR to THMC50_REG_INTR).

drivers/hwmon/thmc50.c +4 -3
diff -urp linux-sparc/drivers/hwmon/thmc50.c linux-2.6.23/drivers/hwmon/thmc50.c
@@ -47,10 +47,10 @@ I2C_CLIENT_MODULE_PARM(adm1022_temp3, "L
 #define THMC50_REG_DIE_CODE			0x3F
 #define THMC50_REG_ANALOG_OUT			0x19
 /*
- * We use mirror status register for reading alarms
- * so ACPI can use the primary status register.
+ * The mirror status register cannot be used as
+ * reading it does not clear alarms.
  */
-#define THMC50_REG_INTR_MIRROR			0x4C
+#define THMC50_REG_INTR				0x41
 
 const static u8 THMC50_REG_TEMP[] = { 0x27, 0x26, 0x20 };
 const static u8 THMC50_REG_TEMP_MIN[] = { 0x3A, 0x38, 0x2C };
@@ -459,7 +459,7 @@ static struct thmc50_data *thmc50_update
 		data->analog_out  		    i2c_smbus_read_byte_data(client, THMC50_REG_ANALOG_OUT);
 		data->alarms -		    i2c_smbus_read_byte_data(client, THMC50_REG_INTR_MIRROR);
+		    i2c_smbus_read_byte_data(client, THMC50_REG_INTR);
 		data->last_updated = jiffies;
 		data->valid = 1;
 	}
 

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

#1 lore raw

Hi:

Quoted 7 lines · Krzysztof Helt

From: Krzysztof Helt <[email protected]>

This patch make use the interrupt status register instead of the interrupt status mirror register. Reading of the mirror register does not clear alarms.

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