Changeset 4035
- Timestamp:
- 06/02/06 20:49:23 (7 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 7 modified
-
CHANGES (modified) (1 diff)
-
etc/sensors.conf.eg (modified) (1 diff)
-
lib/chips.c (modified) (2 diffs)
-
lib/chips.h (modified) (1 diff)
-
prog/sensors/chips.c (modified) (1 diff)
-
prog/sensors/chips.h (modified) (1 diff)
-
prog/sensors/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4034 r4035 29 29 Program sensors: No error messages on missing w83792d fan4-7 (Yuan Mu) 30 30 Add smsc47m192 support 31 Add abituguru support (Hans de Goede) 31 32 Program sensors-detect: Add ServerWorks HT-1000 SMBus detection 32 33 Add ATI IXP200/300/400 SMBus detection -
lm-sensors/trunk/etc/sensors.conf.eg
r3312 r4035 2618 2618 #set temp3_max 50 2619 2619 #set temp3_hyst 48 2620 2621 2622 # Abit Uguru sensor part configuration. 2623 # The Abit Uguru is relativly straight forward to configure. 2624 # label statements: 2625 # The voltage (in) temp and fan sensors are usualy in the same order as listed 2626 # in the BIOS, but not always! 2627 # compute statements: 2628 # The temp and fan sensors don't need any compute statements. Most voltage 2629 # inputs are directly connected to the IC and thus don't need an compute line 2630 # because the 0-3494 mV voltage given by the kernel driver is correct. The sen- 2631 # sors for higher voltages however are connect through a divider and measure 2632 # ranges of: 0-4361mV, 0-6248mV or 0-14510mV. Thus the measured voltages must 2633 # be multiplied by resp. 1.248, 1.788 or 4.153. 3.3 volt sources use the 1.248 2634 # mutiplier, 5 volt the 1.788 and 12 volt the 4.153. 2635 # set statements: 2636 # The Abit BIOS sets reasonable treshholds and allows changing them, thus 2637 # set statements may be ommited. The abituguru kernel driver does support 2638 # them if you want to add them. 2639 # 2640 # The configuration below is for the Kv8Pro and AV8 this is the default as this 2641 # driver is developed and tested on a Kv8Pro. 2642 # Configurations for many other Abit boards can be found at: 2643 # http://www.lm-sensors.org/trac/wiki/Configurations/Abit 2644 # If your motherboard isn't listed there and you create a configuration for it 2645 # please add it there. 2646 2647 chip "abituguru-*" 2648 2649 label in0 "CPU Core Voltage" 2650 label in1 "DDR Voltage" 2651 label in2 "DDR VTT Voltage" 2652 label in3 "NB Voltage" 2653 label in4 "SB Voltage" 2654 label in5 "HyperTransport Voltage" 2655 label in6 "AGP VDDQ Voltage" 2656 label in7 "ATX +5V" 2657 compute in7 @*1.788 , @/1.788 2658 label in8 "ATX +3.3V" 2659 compute in8 @*1.248 , @/1.248 2660 label in9 "Standby Voltage (+5V)" 2661 compute in9 @*1.788 , @/1.788 2662 label in10 "3VDual Voltage" 2663 compute in10 @*1.248 , @/1.248 2664 2665 label temp1 "CPU Temperature" 2666 label temp2 "SYS Temperature" 2667 label temp3 "PWM Temperature" 2668 ignore temp4 2669 ignore temp5 2670 ignore temp6 2671 ignore temp7 2672 2673 label fan1 "CPU FAN Speed" 2674 label fan2 "NB FAN Speed" 2675 label fan3 "SYS FAN Speed" 2676 label fan4 "AUX1 FAN Speed" 2677 label fan5 "AUX2 FAN Speed" 2678 ignore fan6 -
lm-sensors/trunk/lib/chips.c
r3277 r4035 5773 5773 }; 5774 5774 5775 #define SENSORS_ABITUGURU_IN_FEATURES(nr) \ 5776 { SENSORS_ABITUGURU_IN(nr), "in" #nr, NOMAP, NOMAP, R, NOSYSCTL, \ 5777 VALUE(3), 3 }, \ 5778 { SENSORS_ABITUGURU_IN_MIN(nr), "in" #nr "_min", \ 5779 SENSORS_ABITUGURU_IN(nr), SENSORS_ABITUGURU_IN(nr), RW, \ 5780 NOSYSCTL, VALUE(1), 3 }, \ 5781 { SENSORS_ABITUGURU_IN_MIN_ALARM(nr), "in" #nr "_min_alarm", \ 5782 SENSORS_ABITUGURU_IN(nr), NOMAP, R, NOSYSCTL, \ 5783 VALUE(1), 0 }, \ 5784 { SENSORS_ABITUGURU_IN_MAX(nr), "in" #nr "_max", \ 5785 SENSORS_ABITUGURU_IN(nr), SENSORS_ABITUGURU_IN(nr), RW, \ 5786 NOSYSCTL, VALUE(2), 3 }, \ 5787 { SENSORS_ABITUGURU_IN_MAX_ALARM(nr), "in" #nr "_max_alarm", \ 5788 SENSORS_ABITUGURU_IN(nr), NOMAP, R, NOSYSCTL, \ 5789 VALUE(2), 0 } 5790 5791 #define SENSORS_ABITUGURU_TEMP_FEATURES(nr) \ 5792 { SENSORS_ABITUGURU_TEMP(nr), "temp" #nr, NOMAP, NOMAP, R, NOSYSCTL, \ 5793 VALUE(3), 3 }, \ 5794 { SENSORS_ABITUGURU_TEMP_ALARM(nr), "temp" #nr "_alarm", \ 5795 SENSORS_ABITUGURU_TEMP(nr), NOMAP, R, NOSYSCTL, \ 5796 VALUE(1), 0 }, \ 5797 { SENSORS_ABITUGURU_TEMP_MAX(nr), "temp" #nr "_max", \ 5798 SENSORS_ABITUGURU_TEMP(nr), SENSORS_ABITUGURU_TEMP(nr), RW, \ 5799 NOSYSCTL, VALUE(1), 3 }, \ 5800 { SENSORS_ABITUGURU_TEMP_CRIT(nr), "temp" #nr "_crit", \ 5801 SENSORS_ABITUGURU_TEMP(nr), SENSORS_ABITUGURU_TEMP(nr), RW, \ 5802 NOSYSCTL, VALUE(2), 3 } 5803 5804 #define SENSORS_ABITUGURU_FAN_FEATURES(nr) \ 5805 { SENSORS_ABITUGURU_FAN(nr), "fan" #nr, NOMAP, NOMAP, R, NOSYSCTL, \ 5806 VALUE(2), 0 }, \ 5807 { SENSORS_ABITUGURU_FAN_ALARM(nr), "fan" #nr "_alarm", \ 5808 SENSORS_ABITUGURU_FAN(nr), NOMAP, R, NOSYSCTL, \ 5809 VALUE(1), 0 }, \ 5810 { SENSORS_ABITUGURU_FAN_MIN(nr), "fan" #nr "_min", \ 5811 SENSORS_ABITUGURU_FAN(nr), SENSORS_ABITUGURU_FAN(nr), RW, \ 5812 NOSYSCTL, VALUE(1), 0 } 5813 5814 static sensors_chip_feature abituguru_features[] = 5815 { 5816 SENSORS_ABITUGURU_IN_FEATURES(0), 5817 SENSORS_ABITUGURU_IN_FEATURES(1), 5818 SENSORS_ABITUGURU_IN_FEATURES(2), 5819 SENSORS_ABITUGURU_IN_FEATURES(3), 5820 SENSORS_ABITUGURU_IN_FEATURES(4), 5821 SENSORS_ABITUGURU_IN_FEATURES(5), 5822 SENSORS_ABITUGURU_IN_FEATURES(6), 5823 SENSORS_ABITUGURU_IN_FEATURES(7), 5824 SENSORS_ABITUGURU_IN_FEATURES(8), 5825 SENSORS_ABITUGURU_IN_FEATURES(9), 5826 SENSORS_ABITUGURU_IN_FEATURES(10), 5827 SENSORS_ABITUGURU_TEMP_FEATURES(1), 5828 SENSORS_ABITUGURU_TEMP_FEATURES(2), 5829 SENSORS_ABITUGURU_TEMP_FEATURES(3), 5830 SENSORS_ABITUGURU_TEMP_FEATURES(4), 5831 SENSORS_ABITUGURU_TEMP_FEATURES(5), 5832 SENSORS_ABITUGURU_TEMP_FEATURES(6), 5833 SENSORS_ABITUGURU_TEMP_FEATURES(7), 5834 SENSORS_ABITUGURU_FAN_FEATURES(1), 5835 SENSORS_ABITUGURU_FAN_FEATURES(2), 5836 SENSORS_ABITUGURU_FAN_FEATURES(3), 5837 SENSORS_ABITUGURU_FAN_FEATURES(4), 5838 SENSORS_ABITUGURU_FAN_FEATURES(5), 5839 SENSORS_ABITUGURU_FAN_FEATURES(6), 5840 { 0 } 5841 }; 5842 5843 5775 5844 sensors_chip_features sensors_chip_features_list[] = 5776 5845 { … … 5874 5943 { SENSORS_SMSC47B397_PREFIX, smsc47b397_features }, 5875 5944 { SENSORS_F71805F_PREFIX, f71805f_features }, 5945 { SENSORS_ABITUGURU_PREFIX, abituguru_features }, 5876 5946 { 0 } 5877 5947 }; -
lm-sensors/trunk/lib/chips.h
r3277 r4035 2169 2169 #define SENSORS_F71805F_ALARMS_TEMP 202 2170 2170 2171 /* Abit uGuru chip */ 2172 #define SENSORS_ABITUGURU_PREFIX "abituguru" 2173 2174 /* in n from 0 to 10 */ 2175 #define SENSORS_ABITUGURU_IN(n) (0x01 + (n)) /* R */ 2176 #define SENSORS_ABITUGURU_IN_MIN(n) (0x11 + (n)) /* RW */ 2177 #define SENSORS_ABITUGURU_IN_MIN_ALARM(n) (0x21 + (n)) /* R */ 2178 #define SENSORS_ABITUGURU_IN_MAX(n) (0x31 + (n)) /* RW */ 2179 #define SENSORS_ABITUGURU_IN_MAX_ALARM(n) (0x41 + (n)) /* R */ 2180 /* temp n from 1 to 7 */ 2181 #define SENSORS_ABITUGURU_TEMP(n) (0x50 + (n)) /* R */ 2182 #define SENSORS_ABITUGURU_TEMP_ALARM(n) (0x60 + (n)) /* R */ 2183 #define SENSORS_ABITUGURU_TEMP_MAX(n) (0x70 + (n)) /* RW */ 2184 #define SENSORS_ABITUGURU_TEMP_CRIT(n) (0x80 + (n)) /* RW */ 2185 /* fan n from 1 to 6 */ 2186 #define SENSORS_ABITUGURU_FAN(n) (0x90 + (n)) /* R */ 2187 #define SENSORS_ABITUGURU_FAN_ALARM(n) (0xA0 + (n)) /* R */ 2188 #define SENSORS_ABITUGURU_FAN_MIN(n) (0xB0 + (n)) /* RW */ 2189 2171 2190 #endif /* def LIB_SENSORS_CHIPS_H */ -
lm-sensors/trunk/prog/sensors/chips.c
r3311 r4035 5932 5932 } 5933 5933 5934 /* print_abituguru_in() 5935 * where in, in_min, in_min_alarm, in_max and in_max_alarm are sensors 5936 * feature IDs 5937 */ 5938 static void print_abituguru_in(const sensors_chip_name *name, int in, 5939 int in_min, int in_min_alarm, int in_max, int in_max_alarm) 5940 { 5941 char *label; 5942 double cur, min, max, alarm_low, alarm_high; 5943 int valid; 5944 5945 if (!sensors_get_label_and_valid(*name, in, &label, &valid)) { 5946 if (valid) { 5947 if (!sensors_get_feature(*name, in, &cur) && 5948 !sensors_get_feature(*name, in_min, &min) && 5949 !sensors_get_feature(*name, in_max, &max) && 5950 !sensors_get_feature(*name, in_min_alarm, &alarm_low) && 5951 !sensors_get_feature(*name, in_max_alarm, &alarm_high)) { 5952 print_label(label, 23); 5953 printf("%+6.2f V (min %+6.2f V, max %+6.2f V)", 5954 cur, min, max); 5955 if (alarm_low || alarm_high) { 5956 printf(" ALARM ("); 5957 if (alarm_low) 5958 printf("LOW"); 5959 if (alarm_high) 5960 printf("%sHIGH", (alarm_low) ? "," : ""); 5961 printf(")"); 5962 } 5963 printf("\n"); 5964 } else 5965 printf("ERROR: Can't get IN data! (0x%04x)\n", in); 5966 } 5967 free(label); 5968 } 5969 } 5970 5971 /* print_abituguru_temp() 5972 * where temp, temp_alarm, temp_max, and temp_crit are sensors feature IDs 5973 */ 5974 static void print_abituguru_temp(const sensors_chip_name *name, int temp, 5975 int temp_alarm, int temp_max, int temp_crit) 5976 { 5977 char *label; 5978 double cur, alarm, max, crit; 5979 int valid; 5980 5981 if (!sensors_get_label_and_valid(*name, temp, &label, &valid)) { 5982 if (valid) { 5983 if (!sensors_get_feature(*name, temp, &cur) && 5984 !sensors_get_feature(*name, temp_alarm, &alarm) && 5985 !sensors_get_feature(*name, temp_max, &max) && 5986 !sensors_get_feature(*name, temp_crit, &crit)) { 5987 print_label(label, 23); 5988 print_temp_info(cur, max, crit, CRIT, 0, 0); 5989 if (alarm) 5990 printf(" ALARM\n"); 5991 else 5992 printf("\n"); 5993 } else 5994 printf("ERROR: Can't get TEMP data! (0x%04x)\n", temp); 5995 } 5996 free(label); 5997 } 5998 } 5999 6000 /* print_abituguru_fan() 6001 * where fan, fan_alarm and fan_min are sensors feature IDs 6002 */ 6003 static void print_abituguru_fan(const sensors_chip_name *name, int fan, 6004 int fan_alarm, int fan_min) 6005 { 6006 char *label; 6007 double cur, alarm, min; 6008 int valid; 6009 6010 if (!sensors_get_label_and_valid(*name, fan, &label, &valid)) { 6011 if (valid) { 6012 if (!sensors_get_feature(*name, fan, &cur) && 6013 !sensors_get_feature(*name, fan_alarm, &alarm) && 6014 !sensors_get_feature(*name, fan_min, &min)) { 6015 print_label(label, 23); 6016 printf("%4.0f RPM (min %4.0f RPM) %s\n", 6017 cur, min, alarm ? "ALARM" : ""); 6018 } else 6019 printf("ERROR: Can't get FAN data! (0x%04x)\n", fan); 6020 } 6021 free(label); 6022 } 6023 } 6024 6025 void print_abituguru(const sensors_chip_name *name) 6026 { 6027 int i; 6028 6029 for (i=0; i<11; i++) 6030 print_abituguru_in(name, SENSORS_ABITUGURU_IN(i), 6031 SENSORS_ABITUGURU_IN_MIN(i), SENSORS_ABITUGURU_IN_MIN_ALARM(i), 6032 SENSORS_ABITUGURU_IN_MAX(i), SENSORS_ABITUGURU_IN_MAX_ALARM(i)); 6033 6034 for (i=1; i<=7; i++) 6035 print_abituguru_temp(name, SENSORS_ABITUGURU_TEMP(i), 6036 SENSORS_ABITUGURU_TEMP_ALARM(i), SENSORS_ABITUGURU_TEMP_MAX(i), 6037 SENSORS_ABITUGURU_TEMP_CRIT(i)); 6038 6039 for (i=1; i<=6; i++) 6040 print_abituguru_fan(name, SENSORS_ABITUGURU_FAN(i), 6041 SENSORS_ABITUGURU_FAN_ALARM(i), SENSORS_ABITUGURU_FAN_MIN(i)); 6042 } 6043 5934 6044 void print_unknown_chip(const sensors_chip_name *name) 5935 6045 { -
lm-sensors/trunk/prog/sensors/chips.h
r3277 r4035 73 73 extern void print_smsc47b397(const sensors_chip_name *name); 74 74 extern void print_f71805f(const sensors_chip_name *name); 75 extern void print_abituguru(const sensors_chip_name *name); 75 76 76 77 #endif /* def PROG_SENSORS_CHIPS_H */ -
lm-sensors/trunk/prog/sensors/main.c
r3277 r4035 416 416 { "smsc47b397", print_smsc47b397 }, 417 417 { "f71805f", print_f71805f }, 418 { "abituguru", print_abituguru }, 418 419 { NULL, NULL } 419 420 };
