/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 | 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() 296 | (data->fan_div[nr] << (2 * (nr + 1))); in set_fan_div() [all …]
|
D | adm9240.c | 174 u8 fan_div[2]; /* rw fan1_div, read-only accessor */ member 322 1 << data->fan_div[attr->index])); in show_fan() 331 1 << data->fan_div[attr->index])); in show_fan_min() 339 return sprintf(buf, "%d\n", 1 << data->fan_div[attr->index]); in show_fan_div() 344 u8 fan_div) in adm9240_write_fan_div() argument 351 reg |= (fan_div << shift); in adm9240_write_fan_div() 354 "to %u\n", nr + 1, 1 << old, 1 << fan_div); in adm9240_write_fan_div() 388 new_div = data->fan_div[nr]; in set_fan_min() 417 if (new_div != data->fan_div[nr]) { in set_fan_min() 418 data->fan_div[nr] = new_div; in set_fan_min() [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 | w83627ehf.c | 465 u8 fan_div[5]; member 595 | (data->fan_div[0] & 0x7); in nct6775_write_fan_div() 600 | ((data->fan_div[1] << 4) & 0x70); in nct6775_write_fan_div() 604 | (data->fan_div[2] & 0x7); in nct6775_write_fan_div() 609 | ((data->fan_div[3] << 4) & 0x70); in nct6775_write_fan_div() 623 | ((data->fan_div[0] & 0x03) << 4); in w83627ehf_write_fan_div() 628 | ((data->fan_div[0] & 0x04) << 3); in w83627ehf_write_fan_div() 633 | ((data->fan_div[1] & 0x03) << 6); in w83627ehf_write_fan_div() 638 | ((data->fan_div[1] & 0x04) << 4); in w83627ehf_write_fan_div() 643 | ((data->fan_div[2] & 0x03) << 6); in w83627ehf_write_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 | 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() 691 data->fan_div[0] = reg_tmp & 0x07; in w83l786ng_probe() 692 data->fan_div[1] = (reg_tmp >> 4) & 0x07; in w83l786ng_probe() [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 | 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 | 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() 442 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 | 335 u8 fan_div[2]; /* Register encoding, shifted right */ member 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() 567 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() 568 old = (old & 0x0f) | (data->fan_div[1] << 6) | (data->fan_div[0] << 4); in set_fan_div() 753 data->fan_div[0] = (reg >> 4) & 0x03; in via686a_update_fan_div() 754 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() 354 data->fan_div[nr] = val; in set_fan_div() 356 | (data->fan_div[nr] << (6 - 2 * nr)); in set_fan_div() 688 data->fan_div[0] = (val >> 6) & 0x03; in gl518_update_device() 689 data->fan_div[1] = (val >> 4) & 0x03; in gl518_update_device()
|
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() 1562 data->fan_div[0] = (reg_array_tmp[0] >> 4) & 0x03; in w83791d_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 | w83792d.c | 291 u8 fan_div[7]; /* Register encoding, shifted right */ member 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() 489 data->fan_div[nr] = DIV_TO_REG(val); in store_fan_div() 493 tmp_fan_div = (nr & 0x01) ? (((data->fan_div[nr]) << 4) & 0x70) in store_fan_div() 494 : ((data->fan_div[nr]) & 0x07); in store_fan_div() 499 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1620 data->fan_div[0] = reg_array_tmp[0] & 0x07; in w83792d_update_device() [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() 220 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() 1114 data->fan_div[chan] = in adm1031_update_device()
|
D | w83627hf.c | 377 u8 fan_div[3]; /* Register encoding, shifted right */ member 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() 955 data->fan_div[nr] = DIV_TO_REG(val); in store_fan_div() 959 | ((data->fan_div[nr] & 0x03) << (nr==0 ? 4 : 6)); in store_fan_div() 964 | ((data->fan_div[nr] & 0x04) << (3 + 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() [all …]
|
D | it87.c | 260 u8 fan_div[3]; /* Register encoding, shifted right */ member 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() 761 data->fan_div[nr] = reg & 0x07; in set_fan_min() 764 data->fan_div[nr] = (reg >> 3) & 0x07; in set_fan_min() 767 data->fan_div[nr] = (reg & 0x40) ? 3 : 1; in set_fan_min() 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() 799 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() [all …]
|
D | w83781d.c | 237 u8 fan_div[3]; /* Register encoding, shifted right */ member 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() 671 data->fan_div[nr] = DIV_TO_REG(val, data->type); in store_fan_div() 676 | ((data->fan_div[nr] & 0x03) << (nr == 0 ? 4 : 6)); in store_fan_div() 684 | ((data->fan_div[nr] & 0x04) << (3 + 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() 1540 data->fan_div[0] = (i >> 4) & 0x03; in w83781d_update_device() [all …]
|
D | gl520sm.c | 122 u8 fan_div[2]; member 298 data->fan_div[n])); in get_fan_input() 308 data->fan_div[n])); in get_fan_min() 317 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); in get_fan_div() 342 r = FAN_TO_REG(v, data->fan_div[n]); in set_fan_min() 400 data->fan_div[n] = r; in set_fan_div() 940 data->fan_div[0] = (val >> 6) & 0x03; in gl520_update_device() 941 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()
|
D | pc87360.c | 338 static struct sensor_device_attribute fan_div[] = { variable 352 &fan_div[X].dev_attr.attr, \
|