diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-12 19:25:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-12 19:25:04 -0400 |
commit | 5216a3c6d10c891015474fbf7126c92a1845bf74 (patch) | |
tree | 8655b8f225c620432368db57195e69884beee506 /drivers/hwmon/it87.c | |
parent | ab03eca8d4754ef2ba9821d581975b10b8f317e7 (diff) | |
parent | 51b3e2700177b89fdb0d985926ce777a7ad52b15 (diff) |
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon: (f75375s) Remove unnecessary and confusing initialization
hwmon: (it87) Properly decode -128 degrees C temperature
hwmon: (lm90) Document support for the MAX6648/6692 chips
hwmon: (abituguru3) Fix I/O error handling
Diffstat (limited to 'drivers/hwmon/it87.c')
-rw-r--r-- | drivers/hwmon/it87.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 95a99c590da2..9157247fed8e 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -213,7 +213,7 @@ static inline u16 FAN16_TO_REG(long rpm) | |||
213 | 213 | ||
214 | #define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\ | 214 | #define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\ |
215 | ((val)+500)/1000),-128,127)) | 215 | ((val)+500)/1000),-128,127)) |
216 | #define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*1000) | 216 | #define TEMP_FROM_REG(val) ((val) * 1000) |
217 | 217 | ||
218 | #define PWM_TO_REG(val) ((val) >> 1) | 218 | #define PWM_TO_REG(val) ((val) >> 1) |
219 | #define PWM_FROM_REG(val) (((val)&0x7f) << 1) | 219 | #define PWM_FROM_REG(val) (((val)&0x7f) << 1) |
@@ -267,9 +267,9 @@ struct it87_data { | |||
267 | u8 has_fan; /* Bitfield, fans enabled */ | 267 | u8 has_fan; /* Bitfield, fans enabled */ |
268 | u16 fan[5]; /* Register values, possibly combined */ | 268 | u16 fan[5]; /* Register values, possibly combined */ |
269 | u16 fan_min[5]; /* Register values, possibly combined */ | 269 | u16 fan_min[5]; /* Register values, possibly combined */ |
270 | u8 temp[3]; /* Register value */ | 270 | s8 temp[3]; /* Register value */ |
271 | u8 temp_high[3]; /* Register value */ | 271 | s8 temp_high[3]; /* Register value */ |
272 | u8 temp_low[3]; /* Register value */ | 272 | s8 temp_low[3]; /* Register value */ |
273 | u8 sensor; /* Register value */ | 273 | u8 sensor; /* Register value */ |
274 | u8 fan_div[3]; /* Register encoding, shifted right */ | 274 | u8 fan_div[3]; /* Register encoding, shifted right */ |
275 | u8 vid; /* Register encoding, combined */ | 275 | u8 vid; /* Register encoding, combined */ |