Home
last modified time | relevance | path

Searched refs:TEMP_TO_REG (Results 1 – 18 of 18) sorted by relevance

/linux/drivers/hwmon/
H A Dlm92.c66 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 Dsmsc47m192.c75 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 Dadm1025.c87 #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 Dadm1031.c198 #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 Dlm85.c146 #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 Dlm78.c97 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 Dadm1026.c206 #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 Dw83793.c199 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 Dgl520sm.c499 #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 Df75375s.c548 #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 Dadm9240.c94 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 Dlm87.c114 #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 Dlm80.c77 #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 Dw83l786ng.c84 #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 Dpc87360.c179 #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 Dasb100.c136 static u8 TEMP_TO_REG(long temp) in TEMP_TO_REG() function
446 data->reg[nr] = TEMP_TO_REG(val); \
H A Dgl518sm.c77 #define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 119) macro
H A Dit87.c689 #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()