Home
last modified time | relevance | path

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

/linux-6.1.9/drivers/hwmon/
Dmax6650.c95 #define DIV_FROM_REG(reg) (1 << ((reg) & 7)) macro
278 kscale = DIV_FROM_REG(data->config); in max6650_set_target()
564 DIV_FROM_REG(data->count)); in max6650_read()
567 *val = DIV_FROM_REG(data->count); in max6650_read()
575 *val = 60 * DIV_FROM_REG(data->config) * clock / in max6650_read()
Dlm80.c80 #define DIV_FROM_REG(val) (1 << (val)) macro
302 DIV_FROM_REG(data->fan_div[index]))); in fan_show()
312 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
329 DIV_FROM_REG(data->fan_div[index])); in fan_store()
360 DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
393 data->fan[f_min][nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
Dsis5595.c163 #define DIV_FROM_REG(val) (1 << (val)) macro
421 DIV_FROM_REG(data->fan_div[nr]))); in fan_show()
431 DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
448 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
460 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
486 DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
520 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
Dadm1029.c68 #define DIV_FROM_REG(val) (1 << (((val) >> 6) - 1)) macro
180 val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index]) in fan_show()
193 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in fan_div_show()
Dw83l786ng.c98 #define DIV_FROM_REG(val) (1 << (val)) macro
284 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
305 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
319 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
351 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
375 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dsmsc47m1.c111 #define DIV_FROM_REG(reg) (1 << (reg)) macro
211 DIV_FROM_REG(data->fan_div[nr]), in fan_show()
223 DIV_FROM_REG(data->fan_div[nr])); in fan_min_show()
232 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in fan_div_show()
282 rpmdiv = val * DIV_FROM_REG(data->fan_div[nr]); in fan_min_store()
313 u8 old_div = DIV_FROM_REG(data->fan_div[nr]); in fan_div_store()
Dlm78.c108 #define DIV_FROM_REG(val) (1 << (val)) macro
300 DIV_FROM_REG(data->fan_div[nr]))); in fan_show()
310 DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
327 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
338 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in fan_div_show()
364 DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
399 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
Dasb100.c163 #define DIV_FROM_REG(val) (1 << (val)) macro
292 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
301 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
309 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
326 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
356 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
380 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dvt8231.c113 #define DIV_FROM_REG(val) (1 << (val)) macro
566 DIV_FROM_REG(data->fan_div[nr]))); in fan_show()
576 DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
585 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
603 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
619 DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
649 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
Dgl518sm.c98 #define DIV_FROM_REG(val) (1 << (val)) macro
260 DIV_FROM_REG(data->fan_div[nr]))); in fan_input_show()
269 DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
277 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
357 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
Dvia686a.c297 #define DIV_FROM_REG(val) (1 << (val)) macro
570 DIV_FROM_REG(data->fan_div[nr]))); in fan_show()
579 DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
586 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
601 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
Dw83791d.c253 #define DIV_FROM_REG(val) (1 << (val)) macro
524 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
545 data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
558 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
589 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
646 data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dw83627hf.c332 #define DIV_FROM_REG(val) (1 << (val)) macro
1102 (long)DIV_FROM_REG(data->fan_div[nr]))); in fan_input_show()
1111 (long)DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
1128 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
1149 (long) DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
1177 DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
1192 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
Dw83792d.c245 #define DIV_FROM_REG(val) (1 << (val)) macro
398 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
420 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
435 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1])); in show_fan_div()
466 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
478 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dvt1211.c168 #define DIV_FROM_REG(reg) (1 << (reg)) macro
171 1310720 / (reg) / DIV_FROM_REG(div))
174 DIV_FROM_REG(div)), 1, 254))
508 res = DIV_FROM_REG(data->fan_div[ix]); in show_fan()
Dw83781d.c179 #define DIV_FROM_REG(val) (1 << (val)) macro
307 DIV_FROM_REG(data->fan_div[attr->index]))); \
328 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
625 (long) DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
654 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
674 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dgl520sm.c328 #define DIV_FROM_REG(val) (1 << (val)) macro
364 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); in fan_div_show()
Dadm1026.c202 #define DIV_FROM_REG(val) (1 << (val)) macro
395 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_update_device()
758 data->fan_div[nr] = DIV_FROM_REG(new_div); in fan_div_store()
1814 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_init_client()
Dit87.c642 #define DIV_FROM_REG(val) BIT(val) macro
1121 DIV_FROM_REG(data->fan_div[nr])); in show_fan()
1132 return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
1211 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan()
1237 min = FAN_FROM_REG(data->fan[nr][1], DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
1258 data->fan[nr][1] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()