/linux/drivers/hwmon/ |
H A D | lm92.c | 66 static inline s16 TEMP_TO_REG(long val, int resolution) in TEMP_TO_REG() function 206 val = TEMP_TO_REG(TEMP_FROM_REG(temp) - val, data->resolution); in lm92_temp_write() 214 return regmap_write(regmap, reg, TEMP_TO_REG(val, data->resolution)); in lm92_temp_write()
|
H A D | smsc47m192.c | 75 static inline s8 TEMP_TO_REG(long val) in TEMP_TO_REG() function 309 data->temp_min[nr] = TEMP_TO_REG(val); in temp_min_store() 332 data->temp_max[nr] = TEMP_TO_REG(val); in temp_max_store() 365 data->temp_offset[nr] = TEMP_TO_REG(val); in temp_offset_store()
|
H A D | adm1025.c | 87 #define TEMP_TO_REG(val) ((val) <= -127500 ? -128 : \ macro 290 data->temp_min[index] = TEMP_TO_REG(val); in temp_min_store() 312 data->temp_max[index] = TEMP_TO_REG(val); in temp_max_store()
|
H A D | adm1031.c | 198 #define TEMP_TO_REG(val) (((val) < 0 ? ((val - 500) / 1000) : \ macro 205 #define TEMP_OFFSET_TO_REG(val) (TEMP_TO_REG(val) & 0x8f) 743 data->temp_min[nr] = TEMP_TO_REG(val); in temp_min_store() 765 data->temp_max[nr] = TEMP_TO_REG(val); in temp_max_store() 787 data->temp_crit[nr] = TEMP_TO_REG(val); in temp_crit_store()
|
H A D | lm85.c | 146 #define TEMP_TO_REG(val) \ macro 970 data->temp_min[nr] = TEMP_TO_REG(val); in temp_min_store() 1002 data->temp_max[nr] = TEMP_TO_REG(val); in temp_max_store() 1193 data->zone[nr].limit = TEMP_TO_REG(val); in temp_auto_temp_min_store() 1236 data->zone[nr].max_desired = TEMP_TO_REG(val); in temp_auto_temp_max_store() 1270 data->zone[nr].critical = TEMP_TO_REG(val); in temp_auto_temp_crit_store()
|
H A D | lm78.c | 97 static inline s8 TEMP_TO_REG(long val) in TEMP_TO_REG() function 256 data->temp_over = TEMP_TO_REG(val); in temp1_max_store() 282 data->temp_hyst = TEMP_TO_REG(val); in temp1_max_hyst_store()
|
H A D | adm1026.c | 206 #define TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), \ macro 823 data->temp_min[nr] = TEMP_TO_REG(val); in temp_min_store() 853 data->temp_max[nr] = TEMP_TO_REG(val); in temp_max_store() 894 data->temp_offset[nr] = TEMP_TO_REG(val); in temp_offset_store() 950 data->temp_tmin[nr] = TEMP_TO_REG(val); in temp_auto_point1_temp_store() 1030 data->temp_crit[nr] = TEMP_TO_REG(val); in temp_crit_store()
|
H A D | w83793.c | 199 static inline s8 TEMP_TO_REG(long val, s8 min, s8 max) in TEMP_TO_REG() function 596 data->temp[index][nr] = TEMP_TO_REG(tmp, -128, 127); in store_temp() 746 data->temp_critical |= TEMP_TO_REG(val, 0, 0x7f); in store_sf_setup() 850 data->temp_cruise[index] |= TEMP_TO_REG(val, 0, 0x7f); in store_sf_ctrl() 861 data->tolerance[i] |= TEMP_TO_REG(val, 0, 0x0f) << shift; in store_sf_ctrl() 939 val = TEMP_TO_REG(val, 0, 0x7f); in store_sf2_temp()
|
H A D | gl520sm.c | 499 #define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 130) macro 543 data->temp_max[n] = TEMP_TO_REG(v); in temp_max_store() 564 data->temp_max_hyst[n] = TEMP_TO_REG(v); in temp_max_hyst_store()
|
H A D | f75375s.c | 548 #define TEMP_TO_REG(val) ((val) / 1000) macro 588 val = clamp_val(TEMP_TO_REG(val), 0, 127); in set_temp_max() 609 val = clamp_val(TEMP_TO_REG(val), 0, 127); in set_temp_max_hyst()
|
H A D | adm9240.c | 94 static inline s8 TEMP_TO_REG(long val) in TEMP_TO_REG() function 617 return regmap_write(data->regmap, reg, TEMP_TO_REG(val)); in adm9240_temp_write()
|
H A D | lm87.c | 114 #define TEMP_TO_REG(val) ((val) <= -127500 ? -128 : \ macro 407 data->temp_low[nr] = TEMP_TO_REG(val); in temp_low_store() 428 data->temp_high[nr] = TEMP_TO_REG(val); in temp_high_store()
|
H A D | lm80.c | 77 #define TEMP_TO_REG(temp) (DIV_ROUND_CLOSEST(clamp_val((temp), \ macro 425 data->temp[nr] = TEMP_TO_REG(val); in temp_store()
|
H A D | w83l786ng.c | 84 #define TEMP_TO_REG(val) (clamp_val(((val) < 0 ? (val) + 0x100 * 1000 \ macro 433 data->temp[nr][index] = TEMP_TO_REG(val); in store_temp()
|
H A D | pc87360.c | 179 #define TEMP_TO_REG(val) ((val) < -55000 ? -55 : \ macro 931 data->temp_min[attr->index] = TEMP_TO_REG(val); in temp_min_store() 966 data->temp_max[attr->index] = TEMP_TO_REG(val); in temp_max_store() 1002 data->temp_crit[attr->index] = TEMP_TO_REG(val); in temp_crit_store()
|
H A D | asb100.c | 136 static u8 TEMP_TO_REG(long temp) in TEMP_TO_REG() function 446 data->reg[nr] = TEMP_TO_REG(val); \
|
H A D | gl518sm.c | 77 #define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 119) macro
|
H A D | it87.c | 689 #define TEMP_TO_REG(val) (clamp_val(((val) < 0 ? (((val) - 500) / 1000) : \ macro 1136 data->temp[nr][index] = TEMP_TO_REG(val); in set_temp() 1869 reg = data->auto_temp[nr][1] - TEMP_TO_REG(val); in set_auto_temp() 1874 reg = TEMP_TO_REG(val); in set_auto_temp()
|