Changeset 2478
- Timestamp:
- 04/25/04 21:43:54 (9 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/kernel/chips/via686a.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/chips/via686a.c
r2458 r2478 110 110 #define VIA686A_TEMP_MODE_CONTINUOUS (0x00) 111 111 112 /* Conversions. Rounding and limit checking is only done on the TO_REG112 /* Conversions. Limit checking is only done on the TO_REG 113 113 variants. */ 114 114 … … 129 129 { 130 130 /* To avoid floating point, we multiply constants by 10 (100 for +12V). 131 Rounding is done (120500 0 is actually 1330000 - 125000).131 Rounding is done (120500 is actually 133000 - 12500). 132 132 Remember that val is expressed in 0.01V/bit, which is why we divide 133 133 by an additional 1000 (10000 for +12V): 100 for val and 10 (100) … … 135 135 if (inNum <= 1) 136 136 return (u8) 137 SENSORS_LIMIT((val * 21024 - 120500 0) / 250000, 0, 255);137 SENSORS_LIMIT((val * 21024 - 120500) / 25000, 0, 255); 138 138 else if (inNum == 2) 139 139 return (u8) 140 SENSORS_LIMIT((val * 15737 - 120500 0) / 250000, 0, 255);140 SENSORS_LIMIT((val * 15737 - 120500) / 25000, 0, 255); 141 141 else if (inNum == 3) 142 142 return (u8) 143 SENSORS_LIMIT((val * 10108 - 120500 0) / 250000, 0, 255);143 SENSORS_LIMIT((val * 10108 - 120500) / 25000, 0, 255); 144 144 else 145 145 return (u8) 146 SENSORS_LIMIT((val * 41714 - 1205000 0) / 2500000, 0, 255);146 SENSORS_LIMIT((val * 41714 - 1205000) / 250000, 0, 255); 147 147 } 148 148
