Home
last modified time | relevance | path

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

/linux-5.19.10/drivers/hwmon/
Dlm92.c69 static inline s16 TEMP_TO_REG(long val) in TEMP_TO_REG() function
162 data->temp[nr] = TEMP_TO_REG(val); in temp_store()
204 TEMP_TO_REG(TEMP_FROM_REG(data->temp[attr->index]) - val); in temp_hyst_store()
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()
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()
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()
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()
Dsis5595.c148 static inline s8 TEMP_TO_REG(long val) in TEMP_TO_REG() function
322 data->temp_over = TEMP_TO_REG(val); in temp1_max_store()
348 data->temp_hyst = TEMP_TO_REG(val); in temp1_max_hyst_store()
Dvia686a.c271 static inline u8 TEMP_TO_REG(long val) in TEMP_TO_REG() function
459 data->temp_over[nr] = TEMP_TO_REG(val); in temp_over_store()
479 data->temp_hyst[nr] = TEMP_TO_REG(val); in temp_hyst_store()
Dvt1211.c163 #define TEMP_TO_REG(ix, val) clamp_val( \ macro
463 data->temp_max[ix] = TEMP_TO_REG(ix, val); in set_temp()
468 data->temp_hyst[ix] = TEMP_TO_REG(ix, val); in set_temp()
789 data->pwm_auto_temp[ap] = TEMP_TO_REG(data->pwm_ctl[ix] & 7, val); in set_pwm_auto_point_temp()
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()
Dadm9240.c94 static inline s8 TEMP_TO_REG(long val) in TEMP_TO_REG() function
611 return regmap_write(data->regmap, reg, TEMP_TO_REG(val)); in adm9240_temp_write()
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()
Df75375s.c573 #define TEMP_TO_REG(val) ((val) / 1000) macro
613 val = clamp_val(TEMP_TO_REG(val), 0, 127); in set_temp_max()
634 val = clamp_val(TEMP_TO_REG(val), 0, 127); in set_temp_max_hyst()
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()
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()
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()
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()
Ddme1737.c284 static inline int TEMP_TO_REG(long val) in TEMP_TO_REG() function
932 data->temp_min[ix] = TEMP_TO_REG(val); in set_temp()
937 data->temp_max[ix] = TEMP_TO_REG(val); in set_temp()
942 data->temp_offset[ix] = TEMP_TO_REG(val); in set_temp()
1037 data->zone_low[ix] = TEMP_TO_REG(val); in set_zone()
1057 data->zone_abs[ix] = TEMP_TO_REG(val); in set_zone()
Dw83l786ng.c85 #define TEMP_TO_REG(val) (clamp_val(((val) < 0 ? (val) + 0x100 * 1000 \ macro
434 data->temp[nr][index] = TEMP_TO_REG(val); in store_temp()
Dpc87360.c167 #define TEMP_TO_REG(val) ((val) < -55000 ? -55 : \ macro
899 data->temp_min[attr->index] = TEMP_TO_REG(val); in temp_min_store()
920 data->temp_max[attr->index] = TEMP_TO_REG(val); in temp_max_store()
941 data->temp_crit[attr->index] = TEMP_TO_REG(val); in temp_crit_store()
Dasb100.c136 static u8 TEMP_TO_REG(long temp) in TEMP_TO_REG() function
446 data->reg[nr] = TEMP_TO_REG(val); \
Dw83627hf.c268 static u8 TEMP_TO_REG(long temp) in TEMP_TO_REG() function
758 tmp = (nr) ? LM75_TEMP_TO_REG(val) : TEMP_TO_REG(val); in temp_max_store()
780 tmp = (nr) ? LM75_TEMP_TO_REG(val) : TEMP_TO_REG(val); in temp_max_hyst_store()
Dit87.c613 #define TEMP_TO_REG(val) (clamp_val(((val) < 0 ? (((val) - 500) / 1000) : \ macro
988 data->temp[nr][index] = TEMP_TO_REG(val); in set_temp()
1609 reg = data->auto_temp[nr][1] - TEMP_TO_REG(val); in set_auto_temp()
1614 reg = TEMP_TO_REG(val); in set_auto_temp()
Dgl518sm.c77 #define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 119) macro
Dw83781d.c171 #define TEMP_TO_REG(val) clamp_val((val) / 1000, -127, 128) macro
382 data->temp_##reg = TEMP_TO_REG(val); \