/linux-6.1.9/drivers/hwmon/ |
D | pc87360.c | 201 u8 fan_min[3]; /* Register value */ member 256 u8 old_min = data->fan_min[nr]; in pc87360_autodiv() 263 data->fan_min[nr] >>= 1; in pc87360_autodiv() 271 while (!(data->fan_min[nr] & 0x80) /* min "nails" divider */ in pc87360_autodiv() 275 data->fan_min[nr] <<= 1; in pc87360_autodiv() 285 if (old_min != data->fan_min[nr]) { in pc87360_autodiv() 288 data->fan_min[nr]); in pc87360_autodiv() 310 data->fan_min[i] = pc87360_read_value(data, in pc87360_update_device() 1164 return sprintf(buf, "%u\n", FAN_FROM_REG(data->fan_min[attr->index], in fan_min_show() 1174 long fan_min; in fan_min_store() local [all …]
|
D | vt8231.c | 160 u8 fan_min[2]; /* Register value */ member 202 data->fan_min[i] = vt8231_read_value(data, in vt8231_update_device() 228 if (!data->fan[0] && data->fan_min[0]) in vt8231_update_device() 230 else if (data->fan[0] && !data->fan_min[0]) in vt8231_update_device() 233 if (!data->fan[1] && data->fan_min[1]) in vt8231_update_device() 235 else if (data->fan[1] && !data->fan_min[1]) in vt8231_update_device() 575 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 603 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store() 604 vt8231_write_value(data, VT8231_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_min_store() 618 long min = FAN_FROM_REG(data->fan_min[nr], in fan_div_store() [all …]
|
D | lm78.c | 127 u8 fan_min[3]; /* Register value */ member 309 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 327 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store() 328 lm78_write_value(data, LM78_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_min_store() 363 min = FAN_FROM_REG(data->fan_min[nr], in fan_div_store() 398 data->fan_min[nr] = in fan_div_store() 400 lm78_write_value(data, LM78_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_div_store() 407 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 409 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 411 static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2); [all …]
|
D | sis5595.c | 185 u8 fan_min[2]; /* Register value */ member 238 data->fan_min[i] = in sis5595_update_device() 430 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 448 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store() 449 sis5595_write_value(data, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_min_store() 485 min = FAN_FROM_REG(data->fan_min[nr], in fan_div_store() 519 data->fan_min[nr] = in fan_div_store() 521 sis5595_write_value(data, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_div_store() 527 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 530 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); [all …]
|
D | w83l786ng.c | 126 u8 fan_min[2]; member 176 data->fan_min[i] = w83l786ng_read_value(client, in w83l786ng_update_device() 288 show_fan_reg(fan_min); 305 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 307 data->fan_min[nr]); in store_fan_min() 351 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 375 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 377 data->fan_min[nr]); in store_fan_div() 729 data->fan_min[i] = w83l786ng_read_value(client, in w83l786ng_probe()
|
D | gl518sm.c | 117 u8 fan_min[2]; member 183 data->fan_min[0] = (val >> 8) & 0xff; in gl518_update_device() 184 data->fan_min[1] = val & 0xff; in gl518_update_device() 268 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 357 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store() 359 | (data->fan_min[nr] << (8 * (1 - nr))); in fan_min_store() 363 if (data->fan_min[nr] == 0) in fan_min_store() 426 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 427 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1);
|
D | asb100.c | 194 u8 fan_min[3]; /* Register value */ member 300 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in show_fan_min() 326 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 327 asb100_write_value(client, ASB100_REG_FAN_MIN(nr), data->fan_min[nr]); in set_fan_min() 355 min = FAN_FROM_REG(data->fan_min[nr], in set_fan_div() 379 data->fan_min[nr] = in set_fan_div() 381 asb100_write_value(client, ASB100_REG_FAN_MIN(nr), data->fan_min[nr]); in set_fan_div() 800 data->fan_min[0] = asb100_read_value(client, ASB100_REG_FAN_MIN(0)); in asb100_probe() 801 data->fan_min[1] = asb100_read_value(client, ASB100_REG_FAN_MIN(1)); in asb100_probe() 802 data->fan_min[2] = asb100_read_value(client, ASB100_REG_FAN_MIN(2)); in asb100_probe() [all …]
|
D | pc87427.c | 55 u16 fan_min[8]; /* register values */ member 190 data->fan_min[nr] = inw(iobase + PC87427_REG_FAN_MIN); in pc87427_readall_fan() 402 return sprintf(buf, "%lu\n", fan_from_reg(data->fan_min[nr])); in fan_min_show() 445 data->fan_min[nr] = fan_to_reg(val); in fan_min_store() 446 outw(data->fan_min[nr], iobase + PC87427_REG_FAN_MIN); in fan_min_store() 462 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 463 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 464 static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2); 465 static SENSOR_DEVICE_ATTR_RW(fan4_min, fan_min, 3); 466 static SENSOR_DEVICE_ATTR_RW(fan5_min, fan_min, 4); [all …]
|
D | gl520sm.c | 76 u8 fan_min[2]; member 139 data->fan_min[0] = (val >> 8) & 0xff; in gl520_update_device() 140 data->fan_min[1] = val & 0xff; in gl520_update_device() 354 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[n], in fan_min_show() 391 data->fan_min[n] = r; in fan_min_store() 403 if (data->fan_min[n] == 0) in fan_min_store() 491 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 492 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 848 if (data->fan_min[0] == 0) in gl520_init_client() 850 if (data->fan_min[1] == 0) in gl520_init_client()
|
D | adm1031.c | 81 u8 fan_min[2]; member 179 data->fan_min[chan] = in adm1031_update_device() 580 FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 599 data->fan_min[nr] = in fan_min_store() 602 data->fan_min[nr] = 0xff; in fan_min_store() 604 adm1031_write_value(client, ADM1031_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_min_store() 637 data->fan_min[nr] = adm1031_read_value(client, in fan_div_store() 643 new_min = data->fan_min[nr] * old_div / val; in fan_div_store() 644 data->fan_min[nr] = new_min > 0xff ? 0xff : new_min; in fan_div_store() 649 data->fan_min[nr]); in fan_div_store() [all …]
|
D | lm87.c | 162 u8 fan_min[2]; /* register value */ member 218 data->fan_min[i] = lm87_read_value(client, in lm87_update_device() 478 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 507 data->fan_min[nr] = FAN_TO_REG(val, in fan_min_store() 509 lm87_write_value(client, LM87_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_min_store() 537 min = FAN_FROM_REG(data->fan_min[nr], in fan_div_store() 569 data->fan_min[nr] = FAN_TO_REG(min, val); in fan_div_store() 571 data->fan_min[nr]); in fan_div_store() 578 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 581 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1);
|
D | adm1026.c | 276 u8 fan_min[8]; /* Register value */ member 393 data->fan_min[i] = adm1026_read_value(client, in adm1026_update_device() 668 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 687 data->fan_min[nr] = FAN_TO_REG(val, data->fan_div[nr]); in fan_min_store() 689 data->fan_min[nr]); in fan_min_store() 695 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 697 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 699 static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2); 701 static SENSOR_DEVICE_ATTR_RW(fan4_min, fan_min, 3); 703 static SENSOR_DEVICE_ATTR_RW(fan5_min, fan_min, 4); [all …]
|
D | via686a.c | 316 u8 fan_min[2]; /* Register value */ member 365 data->fan_min[i - 1] = via686a_read_value(data, in via686a_update_device() 578 FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 601 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store() 602 via686a_write_value(data, VIA686A_REG_FAN_MIN(nr+1), data->fan_min[nr]); in fan_min_store() 629 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 632 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1);
|
D | adm9240.c | 170 u8 fan_min; in adm9240_fan_min_write() local 176 fan_min = 255; in adm9240_fan_min_write() 182 fan_min = 254; in adm9240_fan_min_write() 197 fan_min = new_min; in adm9240_fan_min_write() 207 err = regmap_write(data->regmap, ADM9240_REG_FAN_MIN(channel), fan_min); in adm9240_fan_min_write()
|
D | w83627hf.c | 365 u8 fan_min[3]; /* Register value */ member 505 data->fan_min[i] = in w83627hf_update_device() 604 data->fan_min[i]); in w83627hf_resume() 1110 return sprintf(buf, "%ld\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show() 1128 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store() 1130 data->fan_min[nr]); in fan_min_store() 1137 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 1139 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 1141 static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2); 1176 min = FAN_FROM_REG(data->fan_min[nr], in fan_div_store() [all …]
|
D | nct6775-core.c | 1235 for (i = 0; i < ARRAY_SIZE(data->fan_min); i++) { in nct6775_init_fan_common() 1257 u16 fan_min; in nct6775_select_fan_div() local 1279 fan_min = data->fan_min[nr]; in nct6775_select_fan_div() 1281 if (fan_min != 255 && fan_min > 1) in nct6775_select_fan_div() 1282 fan_min >>= 1; in nct6775_select_fan_div() 1284 if (fan_min != 255) { in nct6775_select_fan_div() 1285 fan_min <<= 1; in nct6775_select_fan_div() 1286 if (fan_min > 254) in nct6775_select_fan_div() 1287 fan_min = 254; in nct6775_select_fan_div() 1290 if (fan_min != data->fan_min[nr]) { in nct6775_select_fan_div() [all …]
|
D | adt7462.c | 206 u8 fan_min[ADT7462_FAN_COUNT]; member 742 data->fan_min[i] = i2c_smbus_read_byte_data(client, in adt7462_update_device() 1002 temp = data->fan_min[attr->index]; in fan_min_show() 1030 data->fan_min[attr->index] = temp; in fan_min_store() 1508 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 1509 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 1510 static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2); 1511 static SENSOR_DEVICE_ATTR_RW(fan4_min, fan_min, 3); 1512 static SENSOR_DEVICE_ATTR_RW(fan5_min, fan_min, 4); 1513 static SENSOR_DEVICE_ATTR_RW(fan6_min, fan_min, 5); [all …]
|
D | w83627ehf.c | 333 u16 fan_min[5]; member 599 data->fan_min[i] = w83627ehf_read_value(data, in w83627ehf_update_device() 616 && data->fan_min[i] >= 2 in w83627ehf_update_device() 617 && data->fan_min[i] != 255) in w83627ehf_update_device() 620 (data->fan_min[i] /= 2)); in w83627ehf_update_device() 729 data->fan_min[channel] = 255; in store_in_reg() 738 data->fan_min[channel] = 254; in store_in_reg() 748 data->fan_min[channel] = 1; in store_in_reg() 764 data->fan_min[channel] = reg; in store_in_reg() 782 data->fan_min[channel]); in store_in_reg() [all …]
|
D | w83791d.c | 283 u8 fan_min[NUMBER_OF_FANIN]; /* Register value */ member 528 show_fan_reg(fan_min); 545 data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 546 w83791d_write(client, W83791D_REG_FAN_MIN[nr], data->fan_min[nr]); in store_fan_min() 589 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 646 data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 647 w83791d_write(client, W83791D_REG_FAN_MIN[nr], data->fan_min[nr]); in store_fan_div() 1375 data->fan_min[i] = w83791d_read(client, W83791D_REG_FAN_MIN[i]); in w83791d_probe() 1504 data->fan_min[i] = w83791d_read(client, in w83791d_update_device() 1624 dev_dbg(dev, "fan[%d] min is: 0x%02x\n", i, data->fan_min[i]); in w83791d_print_debug()
|
D | sch5627.c | 74 u16 fan_min[SCH5627_NO_FANS]; member 200 data->fan_min[i] = val; in sch5627_read_limits() 275 ret = reg_to_rpm(data->fan_min[channel]); in sch5627_read()
|
D | w83792d.c | 272 u8 fan_min[7]; /* Register value */ member 402 show_fan_reg(fan_min); 420 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 422 data->fan_min[nr]); in store_fan_min() 465 min = FAN_FROM_REG(data->fan_min[nr], in store_fan_div() 478 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 479 w83792d_write_value(client, W83792D_REG_FAN_MIN[nr], data->fan_min[nr]); in store_fan_div() 1377 data->fan_min[i] = w83792d_read_value(client, in w83792d_probe() 1509 data->fan_min[i] = w83792d_read_value(client, in w83792d_update_device() 1618 dev_dbg(dev, "fan[%d] min is: 0x%x\n", i, data->fan_min[i]); in w83792d_print_debug()
|
D | lm85.c | 308 u16 fan_min[4]; /* Register value */ member 479 data->fan_min[i] = in lm85_update_device() 565 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[nr])); in fan_min_show() 583 data->fan_min[nr] = FAN_TO_REG(val); in fan_min_store() 584 lm85_write_value(client, LM85_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_min_store() 590 static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0); 592 static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1); 594 static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2); 596 static SENSOR_DEVICE_ATTR_RW(fan4_min, fan_min, 3);
|
D | f75375s.c | 97 u16 fan_min[2]; member 194 data->fan_min[nr] = in f75375_update_device() 298 data->fan_min[nr] = rpm_to_reg(val); in set_fan_min() 299 f75375_write16(client, F75375_REG_FAN_MIN(nr), data->fan_min[nr]); in set_fan_min() 653 show_fan(fan_min);
|
/linux-6.1.9/Documentation/hwmon/ |
D | adm9240.rst | 102 * User sets 0 to fan_min limit 108 * User sets fan_min limit too low 112 - fan_min set to register value 254 which corresponds 121 - fan clock divider set to suit fan_min 122 - auto fan clock adjuster enabled: adjusts fan_min 128 - auto fan clock adjuster enabled: adjusts fan_min
|
/linux-6.1.9/drivers/macintosh/ |
D | windfarm_rm31.c | 368 int speed, dspeed, fan_min; in backside_fan_tick() local 408 fan_min = (dspeed * 100) / 14000; in backside_fan_tick() 409 fan_min = max(fan_min, backside_param.min); in backside_fan_tick() 410 speed = max(speed, fan_min); in backside_fan_tick()
|