Searched refs:DIV_FROM_REG (Results 1 - 19 of 19) sorted by last modified time

/drivers/hwmon/
H A Dadm1026.c214 #define DIV_FROM_REG(val) (1 << (val)) macro
406 data->fan_div[i] = DIV_FROM_REG(value & 0x03);
737 data->fan_div[nr] = DIV_FROM_REG(new_div);
1799 data->fan_div[i] = DIV_FROM_REG(value & 0x03);
H A Dadm1029.c81 #define DIV_FROM_REG(val) (1 << (((val) >> 6) - 1)) macro
192 val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index])
204 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index]));
H A Dasb100.c176 #define DIV_FROM_REG(val) (1 << (val)) macro
306 DIV_FROM_REG(data->fan_div[nr])));
315 DIV_FROM_REG(data->fan_div[nr])));
323 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
340 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
370 DIV_FROM_REG(data->fan_div[nr]));
394 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dgl518sm.c110 #define DIV_FROM_REG(val) (1 << (val)) macro
272 DIV_FROM_REG(data->fan_div[nr])));
281 DIV_FROM_REG(data->fan_div[nr])));
289 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
368 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
H A Dgl520sm.c350 #define DIV_FROM_REG(val) (1 << (val)) macro
381 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n]));
H A Dit87.c476 #define DIV_FROM_REG(val) (1 << (val)) macro
768 DIV_FROM_REG(data->fan_div[nr]));
779 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
845 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
872 min = FAN_FROM_REG(data->fan[nr][1], DIV_FROM_REG(data->fan_div[nr]));
893 data->fan[nr][1] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dlm78.c122 #define DIV_FROM_REG(val) (1 << (val)) macro
310 DIV_FROM_REG(data->fan_div[nr])));
320 DIV_FROM_REG(data->fan_div[nr])));
337 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
348 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index]));
374 DIV_FROM_REG(data->fan_div[nr]));
409 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dlm80.c93 #define DIV_FROM_REG(val) (1 << (val)) macro
315 DIV_FROM_REG(data->fan_div[index])));
325 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
342 DIV_FROM_REG(data->fan_div[index]));
370 DIV_FROM_REG(data->fan_div[nr]));
398 data->fan[f_min][nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dmax6650.c106 #define DIV_FROM_REG(reg) (1 << (reg & 7)) macro
190 rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count));
249 kscale = DIV_FROM_REG(data->config);
279 kscale = DIV_FROM_REG(data->config);
417 return sprintf(buf, "%d\n", DIV_FROM_REG(data->count));
H A Dsis5595.c176 #define DIV_FROM_REG(val) (1 << (val)) macro
379 DIV_FROM_REG(data->fan_div[nr])));
389 DIV_FROM_REG(data->fan_div[nr])));
406 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
418 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
444 DIV_FROM_REG(data->fan_div[nr]));
478 FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dsmsc47m1.c119 #define DIV_FROM_REG(reg) (1 << (reg)) macro
219 DIV_FROM_REG(data->fan_div[nr]),
231 DIV_FROM_REG(data->fan_div[nr]));
240 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index]));
289 rpmdiv = val * DIV_FROM_REG(data->fan_div[nr]);
319 u8 old_div = DIV_FROM_REG(data->fan_div[nr]);
H A Dvia686a.c309 #define DIV_FROM_REG(val) (1 << (val)) macro
513 DIV_FROM_REG(data->fan_div[nr])));
522 DIV_FROM_REG(data->fan_div[nr])));
529 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
544 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
H A 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]);
H A Dvt8231.c124 #define DIV_FROM_REG(val) (1 << (val)) macro
503 DIV_FROM_REG(data->fan_div[nr])));
513 DIV_FROM_REG(data->fan_div[nr])));
522 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]));
539 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
554 DIV_FROM_REG(data->fan_div[nr]));
584 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dw83627hf.c339 #define DIV_FROM_REG(val) (1 << (val)) macro
667 (long)DIV_FROM_REG(data->fan_div[nr])));
675 (long)DIV_FROM_REG(data->fan_div[nr])));
691 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
999 (long) DIV_FROM_REG(data->fan_div[nr]));
1026 DIV_FROM_REG(data->fan_div[nr]));
1041 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A 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]));
639 (long) DIV_FROM_REG(data->fan_div[attr->index]));
668 DIV_FROM_REG(data->fan_div[nr]));
688 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A 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]));
575 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr]));
606 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr]));
663 data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr]));
H A Dw83792d.c258 #define DIV_FROM_REG(val) (1 << (val)) macro
418 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
440 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
455 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1]));
486 DIV_FROM_REG(data->fan_div[nr]));
498 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));
H A 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]));
332 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr]));
364 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr]));
388 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr]));

Completed in 151 milliseconds