Home
last modified time | relevance | path

Searched refs:IN_TO_REG (Results 1 – 19 of 19) sorted by relevance

/linux-5.19.10/drivers/hwmon/
Dadm1025.c82 #define IN_TO_REG(val, scale) ((val) <= 0 ? 0 : \ macro
228 data->in_min[index] = IN_TO_REG(val, in_scale[index]); in in_min_store()
249 data->in_max[index] = IN_TO_REG(val, in_scale[index]); in in_max_store()
Dsmsc47m192.c65 static inline u8 IN_TO_REG(unsigned long val, int n) in IN_TO_REG() function
211 data->in_min[nr] = IN_TO_REG(val, nr); in in_min_store()
233 data->in_max[nr] = IN_TO_REG(val, nr); in in_max_store()
Dsis5595.c119 static inline u8 IN_TO_REG(unsigned long val) in IN_TO_REG() function
252 data->in_min[nr] = IN_TO_REG(val); in in_min_store()
272 data->in_max[nr] = IN_TO_REG(val); in in_max_store()
Dvia686a.c114 static inline u8 IN_TO_REG(long val, int in_num) in IN_TO_REG() function
381 data->in_min[nr] = IN_TO_REG(val, nr); in in_min_store()
400 data->in_max[nr] = IN_TO_REG(val, nr); in in_max_store()
Dpc87360.c150 #define IN_TO_REG(val, ref) ((val) < 0 ? 0 : \ macro
437 data->in_min[attr->index] = IN_TO_REG(val, data->in_vref); in in_min_store()
457 data->in_max[attr->index] = IN_TO_REG(val, in in_max_store()
697 data->in_min[attr->index] = IN_TO_REG(val, data->in_vref); in therm_min_store()
718 data->in_max[attr->index] = IN_TO_REG(val, data->in_vref); in therm_max_store()
738 data->in_crit[attr->index-11] = IN_TO_REG(val, data->in_vref); in therm_crit_store()
Dlm78.c72 static inline u8 IN_TO_REG(unsigned long val) in IN_TO_REG() function
180 data->in_min[nr] = IN_TO_REG(val); in in_min_store()
200 data->in_max[nr] = IN_TO_REG(val); in in_max_store()
Dadm9240.c87 static inline u8 IN_TO_REG(unsigned long val, int n) in IN_TO_REG() function
493 return regmap_write(data->regmap, reg, IN_TO_REG(val, channel)); in adm9240_in_write()
Dgl520sm.c203 #define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19) macro
263 r = IN_TO_REG(v); in in_min_store()
295 r = IN_TO_REG(v); in in_max_store()
Dlm87.c109 #define IN_TO_REG(val, scale) ((val) <= 0 ? 0 : \ macro
310 data->in_min[nr] = IN_TO_REG(val, data->in_scale[nr]); in in_min_store()
331 data->in_max[nr] = IN_TO_REG(val, data->in_scale[nr]); in in_max_store()
Dlm80.c62 #define IN_TO_REG(val) (clamp_val(((val) + 5) / 10, 0, 255)) macro
287 data->in[nr][index] = IN_TO_REG(val); in in_store()
Dw83627hf.c250 #define IN_TO_REG(val) (clamp_val((((val) + 8) / 16), 0, 255)) macro
511 data->in_min[nr] = IN_TO_REG(val); in in_min_store()
530 data->in_max[nr] = IN_TO_REG(val); in in_max_store()
623 data->in_min[0] = IN_TO_REG(val); in in0_min_store()
653 data->in_max[0] = IN_TO_REG(val); in in0_max_store()
Dw83l786ng.c95 #define IN_TO_REG(val) (clamp_val((((val) + 4) / 8), 0, 255)) macro
249 data->in_##reg[nr] = IN_TO_REG(val); \
Dvt1211.c148 #define IN_TO_REG(ix, val) (clamp_val((ix) == 5 ? \ macro
389 data->in_min[ix] = IN_TO_REG(ix, val); in set_in()
393 data->in_max[ix] = IN_TO_REG(ix, val); in set_in()
Dasb100.c102 static u8 IN_TO_REG(unsigned val) in IN_TO_REG() function
259 data->in_##reg[nr] = IN_TO_REG(val); \
Ddme1737.c267 static inline int IN_TO_REG(long val, int nominal) in IN_TO_REG() function
848 data->in_min[ix] = IN_TO_REG(val, data->in_nominal[ix]); in set_in()
853 data->in_max[ix] = IN_TO_REG(val, data->in_nominal[ix]); in set_in()
Dgl518sm.c91 #define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19) macro
Dw83791d.c210 #define IN_TO_REG(val) (clamp_val((((val) + 8) / 16), 0, 255)) macro
379 data->in_##reg[nr] = IN_TO_REG(val); \
Dw83792d.c217 #define IN_TO_REG(nr, val) (((nr) <= 1) ? ((val) / 2) : \ macro
379 data->in_##reg[nr] = clamp_val(IN_TO_REG(nr, val) / 4, 0, 255); \
Dw83781d.c149 #define IN_TO_REG(val) clamp_val(((val) + 8) / 16, 0, 255) macro
271 data->in_##reg[nr] = IN_TO_REG(val); \