Changeset 4270
- Timestamp:
- 12/22/06 22:11:07 (2 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (2 diffs)
- lm-sensors/trunk/lib/chips.c (modified) (2 diffs)
- lm-sensors/trunk/lib/chips.h (modified) (1 diff)
- 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
r4269 r4270 14 14 Add w83627dhg support (David Holl, #2157) 15 15 Get the i2c adapter names from classdev.name 16 Add adm1029 support (Corentin Labbe) 16 17 Man page i2cdetect.8: Describe the output convention 17 18 Man page sensors.1: Update (option -c) and clean up … … 32 33 Add f71872f support 33 34 Add w83627dhg support (David Holl, #2157) 35 Add adm1029 support (Corentin Labbe) 34 36 Program sensors-detect: Add SMSC DME1737 detection 35 37 Add Fintek F71882FG and EPoX EP1308 detection lm-sensors/trunk/lib/chips.c
r4264 r4270 360 360 ADM1021_SYSCTL_ALARMS, VALUE(1), 0 }, 361 361 { 0 } 362 }; 363 364 365 static sensors_chip_feature adm1029_features[] = 366 { 367 { SENSORS_ADM1029_TEMP1, "temp1", 368 NOMAP, NOMAP, 369 R, NOSYSCTL, VALUE(3), 3 }, 370 { SENSORS_ADM1029_TEMP1_MAX, "temp1_max", 371 SENSORS_ADM1029_TEMP1, 372 SENSORS_ADM1029_TEMP1, 373 RW, NOSYSCTL, VALUE(1), 3 }, 374 { SENSORS_ADM1029_TEMP1_MIN, "temp1_min", 375 SENSORS_ADM1029_TEMP1, 376 SENSORS_ADM1029_TEMP1, 377 RW, NOSYSCTL, VALUE(2), 3 }, 378 379 { SENSORS_ADM1029_TEMP2, "temp2", 380 NOMAP, NOMAP, 381 R, NOSYSCTL, VALUE(3), 3 }, 382 { SENSORS_ADM1029_TEMP2_MAX, "temp2_max", 383 SENSORS_ADM1029_TEMP2, 384 SENSORS_ADM1029_TEMP2, 385 RW, NOSYSCTL, VALUE(1), 3 }, 386 { SENSORS_ADM1029_TEMP2_MIN, "temp2_min", 387 SENSORS_ADM1029_TEMP2, 388 SENSORS_ADM1029_TEMP2, 389 RW, NOSYSCTL, VALUE(2), 3 }, 390 391 { SENSORS_ADM1029_TEMP3, "temp3", 392 NOMAP, NOMAP, 393 R, NOSYSCTL, VALUE(3), 3 }, 394 { SENSORS_ADM1029_TEMP3_MAX, "temp3_max", 395 SENSORS_ADM1029_TEMP3, 396 SENSORS_ADM1029_TEMP3, 397 RW, NOSYSCTL, VALUE(1), 3 }, 398 { SENSORS_ADM1029_TEMP3_MIN, "temp3_min", 399 SENSORS_ADM1029_TEMP3, 400 SENSORS_ADM1029_TEMP3, 401 RW, NOSYSCTL, VALUE(2), 3 }, 402 403 { SENSORS_ADM1029_FAN1, "fan1", 404 NOMAP, NOMAP, 405 R, NOSYSCTL, VALUE(2), 0 }, 406 { SENSORS_ADM1029_FAN1_MIN, "fan1_min", 407 SENSORS_ADM1029_FAN1, 408 SENSORS_ADM1029_FAN1, 409 RW, NOSYSCTL, VALUE(1), 0 }, 410 { SENSORS_ADM1029_FAN1_DIV, "fan1_div", 411 SENSORS_ADM1029_FAN1, 412 NOMAP, 413 RW, NOSYSCTL, VALUE(1), 0 }, 414 415 { SENSORS_ADM1029_FAN2, "fan2", 416 NOMAP, NOMAP, 417 R, NOSYSCTL, VALUE(2), 0 }, 418 { SENSORS_ADM1029_FAN2_MIN, "fan2_min", 419 SENSORS_ADM1029_FAN2, 420 SENSORS_ADM1029_FAN2, 421 RW, NOSYSCTL, VALUE(1), 0 }, 422 { SENSORS_ADM1029_FAN2_DIV, "fan2_div", 423 SENSORS_ADM1029_FAN2, 424 NOMAP, 425 RW, NOSYSCTL, VALUE(2), 0 }, 426 { 0 } 362 427 }; 363 428 … … 6158 6223 { SENSORS_XEONTEMP_PREFIX, xeontemp_features }, 6159 6224 { SENSORS_MAX6650_PREFIX, max6650_features }, 6225 { SENSORS_ADM1029_PREFIX, adm1029_features }, 6160 6226 { SENSORS_ADM1030_PREFIX, adm1030_features }, 6161 6227 { SENSORS_ADM1031_PREFIX, adm1031_features }, lm-sensors/trunk/lib/chips.h
r4264 r4270 184 184 #define SENSORS_ADM1021_ALARMS 81 /* R */ 185 185 #define SENSORS_ADM1021_DIE_CODE 90 /* R */ 186 187 /* ADM1029 chips */ 188 189 #define SENSORS_ADM1029_PREFIX "adm1029" 190 191 #define SENSORS_ADM1029_TEMP1 51 192 #define SENSORS_ADM1029_TEMP1_MAX 52 193 #define SENSORS_ADM1029_TEMP1_MIN 53 194 195 #define SENSORS_ADM1029_TEMP2 61 196 #define SENSORS_ADM1029_TEMP2_MAX 62 197 #define SENSORS_ADM1029_TEMP2_MIN 63 198 199 #define SENSORS_ADM1029_TEMP3 71 200 #define SENSORS_ADM1029_TEMP3_MAX 72 201 #define SENSORS_ADM1029_TEMP3_MIN 73 202 203 #define SENSORS_ADM1029_FAN1 81 204 #define SENSORS_ADM1029_FAN1_MIN 82 205 #define SENSORS_ADM1029_FAN1_DIV 83 206 207 #define SENSORS_ADM1029_FAN2 91 208 #define SENSORS_ADM1029_FAN2_MIN 92 209 #define SENSORS_ADM1029_FAN2_DIV 93 186 210 187 211 lm-sensors/trunk/prog/sensors/chips.c
r4264 r4270 5392 5392 } 5393 5393 5394 void print_adm1029(const sensors_chip_name *name) 5395 { 5396 char *label; 5397 double cur, high, low, fan_div; 5398 int valid; 5399 5400 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_TEMP1, 5401 &label, &valid) 5402 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP1, &cur) 5403 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP1_MAX, &high) 5404 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP1_MIN, &low)) { 5405 if (valid) { 5406 print_label(label, 10); 5407 print_temp_info(cur, high, low, MINMAX, 0, 0); 5408 printf("\n"); 5409 } 5410 } else 5411 printf("ERROR: Can't get local temperature data!\n"); 5412 free(label); 5413 5414 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_TEMP2, 5415 &label, &valid) 5416 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP2, &cur) 5417 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP2_MAX, &high) 5418 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP2_MIN, &low)) { 5419 if (valid) { 5420 print_label(label, 10); 5421 print_temp_info(cur, high, low, MINMAX, 0, 0); 5422 printf("\n"); 5423 } 5424 } else 5425 printf("ERROR: Can't get remote1 temperature data!\n"); 5426 free(label); 5427 5428 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_TEMP3, 5429 &label, &valid) 5430 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP3, &cur) 5431 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP3_MAX, &high) 5432 && !sensors_get_feature(*name, SENSORS_ADM1029_TEMP3_MIN, &low)) { 5433 if (valid) { 5434 print_label(label, 10); 5435 print_temp_info(cur, high, low, MINMAX, 0, 0); 5436 printf("\n"); 5437 } 5438 } else 5439 printf("ERROR: Can't get remote2 temperature data!\n"); 5440 free(label); 5441 5442 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_FAN1, 5443 &label, &valid) 5444 && !sensors_get_feature(*name, SENSORS_ADM1029_FAN1, &cur) 5445 && !sensors_get_feature(*name, SENSORS_ADM1029_FAN1_MIN, &low) 5446 && !sensors_get_feature(*name, SENSORS_ADM1029_FAN1_DIV, &fan_div)) { 5447 if (valid) { 5448 print_label(label, 10); 5449 printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f)\n", 5450 cur, low, fan_div); 5451 } 5452 } else 5453 printf("ERROR: Can't get fan1 data!\n"); 5454 free(label); 5455 5456 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1029_FAN2, 5457 &label, &valid) 5458 && !sensors_get_feature(*name, SENSORS_ADM1029_FAN2, &cur) 5459 && !sensors_get_feature(*name, SENSORS_ADM1029_FAN2_MIN, &low) 5460 && !sensors_get_feature(*name, SENSORS_ADM1029_FAN2_DIV, &fan_div)) { 5461 if (valid) { 5462 print_label(label, 10); 5463 printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f)\n", 5464 cur, low , fan_div); 5465 } 5466 } else 5467 printf("ERROR: Can't get fan2 data!\n"); 5468 free(label); 5469 } 5470 5394 5471 void print_lm63(const sensors_chip_name *name) 5395 5472 { lm-sensors/trunk/prog/sensors/chips.h
r4214 r4270 72 72 extern void print_xeontemp(const sensors_chip_name *name); 73 73 extern void print_max6650(const sensors_chip_name *name); 74 extern void print_adm1029(const sensors_chip_name *name); 74 75 extern void print_adm1031(const sensors_chip_name *name); 75 76 extern void print_smsc47b397(const sensors_chip_name *name); lm-sensors/trunk/prog/sensors/main.c
r4264 r4270 413 413 { "max6650", print_max6650 }, 414 414 { "asb100", print_asb100 }, 415 { "adm1029", print_adm1029 }, 415 416 { "adm1030", print_adm1031 }, 416 417 { "adm1031", print_adm1031 },
