On Mon, Jul 16, 2007 at 03:19:04PM -0700, Philip Pokorny wrote: > The values 0x81 and 0x7f are *signed* 8 bit quantities. 0x81 whould be considered -127 Ah yes, excellent point. Here's a patch to correct that. --- adt7470: Temperature sensors are signed quantities Philip Pokorny points out that the temperature sensors are signed quantities, hence the anomalous looking readings reported by Vadim Zeitlin. Signed-off-by: Darrick J. Wong <djwong at us.ibm.com> --- drivers/hwmon/adt7470.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 33a66ac..75aee3b 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c @@ -125,9 +125,9 @@ struct adt7470_data { char valid; unsigned long last_updated; /* In jiffies */ - u8 temp[ADT7470_TEMP_COUNT]; - u8 temp_min[ADT7470_TEMP_COUNT]; - u8 temp_max[ADT7470_TEMP_COUNT]; + s8 temp[ADT7470_TEMP_COUNT]; + s8 temp_min[ADT7470_TEMP_COUNT]; + s8 temp_max[ADT7470_TEMP_COUNT]; u16 fan[ADT7470_FAN_COUNT]; u16 fan_min[ADT7470_FAN_COUNT]; u16 fan_max[ADT7470_FAN_COUNT]; @@ -137,7 +137,7 @@ struct adt7470_data { u8 pwm_max[ADT7470_PWM_COUNT]; u8 pwm_automatic[ADT7470_PWM_COUNT]; u8 pwm_min[ADT7470_PWM_COUNT]; - u8 pwm_tmin[ADT7470_PWM_COUNT]; + s8 pwm_tmin[ADT7470_PWM_COUNT]; u8 pwm_auto_temp[ADT7470_PWM_COUNT]; }; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070716/26f50108/attachment.bin