Changeset 1090
- Timestamp:
- 05/15/01 05:18:18 (8 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (2 diffs)
- lm-sensors/trunk/CONTRIBUTORS (modified) (1 diff)
- lm-sensors/trunk/README (modified) (1 diff)
- lm-sensors/trunk/doc/chips/adm1024 (added)
- lm-sensors/trunk/etc/sensors.conf.eg (modified) (1 diff)
- lm-sensors/trunk/kernel/chips/Module.mk (modified) (1 diff)
- lm-sensors/trunk/kernel/chips/adm1024.c (added)
- lm-sensors/trunk/kernel/include/sensors.h (modified) (1 diff)
- lm-sensors/trunk/lib/chips.c (modified) (2 diffs)
- lm-sensors/trunk/lib/chips.h (modified) (1 diff)
- lm-sensors/trunk/prog/detect/sensors-detect (modified) (3 diffs)
- lm-sensors/trunk/prog/sensors/chips.c (modified) (1 diff)
- lm-sensors/trunk/prog/sensors/chips.h (modified) (1 diff)
- lm-sensors/trunk/prog/sensors/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r1089 r1090 34 34 Include file sensors.h: Most contents moved to i2c-proc.h in i2c package 35 35 Library: Fix/standardize some lm87 and mtp008 entries; add sis5595 in4; 36 Add support for maxilife-nba .36 Add support for maxilife-nba and amd1024. 37 37 Chip Modules (all ISA): Remove #include "i2c-isa.h" 38 38 Module adm1021: Fix lm84 and gl523sm support 39 Module adm1024: new 39 40 Module i2c-i801: Chip detection cleanup 40 41 Module i2c-i810: Fixed i2c_i810_init() not found in patched kernel … … 61 62 Fix swapped limit and hysteresis on 9240, 5595, 686a; 62 63 Change mtp008 temps from max/min to limit/hyst; 63 Add maxilife-nba support.64 Add maxilife-nba and adm1024 support. 64 65 Program sensors-detect: Recognize lm78 with chipid=0x20; 65 66 Recognize SMSC Victory66 South Bridge; 66 67 Add devfs /dev/i2c/x support; 67 Add thinkpad warning.68 Add adm1024 support; Add thinkpad warning. 68 69 Program tellerstats: new 69 70 lm-sensors/trunk/CONTRIBUTORS
r909 r1090 57 57 * Kris Van Hees <aedil@alchar.org> 58 58 Author of the mtp008 chip driver. 59 * Ken Bowley <ken@opnix.com> 60 Author of the adm1024 driver lm-sensors/trunk/README
r1082 r1090 47 47 At least the following hardware sensor chips are supported: 48 48 Analog Devices ADM1021, ADM1021A, ADM1022, 49 ADM1023, ADM102 5, and ADM924049 ADM1023, ADM1024, ADM1025, and ADM9240 50 50 Asus AS99127F 51 51 Dallas Semiconductor DS75, DS1621, DS1625, DS1775, and DS1780 lm-sensors/trunk/etc/sensors.conf.eg
r1072 r1090 925 925 # compute Vccp2 xxx 926 926 # compute temp xxx 927 928 chip "adm1024-*" 929 # 930 # These settings work for me, adjust for your system 931 # 932 label fan1 "CPU1 fan" 933 label fan2 "CPU2 fan" 934 label temp "SYS Temp" 935 label temp1 "CPU2 Temp" 936 label temp2 "CPU1 Temp" 937 ignore "2.5V" # This register is also used for temp2 938 ignore "Vccp1" 939 ignore "Vccp2" lm-sensors/trunk/kernel/chips/Module.mk
r935 r1090 30 30 $(MODULE_DIR)/ddcmon.o \ 31 31 $(MODULE_DIR)/adm1025.o \ 32 $(MODULE_DIR)/adm1024.o \ 32 33 $(MODULE_DIR)/lm87.o \ 33 34 $(MODULE_DIR)/mtp008.o lm-sensors/trunk/kernel/include/sensors.h
r1065 r1090 210 210 #define ADM9240_ALARM_CHAS 0x1000 211 211 212 #define ADM1024_SYSCTL_IN0 1000 /* Volts * 100 */ 213 #define ADM1024_SYSCTL_IN1 1001 214 #define ADM1024_SYSCTL_IN2 1002 215 #define ADM1024_SYSCTL_IN3 1003 216 #define ADM1024_SYSCTL_IN4 1004 217 #define ADM1024_SYSCTL_IN5 1005 218 #define ADM1024_SYSCTL_FAN1 1101 /* Rotations/min */ 219 #define ADM1024_SYSCTL_FAN2 1102 220 #define ADM1024_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ 221 #define ADM1024_SYSCTL_TEMP1 1290 /* Degrees Celcius */ 222 #define ADM1024_SYSCTL_TEMP2 1295 /* Degrees Celcius */ 223 #define ADM1024_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ 224 #define ADM1024_SYSCTL_ALARMS 2001 /* bitvector */ 225 #define ADM1024_SYSCTL_ANALOG_OUT 2002 226 #define ADM1024_SYSCTL_VID 2003 227 228 #define ADM1024_ALARM_IN0 0x0001 229 #define ADM1024_ALARM_IN1 0x0002 230 #define ADM1024_ALARM_IN2 0x0004 231 #define ADM1024_ALARM_IN3 0x0008 232 #define ADM1024_ALARM_IN4 0x0100 233 #define ADM1024_ALARM_IN5 0x0200 234 #define ADM1024_ALARM_FAN1 0x0040 235 #define ADM1024_ALARM_FAN2 0x0080 236 #define ADM1024_ALARM_TEMP 0x0010 237 #define ADM1024_ALARM_TEMP1 0x0020 238 #define ADM1024_ALARM_TEMP2 0x0001 239 #define ADM1024_ALARM_CHAS 0x1000 240 212 241 #define ADM1025_SYSCTL_IN0 1000 /* Volts * 100 */ 213 242 #define ADM1025_SYSCTL_IN1 1001 lm-sensors/trunk/lib/chips.c
r1089 r1090 1100 1100 }; 1101 1101 1102 static sensors_chip_feature adm1024_features[] = 1103 { 1104 { SENSORS_ADM1024_IN0, "2.5V", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1105 SENSORS_MODE_R, ADM1024_SYSCTL_IN0, VALUE(3), 2 }, 1106 { SENSORS_ADM1024_IN1, "Vccp1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1107 SENSORS_MODE_R, ADM1024_SYSCTL_IN1, VALUE(3), 2 }, 1108 { SENSORS_ADM1024_IN2, "3.3V", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1109 SENSORS_MODE_R, ADM1024_SYSCTL_IN2, VALUE(3), 2 }, 1110 { SENSORS_ADM1024_IN3, "5V", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1111 SENSORS_MODE_R, ADM1024_SYSCTL_IN3, VALUE(3), 2 }, 1112 { SENSORS_ADM1024_IN4, "12V", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1113 SENSORS_MODE_R, ADM1024_SYSCTL_IN4, VALUE(3), 2 }, 1114 { SENSORS_ADM1024_IN5, "Vccp2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1115 SENSORS_MODE_R, ADM1024_SYSCTL_IN5, VALUE(3), 2 }, 1116 { SENSORS_ADM1024_IN0_MIN, "2.5V_min", SENSORS_ADM1024_IN0, 1117 SENSORS_ADM1024_IN0, SENSORS_MODE_RW, 1118 ADM1024_SYSCTL_IN0, VALUE(1), 2 }, 1119 { SENSORS_ADM1024_IN1_MIN, "Vccp1_min", SENSORS_ADM1024_IN1, 1120 SENSORS_ADM1024_IN1, SENSORS_MODE_RW, 1121 ADM1024_SYSCTL_IN1, VALUE(1), 2 }, 1122 { SENSORS_ADM1024_IN2_MIN, "3.3V_min", SENSORS_ADM1024_IN2, 1123 SENSORS_ADM1024_IN2, SENSORS_MODE_RW, 1124 ADM1024_SYSCTL_IN2, VALUE(1), 2 }, 1125 { SENSORS_ADM1024_IN3_MIN, "5V_min", SENSORS_ADM1024_IN3, 1126 SENSORS_ADM1024_IN3, SENSORS_MODE_RW, 1127 ADM1024_SYSCTL_IN3, VALUE(1), 2 }, 1128 { SENSORS_ADM1024_IN4_MIN, "12V_min", SENSORS_ADM1024_IN4, 1129 SENSORS_ADM1024_IN4, SENSORS_MODE_RW, 1130 ADM1024_SYSCTL_IN4, VALUE(1), 2 }, 1131 { SENSORS_ADM1024_IN5_MIN, "Vccp2_min", SENSORS_ADM1024_IN5, 1132 SENSORS_ADM1024_IN5, SENSORS_MODE_RW, 1133 ADM1024_SYSCTL_IN5, VALUE(1), 2 }, 1134 { SENSORS_ADM1024_IN0_MAX, "2.5V_max", SENSORS_ADM1024_IN0, 1135 SENSORS_ADM1024_IN0, SENSORS_MODE_RW, 1136 ADM1024_SYSCTL_IN0, VALUE(2), 2 }, 1137 { SENSORS_ADM1024_IN1_MAX, "Vccp1_max", SENSORS_ADM1024_IN1, 1138 SENSORS_ADM1024_IN1, SENSORS_MODE_RW, 1139 ADM1024_SYSCTL_IN1, VALUE(2), 2 }, 1140 { SENSORS_ADM1024_IN2_MAX, "3.3V_max", SENSORS_ADM1024_IN2, 1141 SENSORS_ADM1024_IN2, SENSORS_MODE_RW, 1142 ADM1024_SYSCTL_IN2, VALUE(2), 2 }, 1143 { SENSORS_ADM1024_IN3_MAX, "5V_max", SENSORS_ADM1024_IN3, 1144 SENSORS_ADM1024_IN3, SENSORS_MODE_RW, 1145 ADM1024_SYSCTL_IN3, VALUE(2), 2 }, 1146 { SENSORS_ADM1024_IN4_MAX, "12V_max", SENSORS_ADM1024_IN4, 1147 SENSORS_ADM1024_IN4, SENSORS_MODE_RW, 1148 ADM1024_SYSCTL_IN4, VALUE(2), 2 }, 1149 { SENSORS_ADM1024_IN5_MAX, "Vccp2_max", SENSORS_ADM1024_IN5, 1150 SENSORS_ADM1024_IN5, SENSORS_MODE_RW, 1151 ADM1024_SYSCTL_IN5, VALUE(2), 2 }, 1152 { SENSORS_ADM1024_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1153 SENSORS_MODE_R, ADM1024_SYSCTL_FAN1, VALUE(2), 0 }, 1154 { SENSORS_ADM1024_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1155 SENSORS_MODE_R, ADM1024_SYSCTL_FAN2, VALUE(2), 0 }, 1156 { SENSORS_ADM1024_FAN1_MIN, "fan1_min", SENSORS_ADM1024_FAN1, 1157 SENSORS_ADM1024_FAN1, SENSORS_MODE_RW, 1158 ADM1024_SYSCTL_FAN1, VALUE(1), 0 }, 1159 { SENSORS_ADM1024_FAN2_MIN, "fan2_min", SENSORS_ADM1024_FAN2, 1160 SENSORS_ADM1024_FAN2, SENSORS_MODE_RW, 1161 ADM1024_SYSCTL_FAN2, VALUE(1), 0 }, 1162 { SENSORS_ADM1024_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1163 SENSORS_MODE_R, ADM1024_SYSCTL_TEMP, VALUE(3), 1 }, 1164 { SENSORS_ADM1024_TEMP1, "temp1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1165 SENSORS_MODE_R, ADM1024_SYSCTL_TEMP1, VALUE(3), 1 }, 1166 { SENSORS_ADM1024_TEMP2, "temp2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1167 SENSORS_MODE_R, ADM1024_SYSCTL_TEMP2, VALUE(3), 1 }, 1168 { SENSORS_ADM1024_TEMP_HYST, "temp_hyst", SENSORS_ADM1024_TEMP, 1169 SENSORS_ADM1024_TEMP, SENSORS_MODE_RW, 1170 ADM1024_SYSCTL_TEMP, VALUE(2), 1 }, 1171 { SENSORS_ADM1024_TEMP_OVER, "temp_over", SENSORS_ADM1024_TEMP, 1172 SENSORS_ADM1024_TEMP, SENSORS_MODE_RW, 1173 ADM1024_SYSCTL_TEMP, VALUE(1), 1 }, 1174 { SENSORS_ADM1024_TEMP1_HYST, "temp1_hyst", SENSORS_ADM1024_TEMP1, 1175 SENSORS_ADM1024_TEMP1, SENSORS_MODE_RW, 1176 ADM1024_SYSCTL_TEMP1, VALUE(2), 1 }, 1177 { SENSORS_ADM1024_TEMP1_OVER, "temp1_over", SENSORS_ADM1024_TEMP1, 1178 SENSORS_ADM1024_TEMP1, SENSORS_MODE_RW, 1179 ADM1024_SYSCTL_TEMP1, VALUE(1), 1 }, 1180 { SENSORS_ADM1024_TEMP2_HYST, "temp2_hyst", SENSORS_ADM1024_TEMP2, 1181 SENSORS_ADM1024_TEMP2, SENSORS_MODE_RW, 1182 ADM1024_SYSCTL_TEMP2, VALUE(2), 1 }, 1183 { SENSORS_ADM1024_TEMP2_OVER, "temp2_over", SENSORS_ADM1024_TEMP2, 1184 SENSORS_ADM1024_TEMP2, SENSORS_MODE_RW, 1185 ADM1024_SYSCTL_TEMP2, VALUE(1), 1 }, 1186 1187 { SENSORS_ADM1024_VID, "vid", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1188 SENSORS_MODE_R, ADM1024_SYSCTL_VID, VALUE(1), 2 }, 1189 { SENSORS_ADM1024_FAN1_DIV, "fan1_div", SENSORS_ADM1024_FAN1, 1190 SENSORS_NO_MAPPING, SENSORS_MODE_RW, 1191 ADM1024_SYSCTL_FAN_DIV, VALUE(1), 0 }, 1192 { SENSORS_ADM1024_FAN2_DIV, "fan2_div", SENSORS_ADM1024_FAN2, 1193 SENSORS_NO_MAPPING, SENSORS_MODE_RW, 1194 ADM1024_SYSCTL_FAN_DIV, VALUE(2), 0 }, 1195 { SENSORS_ADM1024_ALARMS, "alarms", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 1196 SENSORS_MODE_R, ADM1024_SYSCTL_ALARMS, VALUE(1), 0 }, 1197 { SENSORS_ADM1024_ANALOG_OUT, "analog_out", SENSORS_NO_MAPPING, 1198 SENSORS_NO_MAPPING, SENSORS_MODE_RW, 1199 ADM1024_SYSCTL_ANALOG_OUT, VALUE(1), 0 }, 1200 { 0 } 1201 }; 1202 1102 1203 static sensors_chip_feature ds1780_features[] = 1103 1204 { … … 2073 2174 { SENSORS_MTP008_PREFIX, mtp008_features }, 2074 2175 { SENSORS_DS1621_PREFIX, ds1621_features }, 2176 { SENSORS_ADM1024_PREFIX, adm1024_features }, 2075 2177 { 0 } 2076 2178 }; lm-sensors/trunk/lib/chips.h
r1089 r1090 926 926 #define SENSORS_DS1621_ALARMS 81 /* R */ 927 927 928 /* ADM1024 chip */ 929 930 #define SENSORS_ADM1024_PREFIX "adm1024" 931 932 #define SENSORS_ADM1024_IN0 1 /* R */ 933 #define SENSORS_ADM1024_IN1 2 /* R */ 934 #define SENSORS_ADM1024_IN2 3 /* R */ 935 #define SENSORS_ADM1024_IN3 4 /* R */ 936 #define SENSORS_ADM1024_IN4 5 /* R */ 937 #define SENSORS_ADM1024_IN5 6 /* R */ 938 #define SENSORS_ADM1024_IN0_MIN 11 /* RW */ 939 #define SENSORS_ADM1024_IN1_MIN 12 /* RW */ 940 #define SENSORS_ADM1024_IN2_MIN 13 /* RW */ 941 #define SENSORS_ADM1024_IN3_MIN 14 /* RW */ 942 #define SENSORS_ADM1024_IN4_MIN 15 /* RW */ 943 #define SENSORS_ADM1024_IN5_MIN 16 /* RW */ 944 #define SENSORS_ADM1024_IN0_MAX 21 /* RW */ 945 #define SENSORS_ADM1024_IN1_MAX 22 /* RW */ 946 #define SENSORS_ADM1024_IN2_MAX 23 /* RW */ 947 #define SENSORS_ADM1024_IN3_MAX 24 /* RW */ 948 #define SENSORS_ADM1024_IN4_MAX 25 /* RW */ 949 #define SENSORS_ADM1024_IN5_MAX 26 /* RW */ 950 #define SENSORS_ADM1024_FAN1 31 /* R */ 951 #define SENSORS_ADM1024_FAN2 32 /* R */ 952 #define SENSORS_ADM1024_FAN1_MIN 41 /* RW */ 953 #define SENSORS_ADM1024_FAN2_MIN 42 /* RW */ 954 #define SENSORS_ADM1024_TEMP 51 /* R */ 955 #define SENSORS_ADM1024_TEMP1 52 /* R */ 956 #define SENSORS_ADM1024_TEMP2 53 /* R */ 957 #define SENSORS_ADM1024_TEMP_HYST 61 /* RW */ 958 #define SENSORS_ADM1024_TEMP_OVER 62 /* RW */ 959 #define SENSORS_ADM1024_TEMP1_HYST 63 /* RW */ 960 #define SENSORS_ADM1024_TEMP1_OVER 64 /* RW */ 961 #define SENSORS_ADM1024_TEMP2_HYST 65 /* RW */ 962 #define SENSORS_ADM1024_TEMP2_OVER 66 /* RW */ 963 #define SENSORS_ADM1024_VID 71 /* R */ 964 #define SENSORS_ADM1024_FAN1_DIV 81 /* RW */ 965 #define SENSORS_ADM1024_FAN2_DIV 82 /* RW */ 966 #define SENSORS_ADM1024_ALARMS 91 /* R */ 967 #define SENSORS_ADM1024_ANALOG_OUT 92 /* RW */ 968 928 969 #endif /* def LIB_SENSORS_CHIPS_H */ lm-sensors/trunk/prog/detect/sensors-detect
r1069 r1090 377 377 via686a_isa_detect adm1022_detect ltc1710_detect gl525sm_detect 378 378 lm87_detect ite_detect ite_isa_detect ite_alias_detect 379 ddcmonitor_detect ds1621_detect );379 ddcmonitor_detect ds1621_detect adm1024_detect); 380 380 381 381 # This is a list of all recognized chips. … … 560 560 i2c_addrs => [0x2c..0x2e], 561 561 i2c_detect => sub { adm1025_detect 0, @_ } 562 }, 563 { 564 name => "Analog Devices ADM1024", 565 driver => "adm1024", 566 i2c_addrs => [0x2c..0x2e], 567 i2c_detect => sub { adm1024_detect 0, @_ } 562 568 }, 563 569 { … … 1866 1872 } 1867 1873 1874 # $_[0]: Chip to detect (0 = ADM1024) 1875 # $_[1]: A reference to the file descriptor to access this chip. 1876 # We may assume an i2c_set_slave_addr was already done. 1877 # $_[2]: Address 1878 # Returns: undef if not detected, (8) if detected. 1879 # Registers used: 1880 # 0x3e: Company ID 1881 # 0x3f: Revision 1882 # 0x40: Configuration 1883 sub adm1024_detect 1884 { 1885 my $reg; 1886 my ($chip, $file,$addr) = @_; 1887 $reg = i2c_smbus_read_byte_data($file,0x3e); 1888 return unless ($reg == 0x41); 1889 return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00; 1890 return unless (i2c_smbus_read_byte_data($file,0x3f) & 0xe0) == 0x20; 1891 return (8); 1892 } 1893 1868 1894 # $_[0]: Chip to detect 1869 1895 # (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84, 5 = GL523) lm-sensors/trunk/prog/sensors/chips.c
r1032 r1090 388 388 printf("Chassis intrusion detection %s\n", 389 389 alarms & ADM9240_ALARM_CHAS?"ALARM":" "); 390 } 391 } 392 free_the_label(&label); 393 } 394 395 void print_adm1024(const sensors_chip_name *name) 396 { 397 char *label = NULL; 398 double cur,min,max,fdiv; 399 int alarms; 400 int valid; 401 402 if (!sensors_get_feature(*name,SENSORS_ADM1024_ALARMS,&cur)) 403 alarms = cur + 0.5; 404 else { 405 printf("ERROR: Can't get alarm data!\n"); 406 alarms = 0; 407 } 408 409 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN0,&label,&valid) && 410 !sensors_get_feature(*name,SENSORS_ADM1024_IN0,&cur) && 411 !sensors_get_feature(*name,SENSORS_ADM1024_IN0_MIN,&min) && 412 !sensors_get_feature(*name,SENSORS_ADM1024_IN0_MAX,&max)) { 413 if (valid) { 414 print_label(label,10); 415 printf( "%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n", 416 cur,min,max,alarms&ADM1024_ALARM_IN0?"ALARM":""); 417 } 418 } else 419 printf("ERROR: Can't get IN0 data!\n"); 420 free_the_label(&label); 421 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN1,&label,&valid) && 422 !sensors_get_feature(*name,SENSORS_ADM1024_IN1,&cur) && 423 !sensors_get_feature(*name,SENSORS_ADM1024_IN1_MIN,&min) && 424 !sensors_get_feature(*name,SENSORS_ADM1024_IN1_MAX,&max)) { 425 if (valid) { 426 print_label(label,10); 427 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n", 428 cur,min,max,alarms&ADM1024_ALARM_IN1?"ALARM":""); 429 } 430 } else 431 printf("ERROR: Can't get IN1 data!\n"); 432 free_the_label(&label); 433 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN2,&label,&valid) && 434 !sensors_get_feature(*name,SENSORS_ADM1024_IN2,&cur) && 435 !sensors_get_feature(*name,SENSORS_ADM1024_IN2_MIN,&min) && 436 !sensors_get_feature(*name,SENSORS_ADM1024_IN2_MAX,&max)) { 437 if (valid) { 438 print_label(label,10); 439 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n", 440 cur,min,max,alarms&ADM1024_ALARM_IN2?"ALARM":""); 441 } 442 } else 443 printf("ERROR: Can't get IN2 data!\n"); 444 free_the_label(&label); 445 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN3,&label,&valid) && 446 !sensors_get_feature(*name,SENSORS_ADM1024_IN3,&cur) && 447 !sensors_get_feature(*name,SENSORS_ADM1024_IN3_MIN,&min) && 448 !sensors_get_feature(*name,SENSORS_ADM1024_IN3_MAX,&max)) { 449 if (valid) { 450 print_label(label,10); 451 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n", 452 cur,min,max,alarms&ADM1024_ALARM_IN3?"ALARM":""); 453 } 454 } else 455 printf("ERROR: Can't get IN3 data!\n"); 456 free_the_label(&label); 457 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN4,&label,&valid) && 458 !sensors_get_feature(*name,SENSORS_ADM1024_IN4,&cur) && 459 !sensors_get_feature(*name,SENSORS_ADM1024_IN4_MIN,&min) && 460 !sensors_get_feature(*name,SENSORS_ADM1024_IN4_MAX,&max)) { 461 if (valid) { 462 print_label(label,10); 463 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n", 464 cur,min,max,alarms&ADM1024_ALARM_IN4?"ALARM":""); 465 } 466 } else 467 printf("ERROR: Can't get IN4 data!\n"); 468 free_the_label(&label); 469 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN5,&label,&valid) && 470 !sensors_get_feature(*name,SENSORS_ADM1024_IN5,&cur) && 471 !sensors_get_feature(*name,SENSORS_ADM1024_IN5_MIN,&min) && 472 !sensors_get_feature(*name,SENSORS_ADM1024_IN5_MAX,&max)) { 473 if (valid) { 474 print_label(label,10); 475 printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n", 476 cur,min,max,alarms&ADM1024_ALARM_IN5?"ALARM":""); 477 } 478 } else 479 printf("ERROR: Can't get IN5 data!\n"); 480 free_the_label(&label); 481 482 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_FAN1,&label,&valid) && 483 !sensors_get_feature(*name,SENSORS_ADM1024_FAN1,&cur) && 484 !sensors_get_feature(*name,SENSORS_ADM1024_FAN1_DIV,&fdiv) && 485 !sensors_get_feature(*name,SENSORS_ADM1024_FAN1_MIN,&min)) { 486 if (valid) { 487 print_label(label,10); 488 printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n", 489 cur,min,fdiv, alarms&ADM1024_ALARM_FAN1?"ALARM":""); 490 } 491 } else 492 printf("ERROR: Can't get FAN1 data!\n"); 493 free_the_label(&label); 494 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_FAN2,&label,&valid) && 495 !sensors_get_feature(*name,SENSORS_ADM1024_FAN2,&cur) && 496 !sensors_get_feature(*name,SENSORS_ADM1024_FAN2_DIV,&fdiv) && 497 !sensors_get_feature(*name,SENSORS_ADM1024_FAN2_MIN,&min)) { 498 if (valid) { 499 print_label(label,10); 500 printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n", 501 cur,min,fdiv, alarms&ADM1024_ALARM_FAN2?"ALARM":""); 502 } 503 } else 504 printf("ERROR: Can't get FAN2 data!\n"); 505 free_the_label(&label); 506 507 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_TEMP,&label,&valid) && 508 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP,&cur) && 509 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP_HYST,&min) && 510 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP_OVER,&max)) { 511 if (valid) { 512 print_label(label,10); 513 print_temp_info( cur, min, max, HYST ); 514 printf( " %s\n", alarms & ADM1024_ALARM_TEMP ? "ALARM" : "" ); 515 } 516 } else 517 printf("ERROR: Can't get TEMP data!\n"); 518 free_the_label(&label); 519 520 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_TEMP1,&label,&valid) && 521 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP1,&cur) && 522 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP1_HYST,&min) && 523 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP1_OVER,&max)) { 524 if (valid) { 525 print_label(label,10); 526 print_temp_info( cur, min, max, HYST ); 527 printf( " %s\n", alarms & ADM1024_ALARM_TEMP1 ? "ALARM" : "" ); 528 } 529 } else 530 printf("ERROR: Can't get TEMP1 data!\n"); 531 free_the_label(&label); 532 533 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_TEMP2,&label,&valid) && 534 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP2,&cur) && 535 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP2_HYST,&min) && 536 !sensors_get_feature(*name,SENSORS_ADM1024_TEMP2_OVER,&max)) { 537 if (valid) { 538 print_label(label,10); 539 print_temp_info( cur, min, max, HYST ); 540 printf( " %s\n", alarms & ADM1024_ALARM_TEMP2 ? "ALARM" : "" ); 541 } 542 } else 543 printf("ERROR: Can't get TEMP2 data!\n"); 544 free_the_label(&label); 545 546 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_VID,&label,&valid) && 547 !sensors_get_feature(*name,SENSORS_ADM1024_VID,&cur)) { 548 if (valid) { 549 print_label(label,10); 550 printf("%+5.2f V\n",cur); 551 } 552 } 553 free_the_label(&label); 554 555 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_ALARMS,&label,&valid)) { 556 if (valid) { 557 print_label(label,10); 558 printf("Chassis intrusion detection %s\n", 559 alarms & ADM1024_ALARM_CHAS?"ALARM":" "); 390 560 } 391 561 } lm-sensors/trunk/prog/sensors/chips.h
r1084 r1090 30 30 extern void print_adm1021(const sensors_chip_name *name); 31 31 extern void print_adm1025(const sensors_chip_name *name); 32 extern void print_adm1024(const sensors_chip_name *name); 32 33 extern void print_adm9240(const sensors_chip_name *name); 33 34 extern void print_lm78(const sensors_chip_name *name); lm-sensors/trunk/prog/sensors/main.c
r1088 r1090 311 311 else if (!strcmp(name.prefix,"adm1025")) 312 312 print_adm1025(&name); 313 else if (!strcmp(name.prefix,"adm1024")) 314 print_adm1024(&name); 313 315 else if ((!strcmp(name.prefix,"w83781d")) || 314 316 (!strcmp(name.prefix,"w83782d")) ||
