Changeset 106

Show
Ignore:
Timestamp:
12/23/98 03:27:52 (10 years ago)
Author:
frodo
Message:

The announced changes to the LM78 voltages, and an example config file.

Note: GL518SM driver need this change, too; this is not yet done.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/INSTALL

    r100 r106  
    3131* MODDIR (/lib/modules/extra/misc) 
    3232  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. 
    3336* LIBDIR ($(PREFIX)/lib) 
    3437  The directory where 'make install' installs the shared and static libraries. 
     
    7982(the last is optional) from any directory to reach the same situation. 
    8083 
    81 This package also contains a library of functions which can be used to 
     84Do not panic if some (or all) of the values in the /proc/sys/dev/sensors/*/* 
     85files do not seem to correspond to anything in earlier versions. Starting 
     86with lm_sensors version 2.1.0, these files will reflect the real chip 
     87measurements, without any scaling or adjusting. This is most obvious for 
     88the voltage files. You can specify the conversion factors in a configuration 
     89file.  Use an application linked to libsensors to read these real values. 
     90 
     91This package contains a library of functions which can be used to 
    8292access sensor data in a more programmer-friendly way. It will be built as 
    8393both a shared and a static library, and installed in your LIB directory 
     
    8595called 'sensors.conf', and can be placed in /etc, /usr/lib/sensors, 
    8696/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/sensors directory.] 
     97config file documentation is written yet. A relatively well-commented 
     98example can be found in the etc directory.] 
    8999 
    90100Where version 1 of this package had the human-readable /proc/sensors file, 
  • lm-sensors/trunk/Makefile

    r99 r106  
    5757MODDIR := /lib/modules/extra/misc 
    5858 
     59# This is the directory where sensors.conf will be installed, if no other 
     60# configuration file is found 
     61ETCDIR := /etc 
     62 
    5963# You should not need to change this. It is the directory into which the 
    6064# library files (both static and shared) will be installed. 
     
    96100 
    97101# The subdirectories we need to build things in  
    98 SRCDIRS := src lib prog/sensors 
     102SRCDIRS := src lib prog/sensors etc 
    99103ifeq ($(I2C),1) 
    100104SRCDIRS += i2c i2c/detect i2c/drivers i2c/eeprom 
  • lm-sensors/trunk/README

    r100 r106  
    5454Because the SMBus is just a special case of the generalized I2C bus, we 
    5555can simulate the SMBus protocol on plain I2C busses. These busses are 
    56 sometimes used in other parts of your computer. If a supported chips is 
     56sometimes used in other parts of your computer. If a supported chip is 
    5757attached to one of these additional busses, they can be used too. 
    5858 
  • lm-sensors/trunk/README.directories

    r90 r106  
    88* doc 
    99  Documentation about the modules within this package 
     10* etc 
     11  Configuration files 
    1012* i2c 
    1113  Simon Vogl's i2c module, including any necessary patches, excluding any 
    1214  files which are removed by 'make clean'. 
    13 * src 
    14   Our own module code. 
    1515* lib 
    1616  The user-space sensors support library code 
    1717* prog 
    1818  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  
    6666 
    6767/* 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) 
    7370 
    7471#define FAN_TO_REG(val) ((val)==0?255:((1350000+(val))/((val)*2)) & 0xff) 
     
    8582#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) 
    8683 
    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. */ 
    8886#define LM78_INIT_IN_0 (vid==350?280:vid) 
    8987#define LM78_INIT_IN_1 (vid==350?280:vid) 
    9088#define LM78_INIT_IN_2 330 
    91 #define LM78_INIT_IN_3 500 
    92 #define LM78_INIT_IN_4 1200 
    93 #define LM78_INIT_IN_5 -1200 
    94 #define LM78_INIT_IN_6 -500 
     89#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) 
    9593 
    9694#define LM78_INIT_IN_PERCENTAGE 10 
  • lm-sensors/trunk/src/lm78.c

    r96 r106  
    6666 
    6767/* 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) 
    7370 
    7471#define FAN_TO_REG(val) ((val)==0?255:((1350000+(val))/((val)*2)) & 0xff) 
     
    8582#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) 
    8683 
    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. */ 
    8886#define LM78_INIT_IN_0 (vid==350?280:vid) 
    8987#define LM78_INIT_IN_1 (vid==350?280:vid) 
    9088#define LM78_INIT_IN_2 330 
    91 #define LM78_INIT_IN_3 500 
    92 #define LM78_INIT_IN_4 1200 
    93 #define LM78_INIT_IN_5 -1200 
    94 #define LM78_INIT_IN_6 -500 
     89#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) 
    9593 
    9694#define LM78_INIT_IN_PERCENTAGE 10