/drivers/hwmon/ |
D | smsc47m1.c | 131 u8 fan_div[3]; /* Register encoding, shifted right */ member 178 DIV_FROM_REG(data->fan_div[nr]), in get_fan() 190 DIV_FROM_REG(data->fan_div[nr])); in get_fan_min() 199 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in get_fan_div() 242 rpmdiv = val * DIV_FROM_REG(data->fan_div[nr]); in set_fan_min() 268 u8 old_div = DIV_FROM_REG(data->fan_div[nr]); in set_fan_div() 275 case 1: data->fan_div[nr] = 0; break; in set_fan_div() 276 case 2: data->fan_div[nr] = 1; break; in set_fan_div() 277 case 4: data->fan_div[nr] = 2; break; in set_fan_div() 278 case 8: data->fan_div[nr] = 3; break; in set_fan_div() [all …]
|
D | w83627ehf.c | 278 u8 fan_div[5]; member 384 | ((data->fan_div[0] & 0x03) << 4); in w83627ehf_write_fan_div() 389 | ((data->fan_div[0] & 0x04) << 3); in w83627ehf_write_fan_div() 394 | ((data->fan_div[1] & 0x03) << 6); in w83627ehf_write_fan_div() 399 | ((data->fan_div[1] & 0x04) << 4); in w83627ehf_write_fan_div() 404 | ((data->fan_div[2] & 0x03) << 6); in w83627ehf_write_fan_div() 407 | ((data->fan_div[2] & 0x04) << 5); in w83627ehf_write_fan_div() 412 | (data->fan_div[3] & 0x03); in w83627ehf_write_fan_div() 415 | ((data->fan_div[3] & 0x04) << 5); in w83627ehf_write_fan_div() 420 | ((data->fan_div[4] & 0x03) << 2) in w83627ehf_write_fan_div() [all …]
|
D | lm80.c | 121 u8 fan_div[2]; /* Register encoding, shifted right */ member 205 DIV_FROM_REG(data->fan_div[nr]))); \ 215 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); 227 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 249 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 252 case 1: data->fan_div[nr] = 0; break; in set_fan_div() 253 case 2: data->fan_div[nr] = 1; break; in set_fan_div() 254 case 4: data->fan_div[nr] = 2; break; in set_fan_div() 255 case 8: data->fan_div[nr] = 3; break; in set_fan_div() 264 | (data->fan_div[nr] << (2 * (nr + 1))); in set_fan_div() [all …]
|
D | adm9240.c | 175 u8 fan_div[2]; /* rw fan1_div, read-only accessor */ member 308 1 << data->fan_div[attr->index])); in show_fan() 317 1 << data->fan_div[attr->index])); in show_fan_min() 325 return sprintf(buf, "%d\n", 1 << data->fan_div[attr->index]); in show_fan_div() 330 u8 fan_div) in adm9240_write_fan_div() argument 337 reg |= (fan_div << shift); in adm9240_write_fan_div() 340 "to %u\n", nr + 1, 1 << old, 1 << fan_div); in adm9240_write_fan_div() 369 new_div = data->fan_div[nr]; in set_fan_min() 398 if (new_div != data->fan_div[nr]) { in set_fan_min() 399 data->fan_div[nr] = new_div; in set_fan_min() [all …]
|
D | sis5595.c | 184 u8 fan_div[2]; /* Register encoding, shifted right */ member 336 DIV_FROM_REG(data->fan_div[nr])) ); in show_fan() 346 DIV_FROM_REG(data->fan_div[nr])) ); in show_fan_min() 358 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 370 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]) ); in show_fan_div() 389 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 393 case 1: data->fan_div[nr] = 0; break; in set_fan_div() 394 case 2: data->fan_div[nr] = 1; break; in set_fan_div() 395 case 4: data->fan_div[nr] = 2; break; in set_fan_div() 396 case 8: data->fan_div[nr] = 3; break; in set_fan_div() [all …]
|
D | lm78.c | 139 u8 fan_div[3]; /* Register encoding, shifted right */ member 322 DIV_FROM_REG(data->fan_div[nr])) ); in show_fan() 332 DIV_FROM_REG(data->fan_div[nr])) ); in show_fan_min() 344 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 355 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div() 374 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 377 case 1: data->fan_div[nr] = 0; break; in set_fan_div() 378 case 2: data->fan_div[nr] = 1; break; in set_fan_div() 379 case 4: data->fan_div[nr] = 2; break; in set_fan_div() 380 case 8: data->fan_div[nr] = 3; break; in set_fan_div() [all …]
|
D | vt1211.c | 131 u8 fan_div[2]; member 292 data->fan_div[0] = (val >> 4) & 3; in vt1211_update_device() 293 data->fan_div[1] = (val >> 6) & 3; in vt1211_update_device() 491 res = RPM_FROM_REG(data->fan[ix], data->fan_div[ix]); in show_fan() 494 res = RPM_FROM_REG(data->fan_min[ix], data->fan_div[ix]); in show_fan() 497 res = DIV_FROM_REG(data->fan_div[ix]); in show_fan() 525 data->fan_div[0] = (reg >> 4) & 3; in set_fan() 526 data->fan_div[1] = (reg >> 6) & 3; in set_fan() 531 data->fan_min[ix] = RPM_TO_REG(val, data->fan_div[ix]); in set_fan() 537 case 1: data->fan_div[ix] = 0; break; in set_fan() [all …]
|
D | w83l786ng.c | 135 u8 fan_div[2]; member 246 FAN_FROM_REG(data->fan[nr], DIV_FROM_REG(data->fan_div[nr]))); \ 263 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 277 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 300 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 302 data->fan_div[nr] = DIV_TO_REG(simple_strtoul(buf, NULL, 10)); in store_fan_div() 318 tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; in store_fan_div() 324 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 675 data->fan_div[0] = reg_tmp & 0x07; in w83l786ng_probe() 676 data->fan_div[1] = (reg_tmp >> 4) & 0x07; in w83l786ng_probe() [all …]
|
D | vt8231.c | 164 u8 fan_div[2]; /* Register encoding, shifted right */ member 453 DIV_FROM_REG(data->fan_div[nr]))); in show_fan() 463 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 472 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 484 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 499 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 503 case 1: data->fan_div[nr] = 0; break; in set_fan_div() 504 case 2: data->fan_div[nr] = 1; break; in set_fan_div() 505 case 4: data->fan_div[nr] = 2; break; in set_fan_div() 506 case 8: data->fan_div[nr] = 3; break; in set_fan_div() [all …]
|
D | asb100.c | 200 u8 fan_div[3]; /* Register encoding, right justified */ member 293 DIV_FROM_REG(data->fan_div[nr]))); in show_fan() 302 DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 310 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 322 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 345 DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 346 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() 351 reg = (reg & 0xcf) | (data->fan_div[0] << 4); in set_fan_div() 357 reg = (reg & 0x3f) | (data->fan_div[1] << 6); in set_fan_div() 363 reg = (reg & 0x3f) | (data->fan_div[2] << 6); in set_fan_div() [all …]
|
D | adm1029.c | 161 u8 fan_div[ARRAY_SIZE(ADM1029_REG_FAN_DIV)]; member 183 || (data->fan_div[attr->index] & 0xC0) == 0 in show_fan() 188 val = 1880 * 120 / DIV_FROM_REG(data->fan_div[attr->index]) in show_fan() 198 if ((data->fan_div[attr->index] & 0xC0) == 0) in show_fan_div() 200 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div() 464 data->fan_div[nr] = in adm1029_update_device()
|
D | lm87.c | 216 u8 fan_div[2]; /* register value, shifted right */ member 408 FAN_DIV_FROM_REG(data->fan_div[offset-1]))); \ 414 FAN_DIV_FROM_REG(data->fan_div[offset-1]))); \ 419 return sprintf(buf, "%d\n", FAN_DIV_FROM_REG(data->fan_div[offset-1])); \ 434 FAN_DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 454 FAN_DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 457 case 1: data->fan_div[nr] = 0; break; in set_fan_div() 458 case 2: data->fan_div[nr] = 1; break; in set_fan_div() 459 case 4: data->fan_div[nr] = 2; break; in set_fan_div() 460 case 8: data->fan_div[nr] = 3; break; in set_fan_div() [all …]
|
D | it87.c | 274 u8 fan_div[3]; /* Register encoding, shifted right */ member 538 DIV_FROM_REG(data->fan_div[nr]))); in show_fan() 548 FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 557 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 598 case 0: data->fan_div[nr] = reg & 0x07; break; in set_fan_min() 599 case 1: data->fan_div[nr] = (reg >> 3) & 0x07; break; in set_fan_min() 600 case 2: data->fan_div[nr] = (reg & 0x40) ? 3 : 1; break; in set_fan_min() 603 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 623 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in set_fan_div() 628 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() [all …]
|
D | via686a.c | 311 u8 fan_div[2]; /* Register encoding, shifted right */ member 472 DIV_FROM_REG(data->fan_div[nr])) ); in show_fan() 480 FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])) ); in show_fan_min() 487 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]) ); in show_fan_div() 497 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 512 data->fan_div[nr] = DIV_TO_REG(val); in set_fan_div() 513 old = (old & 0x0f) | (data->fan_div[1] << 6) | (data->fan_div[0] << 4); in set_fan_div() 755 data->fan_div[0] = (i >> 4) & 0x03; in via686a_update_device() 756 data->fan_div[1] = i >> 6; in via686a_update_device()
|
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() 289 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 328 data->fan_div[nr] = val; in set_fan_div() 330 | (data->fan_div[nr] << (6 - 2 * nr)); in set_fan_div() 668 data->fan_div[0] = (val >> 6) & 0x03; in gl518_update_device() 669 data->fan_div[1] = (val >> 4) & 0x03; in gl518_update_device()
|
D | w83791d.c | 298 u8 fan_div[NUMBER_OF_FANIN]; /* Register encoding, shifted right */ member 526 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \ 542 data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 555 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 578 min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 581 data->fan_div[nr] = div_to_reg(nr, simple_strtoul(buf, NULL, 10)); in store_fan_div() 619 tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; in store_fan_div() 629 tmp_fan_div = (data->fan_div[nr] << (3 + nr)) & ~keep_mask; in store_fan_div() 635 data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1516 data->fan_div[0] = (reg_array_tmp[0] >> 4) & 0x03; in w83791d_update_device() [all …]
|
D | w83792d.c | 290 u8 fan_div[7]; /* Register encoding, shifted right */ member 407 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \ 425 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 440 return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr - 1])); in show_fan_div() 463 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 465 data->fan_div[nr] = DIV_TO_REG(simple_strtoul(buf, NULL, 10)); in store_fan_div() 469 tmp_fan_div = (nr & 0x01) ? (((data->fan_div[nr]) << 4) & 0x70) in store_fan_div() 470 : ((data->fan_div[nr]) & 0x07); in store_fan_div() 475 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1527 data->fan_div[0] = reg_array_tmp[0] & 0x07; in w83792d_update_device() [all …]
|
D | adm1031.c | 86 u8 fan_div[2]; member 482 FAN_DIV_FROM_REG(data->fan_div[nr])) : 0; in show_fan() 491 return sprintf(buf, "%d\n", FAN_DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 500 FAN_DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 513 FAN_TO_REG(val, FAN_DIV_FROM_REG(data->fan_div[nr])); in set_fan_min() 542 data->fan_div[nr] = adm1031_read_value(client, in set_fan_div() 548 old_div = FAN_DIV_FROM_REG(data->fan_div[nr]); in set_fan_div() 549 data->fan_div[nr] = tmp | (0x3f & data->fan_div[nr]); in set_fan_div() 554 data->fan_div[nr]); in set_fan_div() 966 data->fan_div[chan] = in adm1031_update_device()
|
D | w83627hf.c | 368 u8 fan_div[3]; /* Register encoding, shifted right */ member 574 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_input() 582 (long)DIV_FROM_REG(data->fan_div[nr]))); in show_fan_min() 593 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 876 (long) DIV_FROM_REG(data->fan_div[nr])); in show_fan_div() 896 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 898 data->fan_div[nr] = DIV_TO_REG(val); in store_fan_div() 902 | ((data->fan_div[nr] & 0x03) << (nr==0 ? 4 : 6)); in store_fan_div() 907 | ((data->fan_div[nr] & 0x04) << (3 + nr)); in store_fan_div() 911 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() [all …]
|
D | w83781d.c | 232 u8 fan_div[3]; /* Register encoding, shifted right */ member 313 DIV_FROM_REG(data->fan_div[attr->index]))); \ 331 FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in store_fan_min() 617 (long) DIV_FROM_REG(data->fan_div[attr->index])); in show_fan_div() 639 DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 641 data->fan_div[nr] = DIV_TO_REG(val, data->type); in store_fan_div() 645 | ((data->fan_div[nr] & 0x03) << (nr==0 ? 4 : 6)); in store_fan_div() 652 | ((data->fan_div[nr] & 0x04) << (3 + nr)); in store_fan_div() 657 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in store_fan_div() 1499 data->fan_div[0] = (i >> 4) & 0x03; in w83781d_update_device() [all …]
|
D | gl520sm.c | 125 u8 fan_div[2]; member 289 data->fan_div[n])); in get_fan_input() 299 data->fan_div[n])); in get_fan_min() 308 return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n])); in get_fan_div() 328 r = FAN_TO_REG(v, data->fan_div[n]); in set_fan_min() 372 data->fan_div[n] = r; in set_fan_div() 885 data->fan_div[0] = (val >> 6) & 0x03; in gl520_update_device() 886 data->fan_div[1] = (val >> 4) & 0x03; in gl520_update_device()
|
D | adm1026.c | 280 u8 fan_div[8]; /* Decoded value */ member 447 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_init_client() 633 data->fan_div[i] = DIV_FROM_REG(value & 0x03); in adm1026_update_device() 844 data->fan_div[nr])); in show_fan() 853 data->fan_div[nr])); in show_fan_min() 865 data->fan_min[nr] = FAN_TO_REG(val, data->fan_div[nr]); in set_fan_min() 893 int new_div = data->fan_div[fan]; in fixup_fan_min() 913 return sprintf(buf, "%d\n", data->fan_div[nr]); in show_fan_div() 930 orig_div = data->fan_div[nr]; in set_fan_div() 931 data->fan_div[nr] = DIV_FROM_REG(new_div); in set_fan_div() [all …]
|
D | pc87360.c | 323 static struct sensor_device_attribute fan_div[] = { variable 337 &fan_div[X].dev_attr.attr, \ 1233 &fan_div[i].dev_attr)) in pc87360_probe()
|