Changeset 313
- Timestamp:
- 03/14/99 05:09:35 (14 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
kernel/chips/w83781d.c (modified) (7 diffs)
-
prog/sensors/chips.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/chips/w83781d.c
r309 r313 26 26 Chip #vin #fanin #pwm #temp wchipid i2c ISA 27 27 w83781d 7 3 0 3 0x10 yes yes 28 w83782d 9 2-3 2-4 3 0x30 yes yes28 w83782d 9 3 2-4 3 0x30 yes yes 29 29 w83783s 5-6 3 2 1-2 0x40 yes no 30 30 31 To do: PWM enable, clock, duty cycle 32 782d beep 3 register 33 782d programmable pins 34 783s pin programmable for vin or temp. assume both now! no way to set. 31 To do: 32 782d/783s PWM enable, clock select, duty cycle 33 782d beep 3 register 34 782d programmable pins 35 783s pin is programmable for -5V or temp1; defaults to -5V, 36 no control in driver so temp1 doesn't work. 37 783s temp2 (labeled as temp1 in data sheet) at different location 38 than 781d/782d, not implemented yet. 35 39 */ 36 40 … … 411 415 { W83781D_SYSCTL_FAN2, "fan2", NULL, 0, 0644, NULL, &sensors_proc_real, 412 416 &sensors_sysctl_real, NULL, &w83781d_fan }, 417 { W83781D_SYSCTL_FAN3, "fan3", NULL, 0, 0644, NULL, &sensors_proc_real, 418 &sensors_sysctl_real, NULL, &w83781d_fan }, 413 419 { W83781D_SYSCTL_TEMP1, "temp1", NULL, 0, 0644, NULL, &sensors_proc_real, 414 420 &sensors_sysctl_real, NULL, &w83781d_temp }, … … 431 437 { W83781D_SYSCTL_IN0, "in0", NULL, 0, 0644, NULL, &sensors_proc_real, 432 438 &sensors_sysctl_real, NULL, &w83781d_in }, 433 { W83781D_SYSCTL_IN1, "in1", NULL, 0, 0644, NULL, &sensors_proc_real, 434 &sensors_sysctl_real, NULL, &w83781d_in }, 439 /* no in1 to maintain compatibility with 781d and 782d. */ 435 440 { W83781D_SYSCTL_IN2, "in2", NULL, 0, 0644, NULL, &sensors_proc_real, 436 441 &sensors_sysctl_real, NULL, &w83781d_in }, … … 440 445 &sensors_sysctl_real, NULL, &w83781d_in }, 441 446 { W83781D_SYSCTL_IN5, "in5", NULL, 0, 0644, NULL, &sensors_proc_real, 447 &sensors_sysctl_real, NULL, &w83781d_in }, 448 { W83781D_SYSCTL_IN6, "in6", NULL, 0, 0644, NULL, &sensors_proc_real, 442 449 &sensors_sysctl_real, NULL, &w83781d_in }, 443 450 { W83781D_SYSCTL_FAN1, "fan1", NULL, 0, 0644, NULL, &sensors_proc_real, … … 971 978 w83781d_write_value(client,W83781D_REG_FAN_MIN(2), 972 979 FAN_TO_REG(W83781D_INIT_FAN_MIN_2,2)); 973 if(wchipid != W83782D_WCHIPID) { 974 w83781d_write_value(client,W83781D_REG_FAN_MIN(3), 975 FAN_TO_REG(W83781D_INIT_FAN_MIN_3,2)); 976 } 980 w83781d_write_value(client,W83781D_REG_FAN_MIN(3), 981 FAN_TO_REG(W83781D_INIT_FAN_MIN_3,2)); 977 982 978 983 w83781d_write_value(client,W83781D_REG_TEMP_OVER, … … 1016 1021 #endif 1017 1022 for (i = 0; i <= 8; i++) { 1023 if(data->wchipid == W83783S_WCHIPID && i == 1) 1024 continue; /* 783S has no in1 */ 1018 1025 data->in[i] = w83781d_read_value(client,W83781D_REG_IN(i)); 1019 1026 data->in_min[i] = w83781d_read_value(client,W83781D_REG_IN_MIN(i)); 1020 1027 data->in_max[i] = w83781d_read_value(client,W83781D_REG_IN_MAX(i)); 1021 if((data->wchipid == W83783S_WCHIPID && i == 5) || 1022 (data->wchipid == W83781D_WCHIPID && i == 6)) 1028 if(data->wchipid != W83782D_WCHIPID && i == 6) 1023 1029 break; 1024 1030 } … … 1026 1032 data->fan[i-1] = w83781d_read_value(client,W83781D_REG_FAN(i)); 1027 1033 data->fan_min[i-1] = w83781d_read_value(client,W83781D_REG_FAN_MIN(i)); 1028 if(data->wchipid == W83783S_WCHIPID && i == 2)1029 break;1030 1034 } 1031 1035 data->temp = w83781d_read_value(client,W83781D_REG_TEMP); -
lm-sensors/trunk/prog/sensors/chips.c
r311 r313 562 562 printf("ERROR: Can't get IN0 data!\n"); 563 563 free_the_label(&label); 564 if (!sensors_get_label(*name,SENSORS_W83781D_IN1,&label) && 565 !sensors_get_feature(*name,SENSORS_W83781D_IN1,&cur) && 566 !sensors_get_feature(*name,SENSORS_W83781D_IN1_MIN,&min) && 567 !sensors_get_feature(*name,SENSORS_W83781D_IN1_MAX,&max)) { 568 print_label(label,10); 569 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", 570 cur,min,max,alarms&W83781D_ALARM_IN1?"ALARM":" ", 571 beeps&W83781D_ALARM_IN1?"(beep)":""); 572 } else 573 printf("ERROR: Can't get IN1 data!\n"); 574 free_the_label(&label); 564 if (!is83s) { 565 if (!sensors_get_label(*name,SENSORS_W83781D_IN1,&label) && 566 !sensors_get_feature(*name,SENSORS_W83781D_IN1,&cur) && 567 !sensors_get_feature(*name,SENSORS_W83781D_IN1_MIN,&min) && 568 !sensors_get_feature(*name,SENSORS_W83781D_IN1_MAX,&max)) { 569 print_label(label,10); 570 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", 571 cur,min,max,alarms&W83781D_ALARM_IN1?"ALARM":" ", 572 beeps&W83781D_ALARM_IN1?"(beep)":""); 573 } else 574 printf("ERROR: Can't get IN1 data!\n"); 575 free_the_label(&label); 576 } 575 577 if (!sensors_get_label(*name,SENSORS_W83781D_IN2,&label) && 576 578 !sensors_get_feature(*name,SENSORS_W83781D_IN2,&cur) && … … 677 679 printf("ERROR: Can't get FAN2 data!\n"); 678 680 free_the_label(&label); 679 if (!is82d) { 680 if (!sensors_get_label(*name,SENSORS_W83781D_FAN3,&label) && 681 !sensors_get_feature(*name,SENSORS_W83781D_FAN3,&cur) && 682 !sensors_get_feature(*name,SENSORS_W83781D_FAN3_DIV,&fdiv) && 683 !sensors_get_feature(*name,SENSORS_W83781D_FAN3_MIN,&min)) { 684 print_label(label,10); 685 printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n", 686 cur,min,fdiv, alarms&W83781D_ALARM_FAN3?"ALARM":" ", 687 beeps&W83781D_ALARM_FAN3?"(beep)":""); 688 } else 689 printf("ERROR: Can't get FAN3 data!\n"); 690 } 681 if (!sensors_get_label(*name,SENSORS_W83781D_FAN3,&label) && 682 !sensors_get_feature(*name,SENSORS_W83781D_FAN3,&cur) && 683 !sensors_get_feature(*name,SENSORS_W83781D_FAN3_DIV,&fdiv) && 684 !sensors_get_feature(*name,SENSORS_W83781D_FAN3_MIN,&min)) { 685 print_label(label,10); 686 printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n", 687 cur,min,fdiv, alarms&W83781D_ALARM_FAN3?"ALARM":" ", 688 beeps&W83781D_ALARM_FAN3?"(beep)":""); 689 } else 690 printf("ERROR: Can't get FAN3 data!\n"); 691 691 free_the_label(&label); 692 692
