Changeset 1179
- Timestamp:
- 09/18/01 17:20:15 (7 years ago)
- Files:
-
- lm-sensors/trunk/CONTRIBUTORS (modified) (1 diff)
- lm-sensors/trunk/README (modified) (1 diff)
- lm-sensors/trunk/doc/chips/fscpos (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/fscpos.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/CONTRIBUTORS
r1112 r1179 63 63 * Christophe Gauthron <chrisg@0-in.com> 64 64 Author of the IT87 driver. 65 * Hermann Jung <hej@odn.de> 66 Author of the fscpos driver. lm-sensors/trunk/README
r1155 r1179 51 51 Dallas Semiconductor DS75, DS1621, DS1625, DS1775, and DS1780 52 52 Hewlett Packard Maxilife (several revisions including '99 NBA) 53 Fujitsu Siemens Poseidon Chip 53 54 Genesys Logic GL518SM (rev 00, 80), GL520SM, GL523SM 54 55 Intel Xeon processor embedded sensors lm-sensors/trunk/etc/sensors.conf.eg
r1146 r1179 1118 1118 # ignore fan2 1119 1119 # ignore fan3 1120 1121 # 1122 # values for the fujitsu siemens poseidon chip 1123 # 1124 # Temperature 1125 1126 label temp1 "Temp1/CPU" 1127 label temp2 "Temp2/MB" 1128 label temp3 "Temp2/AUX" 1129 1130 # Fans 1131 1132 label fan1 "Fan1" 1133 ignore fan2 1134 ignore fan3 1135 1136 # Voltage 1137 1138 label volt12 "12 V" 1139 label volt5 " 5 V" 1140 label voltbatt " 3.3 V" lm-sensors/trunk/kernel/chips/Module.mk
r1112 r1179 27 27 KERNELCHIPSTARGETS := \ 28 28 $(MODULE_DIR)/adm1024.o \ 29 $(MODULE_DIR)/fscpos.o \ 29 30 $(MODULE_DIR)/it87.o \ 30 31 $(MODULE_DIR)/maxilife.o \ lm-sensors/trunk/kernel/include/sensors.h
r1146 r1179 507 507 #define IT87_ALARM_TEMP3 0x0004 508 508 509 #define FSCPOS_SYSCTL_VOLT0 1000 /* 12 volt supply */ 510 #define FSCPOS_SYSCTL_VOLT1 1001 /* 5 volt supply */ 511 #define FSCPOS_SYSCTL_VOLT2 1002 /* batterie voltage*/ 512 #define FSCPOS_SYSCTL_FAN0 1101 /* state, min, ripple, actual value fan 0 */ 513 #define FSCPOS_SYSCTL_FAN1 1102 /* state, min, ripple, actual value fan 1 */ 514 #define FSCPOS_SYSCTL_FAN2 1103 /* state, min, ripple, actual value fan 2 */ 515 #define FSCPOS_SYSCTL_TEMP0 1201 /* state and value of sensor 0, cpu die */ 516 #define FSCPOS_SYSCTL_TEMP1 1202 /* state and value of sensor 1, motherboard */ 517 #define FSCPOS_SYSCTL_TEMP2 1203 /* state and value of sensor 2, chassis */ 518 #define FSCPOS_SYSCTL_REV 2000 /* Revision */ 519 #define FSCPOS_SYSCTL_EVENT 2001 /* global event status */ 520 #define FSCPOS_SYSCTL_CONTROL 2002 /* global control byte */ 521 #define FSCPOS_SYSCTL_WDOG 2003 /* state, min, ripple, actual value fan 2 */ 522 509 523 #endif /* def SENSORS_SENSORS_H */ lm-sensors/trunk/lib/chips.c
r1146 r1179 2237 2237 }; 2238 2238 2239 static sensors_chip_feature fscpos_features[] = 2240 { 2241 { SENSORS_FSCPOS_REV, "rev", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2242 SENSORS_MODE_R, FSCPOS_SYSCTL_REV, VALUE(1), 0 }, 2243 { SENSORS_FSCPOS_EVENT, "event", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2244 SENSORS_MODE_R, FSCPOS_SYSCTL_EVENT, VALUE(1), 0 }, 2245 { SENSORS_FSCPOS_CONTROL, "control", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2246 SENSORS_MODE_RW, FSCPOS_SYSCTL_CONTROL, VALUE(1), 0 }, 2247 { SENSORS_FSCPOS_VOLTAGE1, "volt12", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2248 SENSORS_MODE_R, FSCPOS_SYSCTL_VOLT0, VALUE(1), 2 }, 2249 { SENSORS_FSCPOS_VOLTAGE2, "volt5", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2250 SENSORS_MODE_R, FSCPOS_SYSCTL_VOLT1, VALUE(1), 2 }, 2251 { SENSORS_FSCPOS_VOLTAGE3, "voltbatt", SENSORS_NO_MAPPING, 2252 SENSORS_NO_MAPPING, SENSORS_MODE_R, 2253 FSCPOS_SYSCTL_VOLT2, VALUE(1), 2 }, 2254 { SENSORS_FSCPOS_TEMP1, "temp1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2255 SENSORS_MODE_R, FSCPOS_SYSCTL_TEMP0, VALUE(2), 0 }, 2256 { SENSORS_FSCPOS_TEMP2, "temp2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2257 SENSORS_MODE_R, FSCPOS_SYSCTL_TEMP1, VALUE(2), 0 }, 2258 { SENSORS_FSCPOS_TEMP3, "temp3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2259 SENSORS_MODE_R, FSCPOS_SYSCTL_TEMP2, VALUE(2), 0 }, 2260 { SENSORS_FSCPOS_TEMP1_STATE, "temp1_state", SENSORS_FSCPOS_TEMP1, 2261 SENSORS_FSCPOS_TEMP1, SENSORS_MODE_RW, 2262 FSCPOS_SYSCTL_TEMP0, VALUE(1), 0 }, 2263 { SENSORS_FSCPOS_TEMP2_STATE, "temp2_state", SENSORS_FSCPOS_TEMP2, 2264 SENSORS_FSCPOS_TEMP2, SENSORS_MODE_RW, 2265 FSCPOS_SYSCTL_TEMP1, VALUE(1), 0 }, 2266 { SENSORS_FSCPOS_TEMP3_STATE, "temp3_state", SENSORS_FSCPOS_TEMP3, 2267 SENSORS_FSCPOS_TEMP3, SENSORS_MODE_RW, 2268 FSCPOS_SYSCTL_TEMP2, VALUE(1), 0 }, 2269 { SENSORS_FSCPOS_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2270 SENSORS_MODE_R, FSCPOS_SYSCTL_FAN0, VALUE(4), 0 }, 2271 { SENSORS_FSCPOS_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2272 SENSORS_MODE_R, FSCPOS_SYSCTL_FAN1, VALUE(4), 0 }, 2273 { SENSORS_FSCPOS_FAN3, "fan3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2274 SENSORS_MODE_R, FSCPOS_SYSCTL_FAN2, VALUE(4), 0 }, 2275 { SENSORS_FSCPOS_FAN1_MIN, "fan1_min", SENSORS_FSCPOS_FAN1, 2276 SENSORS_FSCPOS_FAN1, SENSORS_MODE_RW, 2277 FSCPOS_SYSCTL_FAN0, VALUE(2), 0 }, 2278 { SENSORS_FSCPOS_FAN2_MIN, "fan2_min", SENSORS_FSCPOS_FAN2, 2279 SENSORS_FSCPOS_FAN2, SENSORS_MODE_RW, 2280 FSCPOS_SYSCTL_FAN1, VALUE(2), 0 }, 2281 { SENSORS_FSCPOS_FAN1_STATE, "fan1_state", SENSORS_FSCPOS_FAN1, 2282 SENSORS_FSCPOS_FAN1, SENSORS_MODE_RW, 2283 FSCPOS_SYSCTL_FAN0, VALUE(1), 0 }, 2284 { SENSORS_FSCPOS_FAN2_STATE, "fan2_state", SENSORS_FSCPOS_FAN2, 2285 SENSORS_FSCPOS_FAN2, SENSORS_MODE_RW, 2286 FSCPOS_SYSCTL_FAN1, VALUE(1), 0 }, 2287 { SENSORS_FSCPOS_FAN3_STATE, "fan3_state", SENSORS_FSCPOS_FAN3, 2288 SENSORS_FSCPOS_FAN3, SENSORS_MODE_RW, 2289 FSCPOS_SYSCTL_FAN2, VALUE(1), 0 }, 2290 { SENSORS_FSCPOS_FAN1_RIPPLE, "fan1_ripple", SENSORS_FSCPOS_FAN1, 2291 SENSORS_FSCPOS_FAN1, SENSORS_MODE_RW, 2292 FSCPOS_SYSCTL_FAN0, VALUE(3), 0 }, 2293 { SENSORS_FSCPOS_FAN2_RIPPLE, "fan2_ripple", SENSORS_FSCPOS_FAN2, 2294 SENSORS_FSCPOS_FAN2, SENSORS_MODE_RW, 2295 FSCPOS_SYSCTL_FAN1, VALUE(3), 0 }, 2296 { SENSORS_FSCPOS_FAN3_RIPPLE, "fan3_ripple", SENSORS_FSCPOS_FAN3, 2297 SENSORS_FSCPOS_FAN3, SENSORS_MODE_RW, 2298 FSCPOS_SYSCTL_FAN2, VALUE(3), 0 }, 2299 { SENSORS_FSCPOS_WDOG_PRESET, "wdog_preset", SENSORS_NO_MAPPING, 2300 SENSORS_NO_MAPPING, SENSORS_MODE_RW, 2301 FSCPOS_SYSCTL_WDOG, VALUE(1), 0 }, 2302 { SENSORS_FSCPOS_WDOG_STATE, "wdog_state", SENSORS_FSCPOS_WDOG_PRESET, 2303 SENSORS_FSCPOS_WDOG_PRESET, SENSORS_MODE_RW, 2304 FSCPOS_SYSCTL_WDOG, VALUE(2), 0 }, 2305 { SENSORS_FSCPOS_WDOG_CONTROL, "wdog_control", SENSORS_FSCPOS_WDOG_PRESET, 2306 SENSORS_FSCPOS_WDOG_PRESET, SENSORS_MODE_RW, 2307 FSCPOS_SYSCTL_WDOG, VALUE(3), 0 }, 2308 { 0 } 2309 }; 2239 2310 2240 2311 … … 2286 2357 { SENSORS_ADM1024_PREFIX, adm1024_features }, 2287 2358 { SENSORS_IT87_PREFIX, it87_features }, 2359 { SENSORS_FSCPOS_PREFIX, fscpos_features }, 2288 2360 { 0 } 2289 2361 }; lm-sensors/trunk/lib/chips.h
r1146 r1179 1022 1022 #define SENSORS_IT87_ALARMS_TEMP 83 /* R */ 1023 1023 1024 1025 /* fsc poseidon chip */ 1026 1027 #define SENSORS_FSCPOS_PREFIX "fscpos" 1028 1029 #define SENSORS_FSCPOS_REV 1 /* R */ 1030 #define SENSORS_FSCPOS_EVENT 2 /* R */ 1031 #define SENSORS_FSCPOS_CONTROL 3 /* RW */ 1032 #define SENSORS_FSCPOS_FAN1 4 /* R */ 1033 #define SENSORS_FSCPOS_FAN2 5 /* R */ 1034 #define SENSORS_FSCPOS_FAN3 6 /* R */ 1035 #define SENSORS_FSCPOS_FAN1_MIN 7 /* RW */ 1036 #define SENSORS_FSCPOS_FAN2_MIN 8 /* RW */ 1037 #define SENSORS_FSCPOS_FAN3_MIN 9 /* RW */ 1038 #define SENSORS_FSCPOS_FAN1_STATE 10 /* RW */ 1039 #define SENSORS_FSCPOS_FAN2_STATE 11 /* RW */ 1040 #define SENSORS_FSCPOS_FAN3_STATE 12 /* RW */ 1041 #define SENSORS_FSCPOS_FAN1_RIPPLE 13 /* RW */ 1042 #define SENSORS_FSCPOS_FAN2_RIPPLE 14 /* RW */ 1043 #define SENSORS_FSCPOS_FAN3_RIPPLE 15 /* RW */ 1044 #define SENSORS_FSCPOS_TEMP1 16 /* R */ 1045 #define SENSORS_FSCPOS_TEMP2 17 /* R */ 1046 #define SENSORS_FSCPOS_TEMP3 18 /* R */ 1047 #define SENSORS_FSCPOS_TEMP1_STATE 19 /* RW */ 1048 #define SENSORS_FSCPOS_TEMP2_STATE 20 /* RW */ 1049 #define SENSORS_FSCPOS_TEMP3_STATE 21 /* RW */ 1050 #define SENSORS_FSCPOS_VOLTAGE1 22 /* R */ 1051 #define SENSORS_FSCPOS_VOLTAGE2 23 /* R */ 1052 #define SENSORS_FSCPOS_VOLTAGE3 24 /* R */ 1053 #define SENSORS_FSCPOS_WDOG_PRESET 25/* RW */ 1054 #define SENSORS_FSCPOS_WDOG_STATE 26/* RW */ 1055 #define SENSORS_FSCPOS_WDOG_CONTROL 27/* RW */ 1056 1057 1058 1024 1059 #endif /* def LIB_SENSORS_CHIPS_H */ lm-sensors/trunk/prog/detect/sensors-detect
r1177 r1179 446 446 via686a_isa_detect adm1022_detect ltc1710_detect gl525sm_detect 447 447 lm87_detect ite_detect ite_isa_detect ite_alias_detect 448 ddcmonitor_detect ds1621_detect adm1024_detect );448 ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect); 449 449 450 450 # This is a list of all recognized chips. … … 719 719 i2c_addrs => [0x50], 720 720 i2c_detect => sub { ddcmonitor_detect @_ }, 721 }, 722 { 723 name => "FSC poseidon chip", 724 driver => "fscpos", 725 i2c_addrs => [0x73], 726 i2c_detect => sub { fscpos_detect @_ }, 721 727 }, 722 728 ); … … 2198 2204 } 2199 2205 2206 # $_[0]: A reference to the file descriptor to access this chip. 2207 # We may assume an i2c_set_slave_addr was already done. 2208 # $_[1]: Address 2209 # Returns: undef if not detected, (2) if detected. 2210 # Registers used: 2211 # 0x00-0x02: Identification 2212 sub fscpos_detect 2213 { 2214 my ($file,$addr) = @_; 2215 # check the first 3 registers 2216 if (i2c_smbus_read_byte_data($file,0x00) != 0x50) { 2217 return (0); 2218 } 2219 if (i2c_smbus_read_byte_data($file,0x01) != 0x45) { 2220 return (0); 2221 } 2222 if (i2c_smbus_read_byte_data($file,0x02) != 0x47) { 2223 return (0); 2224 } 2225 # no poseidon chip 2226 return (1); 2227 } 2228 2200 2229 ################ 2201 2230 # MAIN PROGRAM # lm-sensors/trunk/prog/sensors/chips.c
r1161 r1179 2648 2648 } 2649 2649 2650 void print_fscpos(const sensors_chip_name *name) 2651 { 2652 char *label = NULL; 2653 double voltage, temp,state,fan,min_rpm; 2654 int valid; 2655 2656 printf("Chip: fujitsu siemens poseidon\n"); 2657 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_TEMP1,&label,&valid) && 2658 !sensors_get_feature(*name,SENSORS_FSCPOS_TEMP1,&temp) && 2659 !sensors_get_feature(*name,SENSORS_FSCPOS_TEMP1_STATE,&state)) { 2660 if (valid) { 2661 print_label(label,10); 2662 if((int) state & 0x01) 2663 printf("\t%+6.2f C \n",temp); 2664 else 2665 printf("\tfailed\n"); 2666 } 2667 } 2668 free_the_label(&label); 2669 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_TEMP2,&label,&valid) && 2670 !sensors_get_feature(*name,SENSORS_FSCPOS_TEMP2,&temp) && 2671 !sensors_get_feature(*name,SENSORS_FSCPOS_TEMP2_STATE,&state)) { 2672 if (valid) { 2673 print_label(label,10); 2674 if((int) state & 0x01) 2675 printf("\t%+6.2f C \n",temp); 2676 else 2677 printf("\tfailed\n"); 2678 } 2679 } 2680 free_the_label(&label); 2681 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_TEMP3,&label,&valid) && 2682 !sensors_get_feature(*name,SENSORS_FSCPOS_TEMP3,&temp) && 2683 !sensors_get_feature(*name,SENSORS_FSCPOS_TEMP3_STATE,&state)) { 2684 if (valid) { 2685 print_label(label,10); 2686 if((int) state & 0x01) 2687 printf("\t%+6.2f C \n",temp); 2688 else 2689 printf("\tfailed\n"); 2690 } 2691 } 2692 free_the_label(&label); 2693 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_FAN1,&label,&valid) && 2694 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN1,&fan) && 2695 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN1_MIN,&min_rpm) && 2696 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN1_STATE,&state)) { 2697 if (valid) { 2698 print_label(label,10); 2699 if((int) state & 0x02) 2700 printf("\tfaulty\n"); 2701 else if (fan < min_rpm) 2702 printf("\t%6.0f RPM (not present or faulty)\n",fan); 2703 else 2704 printf("\t%+6.0f RPM \n",fan); 2705 } 2706 } 2707 free_the_label(&label); 2708 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_FAN2,&label,&valid) && 2709 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN2,&fan) && 2710 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN2_MIN,&min_rpm) && 2711 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN2_STATE,&state)) { 2712 if (valid) { 2713 print_label(label,10); 2714 if((int) state & 0x02) 2715 printf("\tfaulty\n"); 2716 else if (fan < min_rpm) 2717 printf("\t%6.0f RPM (not present or faulty)\n",fan); 2718 else 2719 printf("\t%+6.0f RPM \n",fan); 2720 } 2721 } 2722 free_the_label(&label); 2723 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_FAN3,&label,&valid) && 2724 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN3,&fan) && 2725 !sensors_get_feature(*name,SENSORS_FSCPOS_FAN3_STATE,&state)) { 2726 if (valid) { 2727 print_label(label,10); 2728 if((int) state & 0x02) 2729 printf("\tfaulty\n"); 2730 else 2731 printf("\t%+6.0f RPM \n",fan); 2732 } 2733 } 2734 free_the_label(&label); 2735 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_VOLTAGE1,&label,&valid) && 2736 !sensors_get_feature(*name,SENSORS_FSCPOS_VOLTAGE1,&voltage)) { 2737 if (valid) { 2738 print_label(label,10); 2739 printf("\t%+6.2f V\n",voltage); 2740 } 2741 } 2742 free_the_label(&label); 2743 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_VOLTAGE2,&label,&valid) && 2744 !sensors_get_feature(*name,SENSORS_FSCPOS_VOLTAGE2,&voltage)) { 2745 if (valid) { 2746 print_label(label,10); 2747 printf("\t%+6.2f V\n",voltage); 2748 } 2749 } 2750 free_the_label(&label); 2751 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_VOLTAGE3,&label,&valid) && 2752 !sensors_get_feature(*name,SENSORS_FSCPOS_VOLTAGE3,&voltage)) { 2753 if (valid) { 2754 print_label(label,10); 2755 printf("\t%+6.2f V\n",voltage); 2756 } 2757 } 2758 free_the_label(&label); 2759 } 2650 2760 2651 2761 void print_unknown_chip(const sensors_chip_name *name) lm-sensors/trunk/prog/sensors/chips.h
r1112 r1179 43 43 extern void print_lm87(const sensors_chip_name *name); 44 44 extern void print_it87(const sensors_chip_name *name); 45 extern void print_fscpos(const sensors_chip_name *name); 45 46 46 47 #endif /* def PROG_SENSORS_CHIPS_H */ lm-sensors/trunk/prog/sensors/main.c
r1126 r1179 334 334 else if (!strcmp(name.prefix,"eeprom")) 335 335 print_eeprom(&name); 336 else if (!strcmp(name.prefix,"fscpos")) 337 print_fscpos(&name); 336 338 else 337 339 print_unknown_chip(&name);
