/drivers/hwmon/ |
D | smsc47m1.c | 135 u8 fan_div[3]; /* Register encoding, shifted right */ member 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() 295 data->fan_div[nr] = 0; in set_fan_div() 298 data->fan_div[nr] = 1; in set_fan_div() 301 data->fan_div[nr] = 2; in set_fan_div() 304 data->fan_div[nr] = 3; in set_fan_div() [all …]
|
D | adm9240.c | 175 u8 fan_div[2]; /* rw fan1_div, read-only accessor */ member 323 1 << data->fan_div[attr->index])); in show_fan() 332 1 << data->fan_div[attr->index])); in show_fan_min() 340 return sprintf(buf, "%d\n", 1 << data->fan_div[attr->index]); in show_fan_div() 345 u8 fan_div) in adm9240_write_fan_div() argument 352 reg |= (fan_div << shift); in adm9240_write_fan_div() 356 nr + 1, 1 << old, 1 << fan_div); in adm9240_write_fan_div() 390 new_div = data->fan_div[nr]; in set_fan_min() 419 if (new_div != data->fan_div[nr]) { in set_fan_min() 420 data->fan_div[nr] = new_div; in set_fan_min() [all …]
|
D | sis5595.c | 200 u8 fan_div[2]; /* Register encoding, shifted right */ member 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() 447 data->fan_div[nr] = 0; in set_fan_div() 450 data->fan_div[nr] = 1; in set_fan_div() 453 data->fan_div[nr] = 2; in set_fan_div() 456 data->fan_div[nr] = 3; in set_fan_div() [all …]
|
D | lm80.c | 126 u8 fan_div[2]; /* Register encoding, shifted right */ member 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() 277 data->fan_div[nr] = 0; in set_fan_div() 280 data->fan_div[nr] = 1; in set_fan_div() 283 data->fan_div[nr] = 2; in set_fan_div() 286 data->fan_div[nr] = 3; in set_fan_div() 297 | (data->fan_div[nr] << (2 * (nr + 1))); in set_fan_div() [all …]
|
D | lm78.c | 144 u8 fan_div[3]; /* Register encoding, shifted right */ member 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() 377 data->fan_div[nr] = 0; in set_fan_div() 380 data->fan_div[nr] = 1; in set_fan_div() 383 data->fan_div[nr] = 2; in set_fan_div() 386 data->fan_div[nr] = 3; in set_fan_div() [all …]
|
D | vt1211.c | 133 u8 fan_div[2]; member 300 data->fan_div[0] = (val >> 4) & 3; in vt1211_update_device() 301 data->fan_div[1] = (val >> 6) & 3; in vt1211_update_device() 509 res = RPM_FROM_REG(data->fan[ix], data->fan_div[ix]); in show_fan() 512 res = RPM_FROM_REG(data->fan_min[ix], data->fan_div[ix]); in show_fan() 515 res = DIV_FROM_REG(data->fan_div[ix]); in show_fan() 548 data->fan_div[0] = (reg >> 4) & 3; in set_fan() 549 data->fan_div[1] = (reg >> 6) & 3; in set_fan() 554 data->fan_min[ix] = RPM_TO_REG(val, data->fan_div[ix]); in set_fan() 561 data->fan_div[ix] = 0; in set_fan() [all …]
|
D | w83l786ng.c | 138 u8 fan_div[2]; member 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() 321 data->fan_div[nr] = DIV_TO_REG(val); in store_fan_div() 337 tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; in store_fan_div() 343 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 690 data->fan_div[0] = reg_tmp & 0x07; in w83l786ng_probe() 691 data->fan_div[1] = (reg_tmp >> 4) & 0x07; in w83l786ng_probe() [all …]
|
D | w83627ehf.c | 464 u8 fan_div[5]; member 601 | (data->fan_div[0] & 0x7); in nct6775_write_fan_div() 606 | ((data->fan_div[1] << 4) & 0x70); in nct6775_write_fan_div() 611 | (data->fan_div[2] & 0x7); in nct6775_write_fan_div() 616 | ((data->fan_div[3] << 4) & 0x70); in nct6775_write_fan_div() 630 | ((data->fan_div[0] & 0x03) << 4); in w83627ehf_write_fan_div() 635 | ((data->fan_div[0] & 0x04) << 3); in w83627ehf_write_fan_div() 640 | ((data->fan_div[1] & 0x03) << 6); in w83627ehf_write_fan_div() 645 | ((data->fan_div[1] & 0x04) << 4); in w83627ehf_write_fan_div() 650 | ((data->fan_div[2] & 0x03) << 6); in w83627ehf_write_fan_div() [all …]
|
D | vt8231.c | 172 u8 fan_div[2]; /* Register encoding, shifted right */ member 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() 564 data->fan_div[nr] = 0; in set_fan_div() 567 data->fan_div[nr] = 1; in set_fan_div() 570 data->fan_div[nr] = 2; in set_fan_div() 573 data->fan_div[nr] = 3; in set_fan_div() [all …]
|
D | asb100.c | 211 u8 fan_div[3]; /* Register encoding, right justified */ member 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() 371 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() 376 reg = (reg & 0xcf) | (data->fan_div[0] << 4); in set_fan_div() 382 reg = (reg & 0x3f) | (data->fan_div[1] << 6); in set_fan_div() 388 reg = (reg & 0x3f) | (data->fan_div[2] << 6); in set_fan_div() [all …]
|
D | adm1029.c | 155 u8 fan_div[ARRAY_SIZE(ADM1029_REG_FAN_DIV)]; member 177 || (data->fan_div[attr->index] & 0xC0) == 0 in show_fan() 182 val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index]) in show_fan() 192 if ((data->fan_div[attr->index] & 0xC0) == 0) in show_fan_div() 194 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div() 436 data->fan_div[nr] = in adm1029_update_device()
|
D | lm87.c | 178 u8 fan_div[2]; /* register value, shifted right */ member 255 data->fan_div[0] = (i >> 4) & 0x03; in lm87_update_device() 256 data->fan_div[1] = (i >> 6) & 0x03; in lm87_update_device() 472 FAN_DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input() 482 FAN_DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 492 FAN_DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 510 FAN_DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 539 FAN_DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 543 data->fan_div[nr] = 0; in set_fan_div() 546 data->fan_div[nr] = 1; in set_fan_div() [all …]
|
D | via686a.c | 332 u8 fan_div[2]; /* Register encoding, shifted right */ member 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() 564 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() 565 old = (old & 0x0f) | (data->fan_div[1] << 6) | (data->fan_div[0] << 4); in set_fan_div() 741 data->fan_div[0] = (reg >> 4) & 0x03; in via686a_update_fan_div() 742 data->fan_div[1] = reg >> 6; in via686a_update_fan_div()
|
D | gl518sm.c | 129 u8 fan_div[2]; /* Register encoding, shifted right */ member 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() 355 data->fan_div[nr] = val; in set_fan_div() 357 | (data->fan_div[nr] << (6 - 2 * nr)); in set_fan_div() 684 data->fan_div[0] = (val >> 6) & 0x03; in gl518_update_device() 685 data->fan_div[1] = (val >> 4) & 0x03; in gl518_update_device()
|
D | nct6775.c | 622 u8 fan_div[5]; member 800 | (data->fan_div[0] & 0x7); in nct6775_write_fan_div() 805 | ((data->fan_div[1] << 4) & 0x70); in nct6775_write_fan_div() 810 | (data->fan_div[2] & 0x7); in nct6775_write_fan_div() 815 | ((data->fan_div[3] << 4) & 0x70); in nct6775_write_fan_div() 832 data->fan_div[0] = i & 0x7; in nct6775_update_fan_div() 833 data->fan_div[1] = (i & 0x70) >> 4; in nct6775_update_fan_div() 835 data->fan_div[2] = i & 0x7; in nct6775_update_fan_div() 837 data->fan_div[3] = (i & 0x70) >> 4; in nct6775_update_fan_div() 857 for (i = 0; i < ARRAY_SIZE(data->fan_div); i++) { in nct6775_init_fan_div() [all …]
|
D | w83791d.c | 303 u8 fan_div[NUMBER_OF_FANIN]; /* Register encoding, shifted right */ member 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() 612 data->fan_div[nr] = div_to_reg(nr, val); in store_fan_div() 650 tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; in store_fan_div() 660 tmp_fan_div = (data->fan_div[nr] << (3 + nr)) & ~keep_mask; in store_fan_div() 666 data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1557 data->fan_div[0] = (reg_array_tmp[0] >> 4) & 0x03; in w83791d_update_device() [all …]
|
D | w83792d.c | 291 u8 fan_div[7]; /* Register encoding, shifted right */ member 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])); in store_fan_min() 455 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1])); in show_fan_div() 486 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 488 data->fan_div[nr] = DIV_TO_REG(val); in store_fan_div() 492 tmp_fan_div = (nr & 0x01) ? (((data->fan_div[nr]) << 4) & 0x70) in store_fan_div() 493 : ((data->fan_div[nr]) & 0x07); in store_fan_div() 498 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1563 data->fan_div[0] = reg_array_tmp[0] & 0x07; in w83792d_update_device() [all …]
|
D | adm1026.c | 287 u8 fan_div[8]; /* Decoded value */ member 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() 875 data->fan_div[nr])); in show_fan() 884 data->fan_div[nr])); in show_fan_min() 901 data->fan_min[nr] = FAN_TO_REG(val, data->fan_div[nr]); in set_fan_min() 929 int new_div = data->fan_div[fan]; in fixup_fan_min() 948 return sprintf(buf, "%d\n", data->fan_div[nr]); in show_fan_div() 968 orig_div = data->fan_div[nr]; in set_fan_div() 969 data->fan_div[nr] = DIV_FROM_REG(new_div); in set_fan_div() [all …]
|
D | g760a.c | 52 u16 fan_div; /* default P=2 */ member 139 rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div); in show_fan() 221 data->fan_div = G760A_DEFAULT_FAN_DIV; in g760a_probe()
|
D | adm1031.c | 92 u8 fan_div[2]; member 519 FAN_DIV_FROM_REG(data->fan_div[nr])) : 0; in show_fan() 528 return sprintf(buf, "%d\n", FAN_DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 537 FAN_DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 555 FAN_TO_REG(val, FAN_DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 589 data->fan_div[nr] = adm1031_read_value(client, in set_fan_div() 595 old_div = FAN_DIV_FROM_REG(data->fan_div[nr]); in set_fan_div() 596 data->fan_div[nr] = tmp | (0x3f & data->fan_div[nr]); in set_fan_div() 601 data->fan_div[nr]); in set_fan_div() 1109 data->fan_div[chan] = in adm1031_update_device()
|
D | w83781d.c | 236 u8 fan_div[3]; /* Register encoding, shifted right */ member 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() 670 data->fan_div[nr] = DIV_TO_REG(val, data->type); in store_fan_div() 675 | ((data->fan_div[nr] & 0x03) << (nr == 0 ? 4 : 6)); in store_fan_div() 683 | ((data->fan_div[nr] & 0x04) << (3 + 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() 1534 data->fan_div[0] = (i >> 4) & 0x03; in w83781d_update_device() [all …]
|
D | w83627hf.c | 376 u8 fan_div[3]; /* Register encoding, shifted right */ member 667 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input() 675 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 691 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 996 (long) DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 1023 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1025 data->fan_div[nr] = DIV_TO_REG(val); in store_fan_div() 1029 | ((data->fan_div[nr] & 0x03) << (nr==0 ? 4 : 6)); in store_fan_div() 1034 | ((data->fan_div[nr] & 0x04) << (3 + nr)); in store_fan_div() 1038 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() [all …]
|
D | it87.c | 371 u8 fan_div[3]; /* Register encoding, shifted right */ member 757 DIV_FROM_REG(data->fan_div[nr])); in show_fan() 768 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 824 data->fan_div[nr] = reg & 0x07; in set_fan() 827 data->fan_div[nr] = (reg >> 3) & 0x07; in set_fan() 830 data->fan_div[nr] = (reg & 0x40) ? 3 : 1; in set_fan() 834 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan() 861 min = FAN_FROM_REG(data->fan[nr][1], DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 866 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() 870 data->fan_div[nr] = 1; in set_fan_div() [all …]
|
D | gl520sm.c | 122 u8 fan_div[2]; member 297 data->fan_div[n])); in get_fan_input() 307 data->fan_div[n])); in get_fan_min() 316 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); in get_fan_div() 341 r = FAN_TO_REG(v, data->fan_div[n]); in set_fan_min() 399 data->fan_div[n] = r; in set_fan_div() 934 data->fan_div[0] = (val >> 6) & 0x03; in gl520_update_device() 935 data->fan_div[1] = (val >> 4) & 0x03; in gl520_update_device()
|
D | emc2103.c | 303 int fan_div = 8 / data->fan_multiplier; in show_fan_div() local 304 return sprintf(buf, "%d\n", fan_div); in show_fan_div()
|