Home
last modified time | relevance | path

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

/Linux-v4.19/drivers/hwmon/
Dmax6650.c107 #define DIV_FROM_REG(reg) (1 << (reg & 7)) macro
228 rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count)); in get_fan()
287 kscale = DIV_FROM_REG(data->config); in fan1_target_show()
309 kscale = DIV_FROM_REG(data->config); in max6650_set_target()
469 return sprintf(buf, "%d\n", DIV_FROM_REG(data->count)); in fan1_div_show()
Dsis5595.c176 #define DIV_FROM_REG(val) (1 << (val)) macro
378 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
388 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
405 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
417 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
443 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
477 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dadm1029.c81 #define DIV_FROM_REG(val) (1 << (((val) >> 6) - 1)) macro
192 val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index]) in show_fan()
204 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
Dsmsc47m1.c119 #define DIV_FROM_REG(reg) (1 << (reg)) macro
219 DIV_FROM_REG(data->fan_div[nr]), in get_fan()
231 DIV_FROM_REG(data->fan_div[nr])); in get_fan_min()
240 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in get_fan_div()
289 rpmdiv = val * DIV_FROM_REG(data->fan_div[nr]); in set_fan_min()
319 u8 old_div = DIV_FROM_REG(data->fan_div[nr]); in set_fan_div()
Dw83l786ng.c111 #define DIV_FROM_REG(val) (1 << (val)) macro
297 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
318 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
332 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
364 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
388 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dlm80.c93 #define DIV_FROM_REG(val) (1 << (val)) macro
315 DIV_FROM_REG(data->fan_div[index]))); in show_fan()
325 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
342 DIV_FROM_REG(data->fan_div[index])); in set_fan_min()
370 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
398 data->fan[f_min][nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dlm78.c122 #define DIV_FROM_REG(val) (1 << (val)) macro
310 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
320 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
337 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
348 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
374 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
409 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dasb100.c176 #define DIV_FROM_REG(val) (1 << (val)) macro
306 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
315 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
323 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
340 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
370 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
394 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dvt8231.c124 #define DIV_FROM_REG(val) (1 << (val)) macro
506 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
516 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
525 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
542 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
557 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
587 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dgl518sm.c111 #define DIV_FROM_REG(val) (1 << (val)) macro
273 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input()
282 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
290 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
369 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
Dvia686a.c309 #define DIV_FROM_REG(val) (1 << (val)) macro
513 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
522 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
529 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
544 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
Dw83791d.c266 #define DIV_FROM_REG(val) (1 << (val)) macro
541 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
562 data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
575 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
606 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
663 data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dw83627hf.c339 #define DIV_FROM_REG(val) (1 << (val)) macro
669 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input()
677 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
693 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
1001 (long) DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
1028 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
1043 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dw83792d.c258 #define DIV_FROM_REG(val) (1 << (val)) macro
415 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
437 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
452 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1])); in show_fan_div()
483 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
495 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dvt1211.c181 #define DIV_FROM_REG(reg) (1 << (reg)) macro
184 1310720 / (reg) / DIV_FROM_REG(div))
187 DIV_FROM_REG(div)), 1, 254))
515 res = DIV_FROM_REG(data->fan_div[ix]); in show_fan()
Dw83781d.c192 #define DIV_FROM_REG(val) (1 << (val)) macro
320 DIV_FROM_REG(data->fan_div[attr->index]))); \
341 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
638 (long) DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
667 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
687 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dadm1026.c215 #define DIV_FROM_REG(val) (1 << (val)) macro
408 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_update_device()
745 data->fan_div[nr] = DIV_FROM_REG(new_div); in set_fan_div()
1811 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_init_client()
Dit87.c651 #define DIV_FROM_REG(val) BIT(val) macro
1130 DIV_FROM_REG(data->fan_div[nr])); in show_fan()
1141 return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
1220 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan()
1246 min = FAN_FROM_REG(data->fan[nr][1], DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
1267 data->fan[nr][1] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dgl520sm.c352 #define DIV_FROM_REG(val) (1 << (val)) macro
388 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); in get_fan_div()