/drivers/hwmon/ |
H A D | adm1026.c | 214 #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 D | adm1029.c | 81 #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 D | asb100.c | 176 #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 D | gl518sm.c | 110 #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 D | gl520sm.c | 350 #define DIV_FROM_REG(val) (1 << (val)) macro 381 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n]));
|
H A D | it87.c | 476 #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 D | lm78.c | 122 #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 D | lm80.c | 93 #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 D | max6650.c | 106 #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 D | sis5595.c | 176 #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 D | smsc47m1.c | 119 #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 D | via686a.c | 309 #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 D | vt1211.c | 181 #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 D | vt8231.c | 124 #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 D | w83627hf.c | 339 #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 D | w83781d.c | 192 #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 D | w83791d.c | 266 #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 D | w83792d.c | 258 #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 D | w83l786ng.c | 111 #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]));
|