fan_div 277 drivers/hwmon/adm1026.c u8 fan_div[8]; /* Decoded value */ fan_div 395 drivers/hwmon/adm1026.c data->fan_div[i] = DIV_FROM_REG(value & 0x03); fan_div 660 drivers/hwmon/adm1026.c data->fan_div[nr])); fan_div 669 drivers/hwmon/adm1026.c data->fan_div[nr])); fan_div 687 drivers/hwmon/adm1026.c data->fan_min[nr] = FAN_TO_REG(val, data->fan_div[nr]); fan_div 717 drivers/hwmon/adm1026.c int new_div = data->fan_div[fan]; fan_div 736 drivers/hwmon/adm1026.c return sprintf(buf, "%d\n", data->fan_div[nr]); fan_div 757 drivers/hwmon/adm1026.c orig_div = data->fan_div[nr]; fan_div 758 drivers/hwmon/adm1026.c data->fan_div[nr] = DIV_FROM_REG(new_div); fan_div 762 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[0]) << 0) | fan_div 763 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[1]) << 2) | fan_div 764 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[2]) << 4) | fan_div 765 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[3]) << 6)); fan_div 768 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[4]) << 0) | fan_div 769 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[5]) << 2) | fan_div 770 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[6]) << 4) | fan_div 771 drivers/hwmon/adm1026.c (DIV_TO_REG(data->fan_div[7]) << 6)); fan_div 774 drivers/hwmon/adm1026.c if (data->fan_div[nr] != orig_div) fan_div 781 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 782 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 783 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan3_div, fan_div, 2); fan_div 784 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan4_div, fan_div, 3); fan_div 785 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan5_div, fan_div, 4); fan_div 786 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan6_div, fan_div, 5); fan_div 787 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan7_div, fan_div, 6); fan_div 788 drivers/hwmon/adm1026.c static SENSOR_DEVICE_ATTR_RW(fan8_div, fan_div, 7); fan_div 1814 drivers/hwmon/adm1026.c data->fan_div[i] = DIV_FROM_REG(value & 0x03); fan_div 108 drivers/hwmon/adm1029.c u8 fan_div[ARRAY_SIZE(ADM1029_REG_FAN_DIV)]; fan_div 140 drivers/hwmon/adm1029.c data->fan_div[nr] = fan_div 175 drivers/hwmon/adm1029.c (data->fan_div[attr->index] & 0xC0) == 0 || fan_div 180 drivers/hwmon/adm1029.c val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index]) fan_div 191 drivers/hwmon/adm1029.c if ((data->fan_div[attr->index] & 0xC0) == 0) fan_div 193 drivers/hwmon/adm1029.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); fan_div 237 drivers/hwmon/adm1029.c data->fan_div[attr->index] = reg; fan_div 266 drivers/hwmon/adm1029.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 267 drivers/hwmon/adm1029.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 80 drivers/hwmon/adm1031.c u8 fan_div[2]; fan_div 176 drivers/hwmon/adm1031.c data->fan_div[chan] = fan_div 564 drivers/hwmon/adm1031.c FAN_DIV_FROM_REG(data->fan_div[nr])) : 0; fan_div 573 drivers/hwmon/adm1031.c return sprintf(buf, "%d\n", FAN_DIV_FROM_REG(data->fan_div[nr])); fan_div 582 drivers/hwmon/adm1031.c FAN_DIV_FROM_REG(data->fan_div[nr]))); fan_div 601 drivers/hwmon/adm1031.c FAN_TO_REG(val, FAN_DIV_FROM_REG(data->fan_div[nr])); fan_div 636 drivers/hwmon/adm1031.c data->fan_div[nr] = adm1031_read_value(client, fan_div 642 drivers/hwmon/adm1031.c old_div = FAN_DIV_FROM_REG(data->fan_div[nr]); fan_div 643 drivers/hwmon/adm1031.c data->fan_div[nr] = tmp | (0x3f & data->fan_div[nr]); fan_div 648 drivers/hwmon/adm1031.c data->fan_div[nr]); fan_div 660 drivers/hwmon/adm1031.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 663 drivers/hwmon/adm1031.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 136 drivers/hwmon/adm9240.c u8 fan_div[2]; /* rw fan1_div, read-only accessor */ fan_div 147 drivers/hwmon/adm9240.c u8 fan_div) fan_div 154 drivers/hwmon/adm9240.c reg |= (fan_div << shift); fan_div 158 drivers/hwmon/adm9240.c nr + 1, 1 << old, 1 << fan_div); fan_div 198 drivers/hwmon/adm9240.c data->fan_div[i] < 3) { fan_div 201 drivers/hwmon/adm9240.c ++data->fan_div[i]); fan_div 233 drivers/hwmon/adm9240.c data->fan_div[0] = (i >> 4) & 3; fan_div 234 drivers/hwmon/adm9240.c data->fan_div[1] = (i >> 6) & 3; fan_div 390 drivers/hwmon/adm9240.c 1 << data->fan_div[attr->index])); fan_div 399 drivers/hwmon/adm9240.c 1 << data->fan_div[attr->index])); fan_div 407 drivers/hwmon/adm9240.c return sprintf(buf, "%d\n", 1 << data->fan_div[attr->index]); fan_div 441 drivers/hwmon/adm9240.c new_div = data->fan_div[nr]; fan_div 470 drivers/hwmon/adm9240.c if (new_div != data->fan_div[nr]) { fan_div 471 drivers/hwmon/adm9240.c data->fan_div[nr] = new_div; fan_div 483 drivers/hwmon/adm9240.c static SENSOR_DEVICE_ATTR_RO(fan1_div, fan_div, 0); fan_div 486 drivers/hwmon/adm9240.c static SENSOR_DEVICE_ATTR_RO(fan2_div, fan_div, 1); fan_div 198 drivers/hwmon/asb100.c u8 fan_div[3]; /* Register encoding, right justified */ fan_div 293 drivers/hwmon/asb100.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 302 drivers/hwmon/asb100.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 310 drivers/hwmon/asb100.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 327 drivers/hwmon/asb100.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 357 drivers/hwmon/asb100.c DIV_FROM_REG(data->fan_div[nr])); fan_div 358 drivers/hwmon/asb100.c data->fan_div[nr] = DIV_TO_REG(val); fan_div 363 drivers/hwmon/asb100.c reg = (reg & 0xcf) | (data->fan_div[0] << 4); fan_div 369 drivers/hwmon/asb100.c reg = (reg & 0x3f) | (data->fan_div[1] << 6); fan_div 375 drivers/hwmon/asb100.c reg = (reg & 0x3f) | (data->fan_div[2] << 6); fan_div 381 drivers/hwmon/asb100.c FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 985 drivers/hwmon/asb100.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 986 drivers/hwmon/asb100.c data->fan_div[1] = (i >> 6) & 0x03; fan_div 987 drivers/hwmon/asb100.c data->fan_div[2] = (asb100_read_value(client, fan_div 289 drivers/hwmon/emc2103.c int fan_div = 8 / data->fan_multiplier; fan_div 290 drivers/hwmon/emc2103.c return sprintf(buf, "%d\n", fan_div); fan_div 656 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan1_div, fan_div, 0), fan_div 661 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan2_div, fan_div, 1), fan_div 666 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan3_div, fan_div, 2), fan_div 671 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan4_div, fan_div, 3), fan_div 676 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan5_div, fan_div, 4), fan_div 681 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan6_div, fan_div, 5), fan_div 686 drivers/hwmon/fschmd.c SENSOR_ATTR_RW(fan7_div, fan_div, 6), fan_div 41 drivers/hwmon/g760a.c u16 fan_div; /* default P=2 */ fan_div 114 drivers/hwmon/g760a.c rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div); fan_div 191 drivers/hwmon/g760a.c data->fan_div = G760A_DEFAULT_FAN_DIV; fan_div 118 drivers/hwmon/gl518sm.c u8 fan_div[2]; /* Register encoding, shifted right */ fan_div 193 drivers/hwmon/gl518sm.c data->fan_div[0] = (val >> 6) & 0x03; fan_div 194 drivers/hwmon/gl518sm.c data->fan_div[1] = (val >> 4) & 0x03; fan_div 260 drivers/hwmon/gl518sm.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 269 drivers/hwmon/gl518sm.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 277 drivers/hwmon/gl518sm.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 357 drivers/hwmon/gl518sm.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 411 drivers/hwmon/gl518sm.c data->fan_div[nr] = val; fan_div 413 drivers/hwmon/gl518sm.c | (data->fan_div[nr] << (6 - 2 * nr)); fan_div 428 drivers/hwmon/gl518sm.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 429 drivers/hwmon/gl518sm.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 77 drivers/hwmon/gl520sm.c u8 fan_div[2]; fan_div 150 drivers/hwmon/gl520sm.c data->fan_div[0] = (val >> 6) & 0x03; fan_div 151 drivers/hwmon/gl520sm.c data->fan_div[1] = (val >> 4) & 0x03; fan_div 345 drivers/hwmon/gl520sm.c data->fan_div[n])); fan_div 355 drivers/hwmon/gl520sm.c data->fan_div[n])); fan_div 364 drivers/hwmon/gl520sm.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); fan_div 390 drivers/hwmon/gl520sm.c r = FAN_TO_REG(v, data->fan_div[n]); fan_div 449 drivers/hwmon/gl520sm.c data->fan_div[n] = r; fan_div 493 drivers/hwmon/gl520sm.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 494 drivers/hwmon/gl520sm.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 536 drivers/hwmon/it87.c u8 fan_div[NUM_FAN_DIV];/* Register encoding, shifted right */ fan_div 811 drivers/hwmon/it87.c data->fan_div[0] = i & 0x07; fan_div 812 drivers/hwmon/it87.c data->fan_div[1] = (i >> 3) & 0x07; fan_div 813 drivers/hwmon/it87.c data->fan_div[2] = (i & 0x40) ? 3 : 1; fan_div 1121 drivers/hwmon/it87.c DIV_FROM_REG(data->fan_div[nr])); fan_div 1132 drivers/hwmon/it87.c return sprintf(buf, "%lu\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 1201 drivers/hwmon/it87.c data->fan_div[nr] = reg & 0x07; fan_div 1204 drivers/hwmon/it87.c data->fan_div[nr] = (reg >> 3) & 0x07; fan_div 1207 drivers/hwmon/it87.c data->fan_div[nr] = (reg & 0x40) ? 3 : 1; fan_div 1211 drivers/hwmon/it87.c FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 1237 drivers/hwmon/it87.c min = FAN_FROM_REG(data->fan[nr][1], DIV_FROM_REG(data->fan_div[nr])); fan_div 1242 drivers/hwmon/it87.c data->fan_div[nr] = DIV_TO_REG(val); fan_div 1246 drivers/hwmon/it87.c data->fan_div[nr] = 1; fan_div 1248 drivers/hwmon/it87.c data->fan_div[nr] = 3; fan_div 1251 drivers/hwmon/it87.c val |= (data->fan_div[0] & 0x07); fan_div 1252 drivers/hwmon/it87.c val |= (data->fan_div[1] & 0x07) << 3; fan_div 1253 drivers/hwmon/it87.c if (data->fan_div[2] == 3) fan_div 1258 drivers/hwmon/it87.c data->fan[nr][1] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 131 drivers/hwmon/lm78.c u8 fan_div[3]; /* Register encoding, shifted right */ fan_div 300 drivers/hwmon/lm78.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 310 drivers/hwmon/lm78.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 327 drivers/hwmon/lm78.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 338 drivers/hwmon/lm78.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); fan_div 364 drivers/hwmon/lm78.c DIV_FROM_REG(data->fan_div[nr])); fan_div 368 drivers/hwmon/lm78.c data->fan_div[nr] = 0; fan_div 371 drivers/hwmon/lm78.c data->fan_div[nr] = 1; fan_div 374 drivers/hwmon/lm78.c data->fan_div[nr] = 2; fan_div 377 drivers/hwmon/lm78.c data->fan_div[nr] = 3; fan_div 390 drivers/hwmon/lm78.c reg = (reg & 0xcf) | (data->fan_div[nr] << 4); fan_div 393 drivers/hwmon/lm78.c reg = (reg & 0x3f) | (data->fan_div[nr] << 6); fan_div 399 drivers/hwmon/lm78.c FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 414 drivers/hwmon/lm78.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 415 drivers/hwmon/lm78.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 416 drivers/hwmon/lm78.c static SENSOR_DEVICE_ATTR_RO(fan3_div, fan_div, 2); fan_div 769 drivers/hwmon/lm78.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 770 drivers/hwmon/lm78.c data->fan_div[1] = i >> 6; fan_div 776 drivers/hwmon/lm78.c data->fan_div[2] = 1; fan_div 125 drivers/hwmon/lm80.c u8 fan_div[2]; /* Register encoding, shifted right */ fan_div 227 drivers/hwmon/lm80.c data->fan_div[0] = (rv >> 2) & 0x03; fan_div 228 drivers/hwmon/lm80.c data->fan_div[1] = (rv >> 4) & 0x03; fan_div 302 drivers/hwmon/lm80.c DIV_FROM_REG(data->fan_div[index]))); fan_div 312 drivers/hwmon/lm80.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 329 drivers/hwmon/lm80.c DIV_FROM_REG(data->fan_div[index])); fan_div 360 drivers/hwmon/lm80.c DIV_FROM_REG(data->fan_div[nr])); fan_div 364 drivers/hwmon/lm80.c data->fan_div[nr] = 0; fan_div 367 drivers/hwmon/lm80.c data->fan_div[nr] = 1; fan_div 370 drivers/hwmon/lm80.c data->fan_div[nr] = 2; fan_div 373 drivers/hwmon/lm80.c data->fan_div[nr] = 3; fan_div 389 drivers/hwmon/lm80.c | (data->fan_div[nr] << (2 * (nr + 1))); fan_div 393 drivers/hwmon/lm80.c data->fan[f_min][nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 475 drivers/hwmon/lm80.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 476 drivers/hwmon/lm80.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 163 drivers/hwmon/lm87.c u8 fan_div[2]; /* register value, shifted right */ fan_div 242 drivers/hwmon/lm87.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 243 drivers/hwmon/lm87.c data->fan_div[1] = (i >> 6) & 0x03; fan_div 469 drivers/hwmon/lm87.c FAN_DIV_FROM_REG(data->fan_div[nr]))); fan_div 479 drivers/hwmon/lm87.c FAN_DIV_FROM_REG(data->fan_div[nr]))); fan_div 489 drivers/hwmon/lm87.c FAN_DIV_FROM_REG(data->fan_div[nr])); fan_div 508 drivers/hwmon/lm87.c FAN_DIV_FROM_REG(data->fan_div[nr])); fan_div 538 drivers/hwmon/lm87.c FAN_DIV_FROM_REG(data->fan_div[nr])); fan_div 542 drivers/hwmon/lm87.c data->fan_div[nr] = 0; fan_div 545 drivers/hwmon/lm87.c data->fan_div[nr] = 1; fan_div 548 drivers/hwmon/lm87.c data->fan_div[nr] = 2; fan_div 551 drivers/hwmon/lm87.c data->fan_div[nr] = 3; fan_div 561 drivers/hwmon/lm87.c reg = (reg & 0xCF) | (data->fan_div[0] << 4); fan_div 564 drivers/hwmon/lm87.c reg = (reg & 0x3F) | (data->fan_div[1] << 6); fan_div 579 drivers/hwmon/lm87.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 582 drivers/hwmon/lm87.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 1150 drivers/hwmon/nct6775.c u8 fan_div[NUM_FAN]; fan_div 1484 drivers/hwmon/nct6775.c | (data->fan_div[0] & 0x7); fan_div 1489 drivers/hwmon/nct6775.c | ((data->fan_div[1] << 4) & 0x70); fan_div 1494 drivers/hwmon/nct6775.c | (data->fan_div[2] & 0x7); fan_div 1499 drivers/hwmon/nct6775.c | ((data->fan_div[3] << 4) & 0x70); fan_div 1516 drivers/hwmon/nct6775.c data->fan_div[0] = i & 0x7; fan_div 1517 drivers/hwmon/nct6775.c data->fan_div[1] = (i & 0x70) >> 4; fan_div 1519 drivers/hwmon/nct6775.c data->fan_div[2] = i & 0x7; fan_div 1521 drivers/hwmon/nct6775.c data->fan_div[3] = (i & 0x70) >> 4; fan_div 1541 drivers/hwmon/nct6775.c for (i = 0; i < ARRAY_SIZE(data->fan_div); i++) { fan_div 1544 drivers/hwmon/nct6775.c if (data->fan_div[i] == 0) { fan_div 1545 drivers/hwmon/nct6775.c data->fan_div[i] = 7; fan_div 1578 drivers/hwmon/nct6775.c u8 fan_div = data->fan_div[nr]; fan_div 1589 drivers/hwmon/nct6775.c if (reg == 0x00 && fan_div < 0x07) fan_div 1590 drivers/hwmon/nct6775.c fan_div++; fan_div 1591 drivers/hwmon/nct6775.c else if (reg != 0x00 && reg < 0x30 && fan_div > 0) fan_div 1592 drivers/hwmon/nct6775.c fan_div--; fan_div 1594 drivers/hwmon/nct6775.c if (fan_div != data->fan_div[nr]) { fan_div 1596 drivers/hwmon/nct6775.c nr + 1, div_from_reg(data->fan_div[nr]), fan_div 1597 drivers/hwmon/nct6775.c div_from_reg(fan_div)); fan_div 1602 drivers/hwmon/nct6775.c if (fan_div > data->fan_div[nr]) { fan_div 1618 drivers/hwmon/nct6775.c data->fan_div[nr] = fan_div; fan_div 1803 drivers/hwmon/nct6775.c data->fan_div[i]); fan_div 2107 drivers/hwmon/nct6775.c data->fan_div[nr])); fan_div 2117 drivers/hwmon/nct6775.c return sprintf(buf, "%u\n", div_from_reg(data->fan_div[nr])); fan_div 2153 drivers/hwmon/nct6775.c new_div = data->fan_div[nr]; /* No change */ fan_div 2197 drivers/hwmon/nct6775.c if (new_div != data->fan_div[nr]) { fan_div 2199 drivers/hwmon/nct6775.c nr + 1, div_from_reg(data->fan_div[nr]), fan_div 2201 drivers/hwmon/nct6775.c data->fan_div[nr] = new_div; fan_div 2287 drivers/hwmon/nct6775.c SENSOR_TEMPLATE(fan_div, "fan%d_div", S_IRUGO, show_fan_div, NULL, 0); fan_div 2886 drivers/hwmon/nct6775.c data->fan_div[nr])); fan_div 2905 drivers/hwmon/nct6775.c speed = fan_to_reg(val, data->fan_div[nr]); fan_div 2984 drivers/hwmon/nct6775.c tolerance = (fan_from_reg16(low, data->fan_div[nr]) fan_div 2985 drivers/hwmon/nct6775.c - fan_from_reg16(high, data->fan_div[nr])) / 2; fan_div 3007 drivers/hwmon/nct6775.c data->fan_div[nr]) + val; fan_div 3009 drivers/hwmon/nct6775.c data->fan_div[nr]) - val; fan_div 3015 drivers/hwmon/nct6775.c val = (fan_to_reg(low, data->fan_div[nr]) - fan_div 3016 drivers/hwmon/nct6775.c fan_to_reg(high, data->fan_div[nr])) / 2; fan_div 324 drivers/hwmon/pc87360.c static struct sensor_device_attribute fan_div[] = { fan_div 325 drivers/hwmon/pc87360.c SENSOR_ATTR_RO(fan1_div, fan_div, 0), fan_div 326 drivers/hwmon/pc87360.c SENSOR_ATTR_RO(fan2_div, fan_div, 1), fan_div 327 drivers/hwmon/pc87360.c SENSOR_ATTR_RO(fan3_div, fan_div, 2), fan_div 338 drivers/hwmon/pc87360.c &fan_div[X].dev_attr.attr, \ fan_div 188 drivers/hwmon/sis5595.c u8 fan_div[2]; /* Register encoding, shifted right */ fan_div 366 drivers/hwmon/sis5595.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 376 drivers/hwmon/sis5595.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 393 drivers/hwmon/sis5595.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 405 drivers/hwmon/sis5595.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 431 drivers/hwmon/sis5595.c DIV_FROM_REG(data->fan_div[nr])); fan_div 436 drivers/hwmon/sis5595.c data->fan_div[nr] = 0; fan_div 439 drivers/hwmon/sis5595.c data->fan_div[nr] = 1; fan_div 442 drivers/hwmon/sis5595.c data->fan_div[nr] = 2; fan_div 445 drivers/hwmon/sis5595.c data->fan_div[nr] = 3; fan_div 457 drivers/hwmon/sis5595.c reg = (reg & 0xcf) | (data->fan_div[nr] << 4); fan_div 460 drivers/hwmon/sis5595.c reg = (reg & 0x3f) | (data->fan_div[nr] << 6); fan_div 465 drivers/hwmon/sis5595.c FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 473 drivers/hwmon/sis5595.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 476 drivers/hwmon/sis5595.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 725 drivers/hwmon/sis5595.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 726 drivers/hwmon/sis5595.c data->fan_div[1] = i >> 6; fan_div 127 drivers/hwmon/smsc47m1.c u8 fan_div[3]; /* Register encoding, shifted right */ fan_div 169 drivers/hwmon/smsc47m1.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 170 drivers/hwmon/smsc47m1.c data->fan_div[1] = i >> 6; fan_div 179 drivers/hwmon/smsc47m1.c data->fan_div[2] = (smsc47m1_read_value(data, fan_div 211 drivers/hwmon/smsc47m1.c DIV_FROM_REG(data->fan_div[nr]), fan_div 223 drivers/hwmon/smsc47m1.c DIV_FROM_REG(data->fan_div[nr])); fan_div 232 drivers/hwmon/smsc47m1.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); fan_div 282 drivers/hwmon/smsc47m1.c rpmdiv = val * DIV_FROM_REG(data->fan_div[nr]); fan_div 313 drivers/hwmon/smsc47m1.c u8 old_div = DIV_FROM_REG(data->fan_div[nr]); fan_div 325 drivers/hwmon/smsc47m1.c data->fan_div[nr] = 0; fan_div 328 drivers/hwmon/smsc47m1.c data->fan_div[nr] = 1; fan_div 331 drivers/hwmon/smsc47m1.c data->fan_div[nr] = 2; fan_div 334 drivers/hwmon/smsc47m1.c data->fan_div[nr] = 3; fan_div 346 drivers/hwmon/smsc47m1.c tmp |= data->fan_div[nr] << (4 + 2 * nr); fan_div 351 drivers/hwmon/smsc47m1.c tmp |= data->fan_div[2] << 4; fan_div 424 drivers/hwmon/smsc47m1.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 430 drivers/hwmon/smsc47m1.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 436 drivers/hwmon/smsc47m1.c static SENSOR_DEVICE_ATTR_RW(fan3_div, fan_div, 2); fan_div 318 drivers/hwmon/via686a.c u8 fan_div[2]; /* Register encoding, shifted right */ fan_div 503 drivers/hwmon/via686a.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 512 drivers/hwmon/via686a.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 519 drivers/hwmon/via686a.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 534 drivers/hwmon/via686a.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 554 drivers/hwmon/via686a.c data->fan_div[nr] = DIV_TO_REG(val); fan_div 555 drivers/hwmon/via686a.c old = (old & 0x0f) | (data->fan_div[1] << 6) | (data->fan_div[0] << 4); fan_div 563 drivers/hwmon/via686a.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 566 drivers/hwmon/via686a.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 725 drivers/hwmon/via686a.c data->fan_div[0] = (reg >> 4) & 0x03; fan_div 726 drivers/hwmon/via686a.c data->fan_div[1] = reg >> 6; fan_div 120 drivers/hwmon/vt1211.c u8 fan_div[2]; fan_div 293 drivers/hwmon/vt1211.c data->fan_div[0] = (val >> 4) & 3; fan_div 294 drivers/hwmon/vt1211.c data->fan_div[1] = (val >> 6) & 3; fan_div 502 drivers/hwmon/vt1211.c res = RPM_FROM_REG(data->fan[ix], data->fan_div[ix]); fan_div 505 drivers/hwmon/vt1211.c res = RPM_FROM_REG(data->fan_min[ix], data->fan_div[ix]); fan_div 508 drivers/hwmon/vt1211.c res = DIV_FROM_REG(data->fan_div[ix]); fan_div 541 drivers/hwmon/vt1211.c data->fan_div[0] = (reg >> 4) & 3; fan_div 542 drivers/hwmon/vt1211.c data->fan_div[1] = (reg >> 6) & 3; fan_div 547 drivers/hwmon/vt1211.c data->fan_min[ix] = RPM_TO_REG(val, data->fan_div[ix]); fan_div 554 drivers/hwmon/vt1211.c data->fan_div[ix] = 0; fan_div 557 drivers/hwmon/vt1211.c data->fan_div[ix] = 1; fan_div 560 drivers/hwmon/vt1211.c data->fan_div[ix] = 2; fan_div 563 drivers/hwmon/vt1211.c data->fan_div[ix] = 3; fan_div 573 drivers/hwmon/vt1211.c ((data->fan_div[1] << 6) | fan_div 574 drivers/hwmon/vt1211.c (data->fan_div[0] << 4) | fan_div 649 drivers/hwmon/vt1211.c data->fan_div[0] = (reg >> 4) & 3; fan_div 650 drivers/hwmon/vt1211.c data->fan_div[1] = (reg >> 6) & 3; fan_div 680 drivers/hwmon/vt1211.c ((data->fan_div[1] << 6) | fan_div 681 drivers/hwmon/vt1211.c (data->fan_div[0] << 4) | fan_div 159 drivers/hwmon/vt8231.c u8 fan_div[2]; /* Register encoding, shifted right */ fan_div 500 drivers/hwmon/vt8231.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 510 drivers/hwmon/vt8231.c DIV_FROM_REG(data->fan_div[nr]))); fan_div 519 drivers/hwmon/vt8231.c return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 537 drivers/hwmon/vt8231.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 553 drivers/hwmon/vt8231.c DIV_FROM_REG(data->fan_div[nr])); fan_div 563 drivers/hwmon/vt8231.c data->fan_div[nr] = 0; fan_div 566 drivers/hwmon/vt8231.c data->fan_div[nr] = 1; fan_div 569 drivers/hwmon/vt8231.c data->fan_div[nr] = 2; fan_div 572 drivers/hwmon/vt8231.c data->fan_div[nr] = 3; fan_div 583 drivers/hwmon/vt8231.c data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 586 drivers/hwmon/vt8231.c old = (old & 0x0f) | (data->fan_div[1] << 6) | (data->fan_div[0] << 4); fan_div 594 drivers/hwmon/vt8231.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 597 drivers/hwmon/vt8231.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 915 drivers/hwmon/vt8231.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 916 drivers/hwmon/vt8231.c data->fan_div[1] = i >> 6; fan_div 457 drivers/hwmon/w83627ehf.c u8 fan_div[5]; fan_div 594 drivers/hwmon/w83627ehf.c | (data->fan_div[0] & 0x7); fan_div 599 drivers/hwmon/w83627ehf.c | ((data->fan_div[1] << 4) & 0x70); fan_div 604 drivers/hwmon/w83627ehf.c | (data->fan_div[2] & 0x7); fan_div 609 drivers/hwmon/w83627ehf.c | ((data->fan_div[3] << 4) & 0x70); fan_div 623 drivers/hwmon/w83627ehf.c | ((data->fan_div[0] & 0x03) << 4); fan_div 628 drivers/hwmon/w83627ehf.c | ((data->fan_div[0] & 0x04) << 3); fan_div 633 drivers/hwmon/w83627ehf.c | ((data->fan_div[1] & 0x03) << 6); fan_div 638 drivers/hwmon/w83627ehf.c | ((data->fan_div[1] & 0x04) << 4); fan_div 643 drivers/hwmon/w83627ehf.c | ((data->fan_div[2] & 0x03) << 6); fan_div 646 drivers/hwmon/w83627ehf.c | ((data->fan_div[2] & 0x04) << 5); fan_div 651 drivers/hwmon/w83627ehf.c | (data->fan_div[3] & 0x03); fan_div 654 drivers/hwmon/w83627ehf.c | ((data->fan_div[3] & 0x04) << 5); fan_div 659 drivers/hwmon/w83627ehf.c | ((data->fan_div[4] & 0x03) << 2) fan_div 660 drivers/hwmon/w83627ehf.c | ((data->fan_div[4] & 0x04) << 5); fan_div 684 drivers/hwmon/w83627ehf.c data->fan_div[0] = i & 0x7; fan_div 685 drivers/hwmon/w83627ehf.c data->fan_div[1] = (i & 0x70) >> 4; fan_div 687 drivers/hwmon/w83627ehf.c data->fan_div[2] = i & 0x7; fan_div 689 drivers/hwmon/w83627ehf.c data->fan_div[3] = (i & 0x70) >> 4; fan_div 697 drivers/hwmon/w83627ehf.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 698 drivers/hwmon/w83627ehf.c data->fan_div[1] = (i >> 6) & 0x03; fan_div 700 drivers/hwmon/w83627ehf.c data->fan_div[2] = (i >> 6) & 0x03; fan_div 702 drivers/hwmon/w83627ehf.c data->fan_div[0] |= (i >> 3) & 0x04; fan_div 703 drivers/hwmon/w83627ehf.c data->fan_div[1] |= (i >> 4) & 0x04; fan_div 704 drivers/hwmon/w83627ehf.c data->fan_div[2] |= (i >> 5) & 0x04; fan_div 707 drivers/hwmon/w83627ehf.c data->fan_div[3] = i & 0x03; fan_div 708 drivers/hwmon/w83627ehf.c data->fan_div[4] = ((i >> 2) & 0x03) fan_div 713 drivers/hwmon/w83627ehf.c data->fan_div[3] |= (i >> 5) & 0x04; fan_div 821 drivers/hwmon/w83627ehf.c data->fan_div[i]); fan_div 835 drivers/hwmon/w83627ehf.c && data->fan_div[i] < 0x07) { fan_div 838 drivers/hwmon/w83627ehf.c i + 1, div_from_reg(data->fan_div[i]), fan_div 839 drivers/hwmon/w83627ehf.c div_from_reg(data->fan_div[i] + 1)); fan_div 840 drivers/hwmon/w83627ehf.c data->fan_div[i]++; fan_div 1048 drivers/hwmon/w83627ehf.c data->fan_div[nr])); fan_div 1058 drivers/hwmon/w83627ehf.c return sprintf(buf, "%u\n", div_from_reg(data->fan_div[nr])); fan_div 1097 drivers/hwmon/w83627ehf.c new_div = data->fan_div[nr]; /* No change */ fan_div 1137 drivers/hwmon/w83627ehf.c if (new_div != data->fan_div[nr]) { fan_div 1139 drivers/hwmon/w83627ehf.c nr + 1, div_from_reg(data->fan_div[nr]), fan_div 1141 drivers/hwmon/w83627ehf.c data->fan_div[nr] = new_div; fan_div 369 drivers/hwmon/w83627hf.c u8 fan_div[3]; /* Register encoding, shifted right */ fan_div 671 drivers/hwmon/w83627hf.c (long)DIV_FROM_REG(data->fan_div[nr]))); fan_div 679 drivers/hwmon/w83627hf.c (long)DIV_FROM_REG(data->fan_div[nr]))); fan_div 695 drivers/hwmon/w83627hf.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 982 drivers/hwmon/w83627hf.c (long) DIV_FROM_REG(data->fan_div[nr])); fan_div 1009 drivers/hwmon/w83627hf.c DIV_FROM_REG(data->fan_div[nr])); fan_div 1011 drivers/hwmon/w83627hf.c data->fan_div[nr] = DIV_TO_REG(val); fan_div 1015 drivers/hwmon/w83627hf.c | ((data->fan_div[nr] & 0x03) << (nr==0 ? 4 : 6)); fan_div 1020 drivers/hwmon/w83627hf.c | ((data->fan_div[nr] & 0x04) << (3 + nr)); fan_div 1024 drivers/hwmon/w83627hf.c data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 1031 drivers/hwmon/w83627hf.c static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0); fan_div 1032 drivers/hwmon/w83627hf.c static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1); fan_div 1033 drivers/hwmon/w83627hf.c static SENSOR_DEVICE_ATTR_RW(fan3_div, fan_div, 2); fan_div 1809 drivers/hwmon/w83627hf.c data->fan_div[0] = (reg >> 4) & 0x03; fan_div 1810 drivers/hwmon/w83627hf.c data->fan_div[1] = (reg >> 6) & 0x03; fan_div 1812 drivers/hwmon/w83627hf.c data->fan_div[2] = (w83627hf_read_value(data, fan_div 1816 drivers/hwmon/w83627hf.c data->fan_div[0] |= (reg >> 3) & 0x04; fan_div 1817 drivers/hwmon/w83627hf.c data->fan_div[1] |= (reg >> 4) & 0x04; fan_div 1819 drivers/hwmon/w83627hf.c data->fan_div[2] |= (reg >> 5) & 0x04; fan_div 223 drivers/hwmon/w83781d.c u8 fan_div[3]; /* Register encoding, shifted right */ fan_div 307 drivers/hwmon/w83781d.c DIV_FROM_REG(data->fan_div[attr->index]))); \ fan_div 328 drivers/hwmon/w83781d.c FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 625 drivers/hwmon/w83781d.c (long) DIV_FROM_REG(data->fan_div[attr->index])); fan_div 654 drivers/hwmon/w83781d.c DIV_FROM_REG(data->fan_div[nr])); fan_div 656 drivers/hwmon/w83781d.c data->fan_div[nr] = DIV_TO_REG(val, data->type); fan_div 661 drivers/hwmon/w83781d.c | ((data->fan_div[nr] & 0x03) << (nr == 0 ? 4 : 6)); fan_div 669 drivers/hwmon/w83781d.c | ((data->fan_div[nr] & 0x04) << (3 + nr)); fan_div 674 drivers/hwmon/w83781d.c data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 1515 drivers/hwmon/w83781d.c data->fan_div[0] = (i >> 4) & 0x03; fan_div 1516 drivers/hwmon/w83781d.c data->fan_div[1] = (i >> 6) & 0x03; fan_div 1517 drivers/hwmon/w83781d.c data->fan_div[2] = (w83781d_read_value(data, fan_div 1521 drivers/hwmon/w83781d.c data->fan_div[0] |= (i >> 3) & 0x04; fan_div 1522 drivers/hwmon/w83781d.c data->fan_div[1] |= (i >> 4) & 0x04; fan_div 1523 drivers/hwmon/w83781d.c data->fan_div[2] |= (i >> 5) & 0x04; fan_div 287 drivers/hwmon/w83791d.c u8 fan_div[NUMBER_OF_FANIN]; /* Register encoding, shifted right */ fan_div 528 drivers/hwmon/w83791d.c FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \ fan_div 549 drivers/hwmon/w83791d.c data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 562 drivers/hwmon/w83791d.c return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 593 drivers/hwmon/w83791d.c min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); fan_div 596 drivers/hwmon/w83791d.c data->fan_div[nr] = div_to_reg(nr, val); fan_div 634 drivers/hwmon/w83791d.c tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; fan_div 644 drivers/hwmon/w83791d.c tmp_fan_div = (data->fan_div[nr] << (3 + nr)) & ~keep_mask; fan_div 650 drivers/hwmon/w83791d.c data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 1524 drivers/hwmon/w83791d.c data->fan_div[0] = (reg_array_tmp[0] >> 4) & 0x03; fan_div 1525 drivers/hwmon/w83791d.c data->fan_div[1] = (reg_array_tmp[0] >> 6) & 0x03; fan_div 1526 drivers/hwmon/w83791d.c data->fan_div[2] = (reg_array_tmp[1] >> 6) & 0x03; fan_div 1527 drivers/hwmon/w83791d.c data->fan_div[3] = reg_array_tmp[2] & 0x07; fan_div 1528 drivers/hwmon/w83791d.c data->fan_div[4] = (reg_array_tmp[2] >> 4) & 0x07; fan_div 1536 drivers/hwmon/w83791d.c data->fan_div[i] |= (vbat_reg >> (3 + i)) & 0x04; fan_div 1636 drivers/hwmon/w83791d.c dev_dbg(dev, "fan_div[%d] is: 0x%02x\n", i, data->fan_div[i]); fan_div 278 drivers/hwmon/w83792d.c u8 fan_div[7]; /* Register encoding, shifted right */ fan_div 402 drivers/hwmon/w83792d.c FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \ fan_div 424 drivers/hwmon/w83792d.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 439 drivers/hwmon/w83792d.c return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1])); fan_div 470 drivers/hwmon/w83792d.c DIV_FROM_REG(data->fan_div[nr])); fan_div 472 drivers/hwmon/w83792d.c data->fan_div[nr] = DIV_TO_REG(val); fan_div 476 drivers/hwmon/w83792d.c tmp_fan_div = (nr & 0x01) ? (((data->fan_div[nr]) << 4) & 0x70) fan_div 477 drivers/hwmon/w83792d.c : ((data->fan_div[nr]) & 0x07); fan_div 482 drivers/hwmon/w83792d.c data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 1546 drivers/hwmon/w83792d.c data->fan_div[0] = reg_array_tmp[0] & 0x07; fan_div 1547 drivers/hwmon/w83792d.c data->fan_div[1] = (reg_array_tmp[0] >> 4) & 0x07; fan_div 1548 drivers/hwmon/w83792d.c data->fan_div[2] = reg_array_tmp[1] & 0x07; fan_div 1549 drivers/hwmon/w83792d.c data->fan_div[3] = (reg_array_tmp[1] >> 4) & 0x07; fan_div 1550 drivers/hwmon/w83792d.c data->fan_div[4] = reg_array_tmp[2] & 0x07; fan_div 1551 drivers/hwmon/w83792d.c data->fan_div[5] = (reg_array_tmp[2] >> 4) & 0x07; fan_div 1552 drivers/hwmon/w83792d.c data->fan_div[6] = reg_array_tmp[3] & 0x07; fan_div 1642 drivers/hwmon/w83792d.c dev_dbg(dev, "fan_div[%d] is: 0x%x\n", i, data->fan_div[i]); fan_div 125 drivers/hwmon/w83l786ng.c u8 fan_div[2]; fan_div 182 drivers/hwmon/w83l786ng.c data->fan_div[0] = reg_tmp & 0x07; fan_div 183 drivers/hwmon/w83l786ng.c data->fan_div[1] = (reg_tmp >> 4) & 0x07; fan_div 284 drivers/hwmon/w83l786ng.c FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \ fan_div 305 drivers/hwmon/w83l786ng.c data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); fan_div 319 drivers/hwmon/w83l786ng.c return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); fan_div 351 drivers/hwmon/w83l786ng.c min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); fan_div 353 drivers/hwmon/w83l786ng.c data->fan_div[nr] = DIV_TO_REG(val); fan_div 369 drivers/hwmon/w83l786ng.c tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; fan_div 375 drivers/hwmon/w83l786ng.c data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); fan_div 735 drivers/hwmon/w83l786ng.c data->fan_div[0] = reg_tmp & 0x07; fan_div 736 drivers/hwmon/w83l786ng.c data->fan_div[1] = (reg_tmp >> 4) & 0x07;