Home
last modified time | relevance | path

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

/openbmc/linux/drivers/hwmon/
H A 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()
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 Dvia686a.c273 static inline u8 TEMP_TO_REG(long val) in TEMP_TO_REG() function
526 data->temp_over[nr] = TEMP_TO_REG(val); in temp_over_store()
546 data->temp_hyst[nr] = TEMP_TO_REG(val); in temp_hyst_store()
H A Dsis5595.c149 static inline s8 TEMP_TO_REG(long val) in TEMP_TO_REG() function
377 data->temp_over = TEMP_TO_REG(val); in temp1_max_store()
403 data->temp_hyst = TEMP_TO_REG(val); in temp1_max_hyst_store()
H A Dvt1211.c163 #define TEMP_TO_REG(ix, val) clamp_val( \ macro
457 data->temp_max[ix] = TEMP_TO_REG(ix, val); in set_temp()
462 data->temp_hyst[ix] = TEMP_TO_REG(ix, val); in set_temp()
783 data->pwm_auto_temp[ap] = TEMP_TO_REG(data->pwm_ctl[ix] & 7, val); in set_pwm_auto_point_temp()
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 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 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()
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 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 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 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()
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 Dw83627hf.c268 static u8 TEMP_TO_REG(long temp) in TEMP_TO_REG() function
1239 tmp = (nr) ? LM75_TEMP_TO_REG(val) : TEMP_TO_REG(val); in temp_max_store()
1273 tmp = (nr) ? LM75_TEMP_TO_REG(val) : TEMP_TO_REG(val); in temp_max_hyst_store()
H A Dgl518sm.c77 #define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 119) macro
H A Dit87.c688 #define TEMP_TO_REG(val) (clamp_val(((val) < 0 ? (((val) - 500) / 1000) : \ macro
1135 data->temp[nr][index] = TEMP_TO_REG(val); in set_temp()
1868 reg = data->auto_temp[nr][1] - TEMP_TO_REG(val); in set_auto_temp()
1873 reg = TEMP_TO_REG(val); in set_auto_temp()
H A Dw83781d.c171 #define TEMP_TO_REG(val) clamp_val((val) / 1000, -127, 128) macro
382 data->temp_##reg = TEMP_TO_REG(val); \