Changeset 2124
- Timestamp:
- 11/30/03 12:40:20 (9 years ago)
- Location:
- lm-sensors/trunk/kernel/chips
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/chips/it87.c
r2068 r2124 138 138 #define PIIDIODE 3 139 139 140 /* Conversions. Rounding and limit checking is only done on the TO_REG140 /* Conversions. Limit checking is only done on the TO_REG 141 141 variants. Note that you should be a bit careful with which arguments 142 142 these macros are called: arguments may be evaluated more than once. 143 143 Fixing this is just not worth it. */ 144 144 #define IN_TO_REG(val) (SENSORS_LIMIT((((val) * 10 + 8)/16),0,255)) 145 #define IN_FROM_REG(val) (((val) * 16 ) / 10)145 #define IN_FROM_REG(val) (((val) * 16 + 5) / 10) 146 146 147 147 static inline u8 FAN_TO_REG(long rpm, int div) -
lm-sensors/trunk/kernel/chips/lm78.c
r2069 r2124 74 74 75 75 76 /* Conversions. Rounding and limit checking is only done on the TO_REG76 /* Conversions. Limit checking is only done on the TO_REG 77 77 variants. Note that you should be a bit careful with which arguments 78 78 these macros are called: arguments may be evaluated more than once. 79 79 Fixing this is just not worth it. */ 80 80 #define IN_TO_REG(val) (SENSORS_LIMIT((((val) * 10 + 8)/16),0,255)) 81 #define IN_FROM_REG(val) (((val) * 16 ) / 10)81 #define IN_FROM_REG(val) (((val) * 16 + 5) / 10) 82 82 83 83 static inline u8 FAN_TO_REG(long rpm, int div) -
lm-sensors/trunk/kernel/chips/mtp008.c
r2070 r2124 103 103 104 104 /* 105 * Conversion routines and macros. Rounding and limit checking is only done on105 * Conversion routines and macros. Limit checking is only done on 106 106 * the TO_REG variants. 107 107 * … … 111 111 */ 112 112 #define IN_TO_REG(val) (SENSORS_LIMIT((((val) * 10 + 8) / 16), 0, 255)) 113 #define IN_FROM_REG(val) (((val) * 16 ) / 10)113 #define IN_FROM_REG(val) (((val) * 16 + 5) / 10) 114 114 115 115 /* -
lm-sensors/trunk/kernel/chips/sis5595.c
r2123 r2124 139 139 #define SIS5595_REG_FANDIV 0x47 140 140 141 /* Conversions. Rounding and limit checking is only done on the TO_REG141 /* Conversions. Limit checking is only done on the TO_REG 142 142 variants. Note that you should be a bit careful with which arguments 143 143 these macros are called: arguments may be evaluated more than once. … … 145 145 146 146 #define IN_TO_REG(val) (SENSORS_LIMIT((((val) * 10 + 8)/16),0,255)) 147 #define IN_FROM_REG(val) (((val) * 16 ) / 10)147 #define IN_FROM_REG(val) (((val) * 16 + 5) / 10) 148 148 149 149 static inline u8 FAN_TO_REG(long rpm, int div) -
lm-sensors/trunk/kernel/chips/w83627hf.c
r2070 r2124 200 200 #define W83781D_DEFAULT_BETA 3435 201 201 202 /* Conversions. Rounding and limit checking is only done on the TO_REG202 /* Conversions. Limit checking is only done on the TO_REG 203 203 variants. Note that you should be a bit careful with which arguments 204 204 these macros are called: arguments may be evaluated more than once. 205 205 Fixing this is just not worth it. */ 206 206 #define IN_TO_REG(val) (SENSORS_LIMIT((((val) * 10 + 8)/16),0,255)) 207 #define IN_FROM_REG(val) (((val) * 16 ) / 10)207 #define IN_FROM_REG(val) (((val) * 16 + 5) / 10) 208 208 209 209 static inline u8 FAN_TO_REG(long rpm, int div)
