Home
last modified time | relevance | path

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

/drivers/hwmon/
Dmax6650.c106 #define DIV_FROM_REG(reg) (1 << (reg & 7)) macro
170 rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count)); in get_fan()
229 kscale = DIV_FROM_REG(data->config); in get_target()
259 kscale = DIV_FROM_REG(data->config); in set_target()
397 return sprintf(buf, "%d\n", DIV_FROM_REG(data->count)); in get_div()
Dsis5595.c174 #define DIV_FROM_REG(val) (1 << (val)) macro
377 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
387 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
404 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
416 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
442 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
475 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dsmsc47m1.c119 #define DIV_FROM_REG(reg) (1 << (reg)) macro
183 DIV_FROM_REG(data->fan_div[nr]), in get_fan()
195 DIV_FROM_REG(data->fan_div[nr])); in get_fan_min()
204 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in get_fan_div()
253 rpmdiv = val * DIV_FROM_REG(data->fan_div[nr]); in set_fan_min()
283 u8 old_div = DIV_FROM_REG(data->fan_div[nr]); in set_fan_div()
Dw83l786ng.c111 #define DIV_FROM_REG(val) (1 << (val)) macro
252 FAN_FROM_REG(data->fan[nr], DIV_FROM_REG(data->fan_div[nr]))); \
273 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
287 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
319 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
343 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dlm80.c108 #define DIV_FROM_REG(val) (1 << (val)) macro
219 DIV_FROM_REG(data->fan_div[nr]))); \
231 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
246 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
273 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
300 data->fan_min[nr] = 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()
Dadm1029.c81 #define DIV_FROM_REG(val) (1 << (((val) >> 6) - 1)) macro
182 val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index]) in show_fan()
194 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
Dlm78.c120 #define DIV_FROM_REG(val) (1 << (val)) macro
309 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
319 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
336 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
347 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
373 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
407 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()
583 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
206 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input()
215 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
223 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
302 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
Dvia686a.c312 #define DIV_FROM_REG(val) (1 << (val)) macro
516 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
525 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
532 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
547 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
Dw83627hf.c340 #define DIV_FROM_REG(val) (1 << (val)) macro
597 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input()
605 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
621 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
926 (long) DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
953 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
968 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dw83791d.c269 #define DIV_FROM_REG(val) (1 << (val)) macro
544 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
565 data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
578 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
609 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
666 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()
Dw83792d.c258 #define DIV_FROM_REG(val) (1 << (val)) macro
419 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
441 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
456 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1])); in show_fan_div()
487 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
499 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dw83781d.c192 #define DIV_FROM_REG(val) (1 << (val)) macro
321 DIV_FROM_REG(data->fan_div[attr->index]))); \
342 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min()
640 (long) DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div()
669 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
689 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div()
Dit87.c384 #define DIV_FROM_REG(val) (1 << (val)) macro
696 DIV_FROM_REG(data->fan_div[nr]))); in show_fan()
706 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min()
715 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div()
771 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min()
794 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
815 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in set_fan_div()
Dadm1026.c214 #define DIV_FROM_REG(val) (1 << (val)) macro
455 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_init_client()
638 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_update_device()
969 data->fan_div[nr] = DIV_FROM_REG(new_div); in set_fan_div()
Dgl520sm.c285 #define DIV_FROM_REG(val) (1 << (val)) macro
317 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); in get_fan_div()