Changeset 106
- Timestamp:
- 12/23/98 03:27:52 (10 years ago)
- Files:
-
- lm-sensors/trunk/INSTALL (modified) (3 diffs)
- lm-sensors/trunk/Makefile (modified) (2 diffs)
- lm-sensors/trunk/README (modified) (1 diff)
- lm-sensors/trunk/README.directories (modified) (1 diff)
- lm-sensors/trunk/etc (added)
- lm-sensors/trunk/etc/Module.mk (added)
- lm-sensors/trunk/etc/sensors.conf.eg (added)
- lm-sensors/trunk/kernel/chips/lm78.c (modified) (2 diffs)
- lm-sensors/trunk/src/lm78.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/INSTALL
r100 r106 31 31 * MODDIR (/lib/modules/extra/misc) 32 32 The directory where 'make install' installs your modules. 33 * ETCDIR (/etc) 34 The directory where 'make install' installs the example configuration file 35 if none is found there. 33 36 * LIBDIR ($(PREFIX)/lib) 34 37 The directory where 'make install' installs the shared and static libraries. … … 79 82 (the last is optional) from any directory to reach the same situation. 80 83 81 This package also contains a library of functions which can be used to 84 Do not panic if some (or all) of the values in the /proc/sys/dev/sensors/*/* 85 files do not seem to correspond to anything in earlier versions. Starting 86 with lm_sensors version 2.1.0, these files will reflect the real chip 87 measurements, without any scaling or adjusting. This is most obvious for 88 the voltage files. You can specify the conversion factors in a configuration 89 file. Use an application linked to libsensors to read these real values. 90 91 This package contains a library of functions which can be used to 82 92 access sensor data in a more programmer-friendly way. It will be built as 83 93 both a shared and a static library, and installed in your LIB directory … … 85 95 called 'sensors.conf', and can be placed in /etc, /usr/lib/sensors, 86 96 /usr/local/lib/sensors, /usr/lib, or /usr/local/lib. [NOTE: No real 87 standard config file is written yet. A very simple example can be found in 88 the prog/sensorsdirectory.]97 config file documentation is written yet. A relatively well-commented 98 example can be found in the etc directory.] 89 99 90 100 Where version 1 of this package had the human-readable /proc/sensors file, lm-sensors/trunk/Makefile
r99 r106 57 57 MODDIR := /lib/modules/extra/misc 58 58 59 # This is the directory where sensors.conf will be installed, if no other 60 # configuration file is found 61 ETCDIR := /etc 62 59 63 # You should not need to change this. It is the directory into which the 60 64 # library files (both static and shared) will be installed. … … 96 100 97 101 # The subdirectories we need to build things in 98 SRCDIRS := src lib prog/sensors 102 SRCDIRS := src lib prog/sensors etc 99 103 ifeq ($(I2C),1) 100 104 SRCDIRS += i2c i2c/detect i2c/drivers i2c/eeprom lm-sensors/trunk/README
r100 r106 54 54 Because the SMBus is just a special case of the generalized I2C bus, we 55 55 can simulate the SMBus protocol on plain I2C busses. These busses are 56 sometimes used in other parts of your computer. If a supported chip sis56 sometimes used in other parts of your computer. If a supported chip is 57 57 attached to one of these additional busses, they can be used too. 58 58 lm-sensors/trunk/README.directories
r90 r106 8 8 * doc 9 9 Documentation about the modules within this package 10 * etc 11 Configuration files 10 12 * i2c 11 13 Simon Vogl's i2c module, including any necessary patches, excluding any 12 14 files which are removed by 'make clean'. 13 * src14 Our own module code.15 15 * lib 16 16 The user-space sensors support library code 17 17 * prog 18 18 Several supporting programs, some of them use the library, some do not. 19 * src 20 Our own module code. lm-sensors/trunk/kernel/chips/lm78.c
r96 r106 66 66 67 67 /* Conversions. Rounding is only done on the TO_REG variants. */ 68 static int lm78_in_conv[7] = {10000, 10000, 10000, 16892, 38000, 69 -34768, -15050 }; 70 #define IN_TO_REG(val,nr) (((((val) * 100000 / lm78_in_conv[nr]) + 8) / 16) \ 71 & 0xff) 72 #define IN_FROM_REG(val,nr) (((val) * 16 * lm78_in_conv[nr]) / 100000) 68 #define IN_TO_REG(val,nr) (((val) * 10 + 8)/16) 69 #define IN_FROM_REG(val,nr) (((val) * 16) / 10) 73 70 74 71 #define FAN_TO_REG(val) ((val)==0?255:((1350000+(val))/((val)*2)) & 0xff) … … 85 82 #define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) 86 83 87 /* Initial limits */ 84 /* Initial limits. To keep them sane, we use the 'standard' translation as 85 specified in the LM78 sheet. Use the config file to set better limits. */ 88 86 #define LM78_INIT_IN_0 (vid==350?280:vid) 89 87 #define LM78_INIT_IN_1 (vid==350?280:vid) 90 88 #define LM78_INIT_IN_2 330 91 #define LM78_INIT_IN_3 50092 #define LM78_INIT_IN_4 120093 #define LM78_INIT_IN_5 -120094 #define LM78_INIT_IN_6 -50089 #define LM78_INIT_IN_3 (((500) * 100)/168) 90 #define LM78_INIT_IN_4 (((1200) * 10)/38) 91 #define LM78_INIT_IN_5 (((-1200) * -604)/2100) 92 #define LM78_INIT_IN_6 (((-500) * -604)/909) 95 93 96 94 #define LM78_INIT_IN_PERCENTAGE 10 lm-sensors/trunk/src/lm78.c
r96 r106 66 66 67 67 /* Conversions. Rounding is only done on the TO_REG variants. */ 68 static int lm78_in_conv[7] = {10000, 10000, 10000, 16892, 38000, 69 -34768, -15050 }; 70 #define IN_TO_REG(val,nr) (((((val) * 100000 / lm78_in_conv[nr]) + 8) / 16) \ 71 & 0xff) 72 #define IN_FROM_REG(val,nr) (((val) * 16 * lm78_in_conv[nr]) / 100000) 68 #define IN_TO_REG(val,nr) (((val) * 10 + 8)/16) 69 #define IN_FROM_REG(val,nr) (((val) * 16) / 10) 73 70 74 71 #define FAN_TO_REG(val) ((val)==0?255:((1350000+(val))/((val)*2)) & 0xff) … … 85 82 #define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) 86 83 87 /* Initial limits */ 84 /* Initial limits. To keep them sane, we use the 'standard' translation as 85 specified in the LM78 sheet. Use the config file to set better limits. */ 88 86 #define LM78_INIT_IN_0 (vid==350?280:vid) 89 87 #define LM78_INIT_IN_1 (vid==350?280:vid) 90 88 #define LM78_INIT_IN_2 330 91 #define LM78_INIT_IN_3 50092 #define LM78_INIT_IN_4 120093 #define LM78_INIT_IN_5 -120094 #define LM78_INIT_IN_6 -50089 #define LM78_INIT_IN_3 (((500) * 100)/168) 90 #define LM78_INIT_IN_4 (((1200) * 10)/38) 91 #define LM78_INIT_IN_5 (((-1200) * -604)/2100) 92 #define LM78_INIT_IN_6 (((-500) * -604)/909) 95 93 96 94 #define LM78_INIT_IN_PERCENTAGE 10
