/openbmc/linux/drivers/hwmon/ |
H A D | adm1025.c | 82 #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()
|
H A D | smsc47m192.c | 65 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()
|
H A D | pc87360.c | 162 #define IN_TO_REG(val, ref) ((val) < 0 ? 0 : \ macro 474 data->in_min[attr->index] = IN_TO_REG(val, data->in_vref); in in_min_store() 518 data->in_max[attr->index] = IN_TO_REG(val, in in_max_store() 724 data->in_min[attr->index] = IN_TO_REG(val, data->in_vref); in therm_min_store() 760 data->in_max[attr->index] = IN_TO_REG(val, data->in_vref); in therm_max_store() 796 data->in_crit[attr->index-11] = IN_TO_REG(val, data->in_vref); in therm_crit_store()
|
H A D | sis5595.c | 120 static inline u8 IN_TO_REG(unsigned long val) in IN_TO_REG() function 307 data->in_min[nr] = IN_TO_REG(val); in in_min_store() 327 data->in_max[nr] = IN_TO_REG(val); in in_max_store()
|
H A D | via686a.c | 116 static inline u8 IN_TO_REG(long val, int in_num) in IN_TO_REG() function 448 data->in_min[nr] = IN_TO_REG(val, nr); in in_min_store() 467 data->in_max[nr] = IN_TO_REG(val, nr); in in_max_store()
|
H A D | lm78.c | 72 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()
|
H A D | gl520sm.c | 203 #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()
|
H A D | adm9240.c | 87 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()
|
H A D | lm87.c | 109 #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()
|
H A D | lm80.c | 62 #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()
|
H A D | w83627hf.c | 250 #define IN_TO_REG(val) (clamp_val((((val) + 8) / 16), 0, 255)) macro 859 data->in_min[0] = IN_TO_REG(val); in in0_min_store() 898 data->in_max[0] = IN_TO_REG(val); in in0_max_store() 1036 data->in_min[nr] = IN_TO_REG(val); in in_min_store() 1064 data->in_max[nr] = IN_TO_REG(val); in in_max_store()
|
H A D | vt1211.c | 148 #define IN_TO_REG(ix, val) (clamp_val((ix) == 5 ? \ macro 383 data->in_min[ix] = IN_TO_REG(ix, val); in set_in() 387 data->in_max[ix] = IN_TO_REG(ix, val); in set_in()
|
H A D | w83l786ng.c | 94 #define IN_TO_REG(val) (clamp_val((((val) + 4) / 8), 0, 255)) macro 248 data->in_##reg[nr] = IN_TO_REG(val); \
|
H A D | asb100.c | 102 static u8 IN_TO_REG(unsigned val) in IN_TO_REG() function 259 data->in_##reg[nr] = IN_TO_REG(val); \
|
H A D | dme1737.c | 267 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()
|
H A D | w83791d.c | 210 #define IN_TO_REG(val) (clamp_val((((val) + 8) / 16), 0, 255)) macro 379 data->in_##reg[nr] = IN_TO_REG(val); \
|
H A D | gl518sm.c | 91 #define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19) macro
|
H A D | w83792d.c | 217 #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); \
|
H A D | w83781d.c | 149 #define IN_TO_REG(val) clamp_val(((val) + 8) / 16, 0, 255) macro 271 data->in_##reg[nr] = IN_TO_REG(val); \
|