Home
last modified time | relevance | path

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

/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 get_target()
309 kscale = DIV_FROM_REG(data->config); in max6650_set_target()
466 return sprintf(buf, "%d\n", DIV_FROM_REG(data->count)); in get_div()
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()
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()
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()
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()
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()
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
503 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
513 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
522 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
539 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
554 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
584 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dgl518sm.c110 #define DIV_FROM_REG(val) (1 << (val)) macro
272 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input()
281 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
289 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
368 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
666 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input()
674 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
690 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
998 (long) DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
1025 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
1040 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()
639 (long) DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
668 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
688 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dadm1026.c214 #define DIV_FROM_REG(val) (1 << (val)) macro
406 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_update_device()
737 data->fan_div[nr] = DIV_FROM_REG(new_div); in set_fan_div()
1799 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_init_client()
Dit87.c620 #define DIV_FROM_REG(val) BIT(val) macro
1099 DIV_FROM_REG(data->fan_div[nr])); in show_fan()
1110 return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
1189 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan()
1215 min = FAN_FROM_REG(data->fan[nr][1], DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
1236 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()