Changeset 1243
- Timestamp:
- 11/19/01 21:29:27 (7 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/CONTRIBUTORS (modified) (1 diff)
- lm-sensors/trunk/README (modified) (4 diffs)
- lm-sensors/trunk/doc/chips/SUMMARY (modified) (1 diff)
- lm-sensors/trunk/doc/chips/pcf8591 (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/pcf8591.c (added)
- 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
r1241 r1243 17 17 18 18 ----------------------------------------------------------------------------- 19 20 2.6.3 (2001????) 21 Library: Add PCF8591 support 22 Module pcf8591: new 23 Program sensors: Add PCF8591 support 24 Program sensors-detect: Add several Nvidia chips, add PCF8591 25 19 26 20 27 2.6.2 (20011118) lm-sensors/trunk/CONTRIBUTORS
r1179 r1243 65 65 * Hermann Jung <hej@odn.de> 66 66 Author of the fscpos driver. 67 * Aurelien Jarno <aurelien.jarno@laposte.net> 68 Author of the pcf8591 driver. lm-sensors/trunk/README
r1197 r1243 19 19 be the first to profit from new drivers and other changes. Have fun! 20 20 21 WARNING! You also need the latest i2c package,21 WARNING! You may also need the latest i2c package, 22 22 EVEN IF your kernel does contain i2c support!!!!!!!!!, 23 23 unless i2c came bundled with lm_sensors. 24 24 25 25 Kernels 2.3.34 and later, and all 2.4.x kernels, contain the 26 I2C package; however, you will still need to download and install 27 the latest I2C version if you want lm_sensors to compile. 26 I2C package. Kernel 2.4.13 contains i2c-2.6.1, which is sufficient 27 for most users. However, if you have problems compiling, 28 you may still need to download and install the latest I2C version. 28 29 29 30 See the lm_sensors download page for guidance: … … 53 54 Dallas Semiconductor DS75, DS1621, DS1625, DS1775, and DS1780 54 55 Hewlett Packard Maxilife (several revisions including '99 NBA) 55 Fujitsu Siemens Poseidon Chip56 Fujitsu Siemens Poseidon, Scylla 56 57 Genesys Logic GL518SM (rev 00, 80), GL520SM, GL523SM 57 58 Intel Xeon processor embedded sensors … … 74 75 Intel Xeon processor embedded EEPROMs 75 76 DDC Monitor embedded EEPROMs 77 Philips Semiconductors PCF8591 78 79 80 See our New Drivers page http://www.lm-sensors.nu/~lm78/newdrivers.html 81 for the latest information on supported devices. 76 82 77 83 … … 79 85 chip listed on our 'new drivers' page, and are willing to help us out, 80 86 please contact us. Even if you have no programming knowledge, you could 81 help us by running new modules and reporting on the results and output. 87 help us by running new modules and reporting on the results and output. 82 88 If you want to offer more substantial help, this is very welcome too, of 83 89 course. lm-sensors/trunk/doc/chips/SUMMARY
r1218 r1243 162 162 Simple eight-bit parallel I/O 163 163 164 pcf8591 165 Quad A/D + one D/A 166 164 167 165 168 ----------------------------------------------------------------------------- lm-sensors/trunk/etc/sensors.conf.eg
r1216 r1243 1175 1175 label voltbatt "+3.3V" 1176 1176 1177 1178 chip "pcf8591-*" 1179 # 1180 # values for the Philips PCF8574 chip 1181 # 1182 # Analog inputs 1183 1184 ignore ain_conf 1185 set ain_conf 0 1186 label ch0 "Chan. 0" 1187 label ch1 "Chan. 1" 1188 label ch2 "Chan. 2" 1189 label ch3 "Chan. 3" 1190 1191 # Analog output 1192 1193 ignore aout_enable 1194 set aout_enable 1 1195 label aout "Output" 1196 set aout 0 1197 lm-sensors/trunk/kernel/chips/Module.mk
r1221 r1243 25 25 # defined value verbatim into the command-list of rules... 26 26 # These targets are NOT included in 'mkpatch' ... 27 KERNELCHIPSTARGETS := 27 KERNELCHIPSTARGETS := $(MODULE_DIR)/pcf8591.o 28 28 29 29 # These targets ARE included in 'mkpatch', except for LTC1710, which we lm-sensors/trunk/lib/chips.c
r1230 r1243 2454 2454 }; 2455 2455 2456 static sensors_chip_feature pcf8591_features[] = 2457 { 2458 { SENSORS_PCF8591_AIN_CONF, "ain_conf", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2459 SENSORS_MODE_RW, PCF8591_SYSCTL_AIN_CONF, VALUE(1), 0 }, 2460 { SENSORS_PCF8591_CH0, "ch0", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2461 SENSORS_MODE_R, PCF8591_SYSCTL_CH0, VALUE(1), 0 }, 2462 { SENSORS_PCF8591_CH1, "ch1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2463 SENSORS_MODE_R, PCF8591_SYSCTL_CH1, VALUE(1), 0 }, 2464 { SENSORS_PCF8591_CH2, "ch2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2465 SENSORS_MODE_R, PCF8591_SYSCTL_CH2, VALUE(1), 0 }, 2466 { SENSORS_PCF8591_CH3, "ch3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2467 SENSORS_MODE_R, PCF8591_SYSCTL_CH3, VALUE(1), 0 }, 2468 { SENSORS_PCF8591_AOUT_ENABLE, "aout_enable", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2469 SENSORS_MODE_RW, PCF8591_SYSCTL_AOUT_ENABLE, VALUE(1), 0 }, 2470 { SENSORS_PCF8591_AOUT, "aout", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 2471 SENSORS_MODE_RW, PCF8591_SYSCTL_AOUT, VALUE(1), 0 }, 2472 { 0 } 2473 }; 2474 2475 2456 2476 sensors_chip_features sensors_chip_features_list[] = 2457 2477 { … … 2503 2523 { SENSORS_FSCPOS_PREFIX, fscpos_features }, 2504 2524 { SENSORS_FSCSCY_PREFIX, fscscy_features }, 2525 { SENSORS_PCF8591_PREFIX, pcf8591_features }, 2505 2526 { 0 } 2506 2527 }; lm-sensors/trunk/lib/chips.h
r1234 r1243 1114 1114 #define SENSORS_FSCSCY_WDOG_CONTROL 52 /* RW */ 1115 1115 1116 /* PCF8591 chip. */ 1117 1118 #define SENSORS_PCF8591_PREFIX "pcf8591" 1119 1120 #define SENSORS_PCF8591_AIN_CONF 1 /* RW */ 1121 #define SENSORS_PCF8591_CH0 2 /* R */ 1122 #define SENSORS_PCF8591_CH1 3 /* R */ 1123 #define SENSORS_PCF8591_CH2 4 /* R */ 1124 #define SENSORS_PCF8591_CH3 5 /* R */ 1125 #define SENSORS_PCF8591_AOUT_ENABLE 6 /* RW */ 1126 #define SENSORS_PCF8591_AOUT 7 /* RW */ 1116 1127 1117 1128 lm-sensors/trunk/prog/detect/sensors-detect
r1242 r1243 519 519 via686a_isa_detect adm1022_detect ltc1710_detect gl525sm_detect 520 520 lm87_detect ite_detect ite_isa_detect ite_alias_detect 521 ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect fscscy_detect); 521 ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect fscscy_detect 522 pcf8591_detect); 522 523 523 524 # This is a list of all recognized chips. … … 806 807 i2c_addrs => [0x73], 807 808 i2c_detect => sub { fscscy_detect @_ }, 809 }, 810 { 811 name => "Philips Semiconductors PCF8591", 812 driver => "pcf8591", 813 i2c_addrs => [0x48..0x4f], 814 i2c_detect => sub { pcf8591_detect @_}, 808 815 }, 809 816 ); … … 2329 2336 } 2330 2337 2338 # $_[0]: A reference to the file descriptor to access this chip. 2339 # We may assume an i2c_set_slave_addr was already done. 2340 # $_[1]: Address 2341 # Returns: undef if not detected, (1) if detected. 2342 # Detection is impossible! 2343 sub pcf8591_detect 2344 { 2345 return (1); 2346 } 2347 2348 2331 2349 ################ 2332 2350 # MAIN PROGRAM # lm-sensors/trunk/prog/sensors/chips.c
r1229 r1243 2928 2928 } 2929 2929 2930 void print_pcf8591(const sensors_chip_name *name) 2931 { 2932 char *label; 2933 double ain_conf, ch0, ch1, ch2, ch3; 2934 double aout_enable, aout; 2935 int valid; 2936 2937 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_AIN_CONF,&label,&valid) && 2938 !sensors_get_feature(*name,SENSORS_PCF8591_AIN_CONF,&ain_conf)) { 2939 if (valid) { 2940 print_label(label,10); 2941 switch ((int)ain_conf) 2942 { 2943 case 0: printf("four single ended inputs\n"); 2944 break; 2945 case 1: printf("three differential inputs\n"); 2946 break; 2947 case 2: printf("single ended and differential mixed\n"); 2948 break; 2949 case 3: printf("two differential inputs\n"); 2950 break; 2951 } 2952 } 2953 } 2954 else printf("ERROR: Can't read analog inputs configuration!\n"); 2955 free_the_label(&label); 2956 2957 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_CH0,&label,&valid) && 2958 !sensors_get_feature(*name,SENSORS_PCF8591_CH0,&ch0)) { 2959 if (valid) { 2960 print_label(label,10); 2961 printf("%0.0f\n", ch0); 2962 } 2963 } 2964 else printf("ERROR: Can't read ch0!\n"); 2965 free_the_label(&label); 2966 2967 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_CH1,&label,&valid) && 2968 !sensors_get_feature(*name,SENSORS_PCF8591_CH1,&ch1)) { 2969 if (valid) { 2970 print_label(label,10); 2971 printf("%0.0f\n", ch1); 2972 } 2973 } 2974 else printf("ERROR: Can't read ch1!\n"); 2975 free_the_label(&label); 2976 2977 if (ain_conf != 3) { 2978 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_CH2,&label,&valid) && 2979 !sensors_get_feature(*name,SENSORS_PCF8591_CH2,&ch2)) { 2980 if (valid) { 2981 print_label(label,10); 2982 printf("%0.0f\n", ch2); 2983 } 2984 } 2985 else printf("ERROR: Can't read ch2!\n"); 2986 free_the_label(&label); 2987 } 2988 2989 if (ain_conf == 0) { 2990 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_CH3,&label,&valid) && 2991 !sensors_get_feature(*name,SENSORS_PCF8591_CH3,&ch3)) { 2992 if (valid) { 2993 print_label(label,10); 2994 printf("%0.0f\n", ch3); 2995 } 2996 } 2997 else printf("ERROR: Can't read ch3!\n"); 2998 free_the_label(&label); 2999 } 3000 3001 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_AOUT,&label,&valid) && 3002 !sensors_get_feature(*name,SENSORS_PCF8591_AOUT,&aout) && 3003 !sensors_get_feature(*name,SENSORS_PCF8591_AOUT_ENABLE,&aout_enable)) { 3004 if (valid) { 3005 print_label(label,10); 3006 printf("%0.0f (%s)\n", aout, aout_enable?"enabled":"disabled"); 3007 } 3008 } 3009 else printf("ERROR: Can't read aout!\n"); 3010 free_the_label(&label); 3011 3012 } 3013 3014 2930 3015 void print_unknown_chip(const sensors_chip_name *name) 2931 3016 { lm-sensors/trunk/prog/sensors/chips.h
r1220 r1243 45 45 extern void print_fscpos(const sensors_chip_name *name); 46 46 extern void print_fscscy(const sensors_chip_name *name); 47 extern void print_pcf8591(const sensors_chip_name *name); 47 48 48 49 #endif /* def PROG_SENSORS_CHIPS_H */ lm-sensors/trunk/prog/sensors/main.c
r1233 r1243 338 338 else if (!strcmp(name.prefix,"fscscy")) 339 339 print_fscscy(&name); 340 else if (!strcmp(name.prefix,"pcf8591")) 341 print_pcf8591(&name); 340 342 else 341 343 print_unknown_chip(&name);
