Changeset 210

Show
Ignore:
Timestamp:
02/10/99 00:57:27 (14 years ago)
Author:
frodo
Message:

Documentation updates, small bug fixes

I am trying to create a more-or-less standard documentation format for
doc/chips/* files. I am not quite satisfied with the lm75 and lm78 docs
yet, but it is starting to come. Basically, I want as much information
in it as possible, and to generate most of it automatically. But that is
harder than I though it would be.

Also, a small library bugfix (class problem) and a doc-features fix.

Location:
lm-sensors/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/doc/chips/lm75

    r108 r210  
    1 This file documents the lm75 directories. 
     1Kernel driver `lm75.o' 
    22 
    3 There will be one directory created for each detected LM75 chip. As LM75 
    4 chips can only be on a SMBus, they will be called lm75-i2c-?-??, with 
    5 the first question mark being the number of the i2c bus (see /proc/bus/i2c 
    6 for a list of them, if i2c-proc is loaded), and the SMBus (I2C) address 
    7 of the chip at the end. An LM75 is uniquely characterised with these 
    8 two numbers. /proc/sys/dev/sensors/chips contains the SYSCTL values for 
    9 all chip directories. 
     3Prefixes: lm75 (LM75, I2C) 
    104 
    11 Within each LM75 directory, you can find the following files: 
    12 * temp (LM75_SYSCTL_TEMP) 
    13   A list of three numbers. The first number is the Overtemperature Shutdown 
    14   value, the second number is Hysteris value, and the third number is the 
    15   current temperature. The first two values can be modified. Each value can 
    16   be set and read to half-degree accuracy. All values are in degrees Celcius. 
    17   An alarm is issued (usually to a connected LM78) when the temperature  
    18   gets higher then the Overtemperature Shutdown value; it stays on until 
    19   the temperature falls below the Hysteris value. 
    20   If accessed through sysctl, this is a list of longs, each being the 
    21   temperature times 10. 
     5This driver implements support for the National Semiconductor LM75, a 
     6`Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface'. 
    227 
    23 The data for each LM75 is updated each 1.5 seconds, but only if it is actually 
    24 read. 
     8The LM75 implements one temperature sensor. Limits can be set through the 
     9Overtemperature Shutdown register and Hysteris register. Each value can be  
     10set and read to half-degree accuracy. 
     11An alarm is issued (usually to a connected LM78) when the temperature 
     12gets higher then the Overtemperature Shutdown value; it stays on until 
     13the temperature falls below the Hysteris value. 
     14All temperatures are in degrees Celcius. 
     15 
     16The LM75 only updates its values each 1.5 seconds; reading it more often 
     17will do no harm, but will return 'old' values. 
     18 
     19 
     20/proc and sysctl interface files: 
     21  * temp (LM75_SYSCTL_TEMP) 
     22    Overtemperature Shutdown Value (RW,1), Hysteris Value (RW,1) and Current  
     23    Temperature (R,1). 
     24 
     25configuration file features: 
     26               NAME        LABEL CLASS     COMPUTE CLASS   RW 
     27               temp:                                       R  
     28          temp_hyst:              temp              temp   RW 
     29          temp_over:              temp              temp   RW 
  • lm-sensors/trunk/doc/chips/lm78

    r108 r210  
    1 This file documents the lm78 directories. 
     1Kernel driver `lm78.o' 
    22 
    3 There will be one directory created for each detected LM78, LM78-J or LM79 
    4 chip. Each chip can both be on the ISA bus and the SMBus. Directories 
    5 are called things like lm78-isa-0290, lm78-j-i2c-3-4e or lm79-isa-0280. 
    6 /proc/sys/dev/sensors/chips contains the SYSCTL values for all chip 
    7 directories. 
     3Prefixes: lm78   (LM78,   I2C and ISA) 
     4          lm78-j (LM78-J, I2C and ISA) 
     5          lm79   (LM79,   I2C and ISA) 
    86 
    9 Within each LM78 directory, you can find the following files: 
    10 * alarms (LM78_SYSCTL_ALARMS) 
    11   A number which indicates which alarms are on. An alarm gets triggered when 
    12   some limit has been crossed. Even if the cause of the alarm is over, it 
    13   stays triggered until it has been read at least once. Because the LM78 
    14   values are updated at most once every 1.5 seconds, this means the alarm 
    15   can be read several times before it is erased. 
    16   This file can not be written to. 
    17   The number is the logical OR of the following components: 
    18   - LM78_ALARM_IN[0-6] 
    19     Gets triggered when the corresponding in value is higher or lower than 
    20     its limits 
    21   - LM78_ALARM_FAN[1-3] 
    22     Gets triggered when the corresponding fan value is lower than its limit 
    23   - LM78_ALARM_TEMP 
    24     Gets triggered when the temp value has crossed its limits. See the  
    25     description under temp. 
    26   - LM78_ALARM_BTI 
    27     Gets triggered if some other chip which is connected to it has crossed 
    28     its limits. Usually, it is connected to all LM75 chips; if at least one 
    29     crosses its limits, this bit gets set. 
    30   - LM78_ALARM_CHAS 
    31     Gets triggered if someone opens your computer case (if connected at all). 
    32   - LM78_ALARM_FIFO 
    33     Gets triggered if something is very wrong with our LM78 driver. Ignore. 
    34   - LM78_ALARM_SMI_IN 
    35     Gets triggered if some other chip has triggered a SMI interrupt. Can be 
    36     ignored. 
    37   If accessed through sysctl, this value is a long. 
    38 * fan[1-3] (LM78_SYSCTL_FAN[1-3]) 
    39   A list of two numbers. The first is the minimum fan rotation limit; the 
    40   second is the current fan rotation speed. Both are in RPM (rotation per 
    41   minute). An alarm is triggered if the rotation speed drops below the 
    42   limit. The first value can be changed. Not all RPM values can accurately 
    43   be represented, so some rounding is done. 
    44   If accessed through sysctl, this is a list of longs. 
    45 * fan_div (LM78_SYSCTL_FAN_DIV) 
    46   A list of three numbers, one for each fan. Each number can be either 1, 2, 
    47   4 or 8. It is the internal scaling factor used for the FAN rotations. If 
    48   you change this number, the FAN readings get more or less detailed, but 
    49   the range in which they can be read too. Higher numbers give better  
    50   resolution, but less range. The first two numbers can be changed, the 
    51   third not. 
    52   If accessed through sysctl, this is a list of longs. 
    53 * in[0-6] (LM78_SYSCTL_IN[0-6]) 
    54   A list of three numbers. The first is the minimum limit, the second is the 
    55   maximum limit, and the third is the current value. If you have a weird 
    56   mainboard, all values may be off because some other scaling factor has 
    57   to be used; user-space programs should compensate for this. Note that 
    58   minimum means 'closest to zero'; so if the normal value equals -10, a 
    59   minimum could equal -9, and a maximum -11. IN0 and IN1 reflect core 
    60   voltages; they are by default set from the vid values, or set to 2.80V 
    61   if the vid lines seem to be unconnected. IN2 should equal +3.30V, 
    62   IN3 +5.00V, IN4 +12.00V, IN5 -12.00V and IN6 -5V. Not all voltage values 
    63   can be accurately represented, so some rounding is done. 
    64   The first two numbers can be changed, the third not. 
    65   If accessed through sysctl, this is a list of longs, each being the voltage 
    66   times 100. 
    67 * temp 
    68   A list of three numbers. The first number is the Overtemperature Shutdown 
    69   value; the second is the Hysteris value and the third number is the 
    70   current value. The first two values can be modified. All values are in 
    71   degrees Celcius. An alarm is issued when the temperature first gets above 
    72   the Overtemperature Shutdown value; no more alarms are issued until the 
    73   temperature gets below the Hysteris value, at which moment another alarm 
    74   is issued, and the state is reset. A more useful behaviour can be found 
    75   by setting the Hysteris value to +127 degrees Celcius; in this case,  
    76   alarms are issued during all the time when the actual temperature is  
    77   above the Overtemperature Shutdown value. 
    78   The first two numbers can be changed, the third not. 
    79   If accessed through sysctl, this is a list of longs, each being the 
    80   temperature in degrees Celcius times 10. 
    81 * vid 
    82   The core voltage value (the voltage level your processor should work with), 
    83   in volts. This is the value IN0 and IN1 are initialized to. If unconnected, 
    84   it usually reads 3.50V. 
    85   This number can not be changed. 
    86   If accessed through sysctl, this is a long, being the voltage times 100. 
     7This driver implements support for the National Semiconductor LM78, LM78-J 
     8and LM79. They are described as `Microprocessor System Hardware Monitors'. 
    879 
    88 The data for each LM78 is updated each 1.5 seconds, but only if it is actually 
    89 read. 
     10There is almost no difference between these three chips. Functionally, the 
     11LM78 and LM78-J are exactly identical. The LM79 has one more VID line, 
     12which is used to report the lower voltages newer Pentium processors use. 
     13From now on, LM7* means either of these three types. 
     14 
     15The LM7* implements one temperatur sensor, three FAN rotation speed sensors, 
     16seven voltage sensors, VID lines, alarms, and some miscellaneous stuff. 
     17 
     18Temperatures are measured in degrees Celcius. An alarm is triggered once 
     19when the Overtemperature Shutdown limit is crossed; it is triggered again 
     20as soon as it drops below the Hysteris value.  A more useful behaviour  
     21can be found by setting the Hysteris value to +127 degrees Celcius; in  
     22this case, alarms are issued during all the time when the actual temperature \ 
     23is above the Overtemperature Shutdown value. 
     24 
     25FAN rotation speeds are reported in RPM (rotations per minute). An alarm is 
     26triggered if the rotation speed has dropped below a programmable limit. FAN  
     27readings can be divided by a programmable divider (1, 2, 4 or 8) to give 
     28the readings more range or accuracy. This is imporatant because some FANs 
     29report only one 'tick' each rotation, while others report two - making 
     30all readings twice as high. Not all RPM values can accurately be represented, 
     31so some rounding is done. 
     32 
     33Voltage sensors (also known as IN sensors) report their values in volts. 
     34An alarm is triggered if the voltage has crossed a programmable minimum  
     35or maximum limit. Note that minimum in this case always means 'closest to 
     36zero'; this is important for negative voltage measurements. 
     37 
     38The VID lines encode the core voltage value: the voltage level your processor  
     39should work with. This is hardcoded by the mainboard and/or processor itself. 
     40It is a value in volts. 
     41 
     42In addition to the alarms described above, there are a couple of additional 
     43ones. There is a BTI alarm, which gets triggered when an external chip has 
     44crossed its limits. Usually, this is connected to all LM75 chips; if at 
     45least one crosses its limits, this bit gets set. The CHAS alarm triggers 
     46if your computer case is open. The FIFO alarms should never trigger; it 
     47indicates an internal error. The SMI_IN alarm indicates some other chip 
     48has triggered an SMI interrupt. As we do not use SMI interrupts at all, 
     49this condition usually indicates there is a problem with some other  
     50device. 
     51 
     52If an alarm triggers, it will remain triggered until the hardware register 
     53 is read at least once. This means that the cause for the alarm may  
     54already have disappeared!  Note that in the current implementation, all 
     55hardware registers are read whenever any data is read (unless it is less 
     56than 1.5 seconds since the last update). This means that you can easily 
     57miss once-only alarms. 
     58 
     59The LM7* only updates its values each 1.5 seconds; reading it more often 
     60will do no harm, but will return 'old' values. 
     61 
     62 
     63/proc and sysctl interface files: 
     64  * alarms (LM78_SYSCTL_ALARMS) 
     65    A single number (R,0) which indicates which alarms are currently  
     66    triggered.  It is a logical OR of the following bit values: 
     67      LM78_ALARM_BTI, LM78_ALARM_CHAS, LM78_ALARM_FIFO, LM78_ALARM_SMI_IN, 
     68      LM78_ALARMS_IN[0-6], LM78_ALARM_FAN[1-3], LM78_ALARM_TEMP 
     69  * fan[1-3] (LM78_SYSCTL_FAN[1-3]) 
     70    The Fan Low Limit (RW,0) and Current Fan Reading (R,0). 
     71  * fan_div (LM78_SYSCTL_FAN_DIV) 
     72    The FAN1 Scaling Factor (RW,0), FAN2 Scaling Factor (RW,0) and FAN3 Scaling 
     73    Factor (RW,0). 
     74  * in[0-6] (LM78_SYSCTL_IN[0-6]) 
     75    The Voltage Low Limit (RW,2), Voltage High Limit (RW,2) and Current 
     76    Voltage Reading (R,2). 
     77  * temp 
     78    The Overtemperature Shutdown Value (RW,1), Hysteris Value (RW,1) and 
     79    Current Temperature (R,1). 
     80  * vid 
     81    The Core Voltage Value (R,2). 
     82 
     83 
     84configuration file features: 
     85 
     86               NAME        LABEL CLASS     COMPUTE CLASS   RW 
     87             alarms:                                       R  
     88               fan1:                                       R  
     89           fan1_div:              fan1                     RW 
     90           fan1_min:              fan1                     RW 
     91               fan2:                                       R  
     92           fan2_div:              fan2                     RW 
     93           fan2_min:              fan2                     RW 
     94               fan3:                                       R  
     95           fan3_div:              fan3                     R  
     96           fan3_min:              fan3                     RW 
     97                in0:                                       R  
     98            in0_max:               in0               in0   RW 
     99            in0_min:               in0               in0   RW 
     100                in1:                                       R  
     101            in1_max:               in1               in1   RW 
     102            in1_min:               in1               in1   RW 
     103                in2:                                       R  
     104            in2_max:               in2               in2   RW 
     105            in2_min:               in2               in2   RW 
     106                in3:                                       R  
     107            in3_max:               in3               in3   RW 
     108            in3_min:               in3               in3   RW 
     109                in4:                                       R  
     110            in4_max:               in4               in4   RW 
     111            in4_min:               in4               in4   RW 
     112                in5:                                       R  
     113            in5_max:               in5               in5   RW 
     114            in5_min:               in5               in5   RW 
     115                in6:                                       R  
     116            in6_max:               in6               in6   RW 
     117            in6_min:               in6               in6   RW 
     118               temp:                                       R  
     119          temp_hyst:              temp              temp   RW 
     120          temp_over:              temp              temp   RW 
     121                vid:                                       R  
  • lm-sensors/trunk/lib/chips.c

    r207 r210  
    8989    { SENSORS_LM78_FAN3, "fan3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
    9090                         SENSORS_MODE_R, LM78_SYSCTL_FAN3, VALUE(2), 0 }, 
    91     { SENSORS_LM78_FAN1_MIN, "fan1_min", SENSORS_LM78_FAN1, SENSORS_NO_MAPPING, 
     91    { SENSORS_LM78_FAN1_MIN, "fan1_min", SENSORS_LM78_FAN1, SENSORS_LM78_FAN1, 
    9292                             SENSORS_MODE_RW, LM78_SYSCTL_FAN1, VALUE(1), 0 }, 
    93     { SENSORS_LM78_FAN2_MIN, "fan2_min", SENSORS_LM78_FAN2, SENSORS_NO_MAPPING, 
     93    { SENSORS_LM78_FAN2_MIN, "fan2_min", SENSORS_LM78_FAN2, SENSORS_LM78_FAN2, 
    9494                             SENSORS_MODE_RW, LM78_SYSCTL_FAN2, VALUE(1), 0 }, 
    95     { SENSORS_LM78_FAN3_MIN, "fan3_min", SENSORS_LM78_FAN3, SENSORS_NO_MAPPING, 
     95    { SENSORS_LM78_FAN3_MIN, "fan3_min", SENSORS_LM78_FAN3, SENSORS_LM78_FAN3, 
    9696                             SENSORS_MODE_RW, LM78_SYSCTL_FAN3, VALUE(1), 0 }, 
    9797    { SENSORS_LM78_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
     
    170170                          SENSORS_MODE_R, LM78_SYSCTL_FAN3, VALUE(2), 0 }, 
    171171    { SENSORS_LM78J_FAN1_MIN, "fan1_min", SENSORS_LM78J_FAN1, 
    172                               SENSORS_NO_MAPPING, SENSORS_MODE_RW,  
     172                              SENSORS_LM78J_FAN1, SENSORS_MODE_RW,  
    173173                              LM78_SYSCTL_FAN1, VALUE(1), 0 }, 
    174174    { SENSORS_LM78J_FAN2_MIN, "fan2_min", SENSORS_LM78J_FAN2, 
    175                               SENSORS_NO_MAPPING, SENSORS_MODE_RW,  
     175                              SENSORS_LM78J_FAN2, SENSORS_MODE_RW,  
    176176                              LM78_SYSCTL_FAN2, VALUE(1), 0 }, 
    177177    { SENSORS_LM78J_FAN3_MIN, "fan3_min", SENSORS_LM78J_FAN3, 
    178                               SENSORS_NO_MAPPING, SENSORS_MODE_RW,  
     178                              SENSORS_LM78J_FAN3, SENSORS_MODE_RW,  
    179179                              LM78_SYSCTL_FAN3, VALUE(1), 0 }, 
    180180    { SENSORS_LM78J_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
     
    252252    { SENSORS_LM79_FAN3, "fan3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
    253253                         SENSORS_MODE_R, LM78_SYSCTL_FAN3, VALUE(2), 0 }, 
    254     { SENSORS_LM79_FAN1_MIN, "fan1_min", SENSORS_LM79_FAN1, SENSORS_NO_MAPPING, 
     254    { SENSORS_LM79_FAN1_MIN, "fan1_min", SENSORS_LM79_FAN1, SENSORS_LM79_FAN1, 
    255255                             SENSORS_MODE_RW, LM78_SYSCTL_FAN1, VALUE(1), 0 }, 
    256     { SENSORS_LM79_FAN2_MIN, "fan2_min", SENSORS_LM79_FAN2, SENSORS_NO_MAPPING, 
     256    { SENSORS_LM79_FAN2_MIN, "fan2_min", SENSORS_LM79_FAN2, SENSORS_LM79_FAN2, 
    257257                             SENSORS_MODE_RW, LM78_SYSCTL_FAN2, VALUE(1), 0 }, 
    258     { SENSORS_LM79_FAN3_MIN, "fan3_min", SENSORS_LM79_FAN3, SENSORS_NO_MAPPING, 
     258    { SENSORS_LM79_FAN3_MIN, "fan3_min", SENSORS_LM79_FAN3, SENSORS_LM79_FAN3, 
    259259                             SENSORS_MODE_RW, LM78_SYSCTL_FAN3, VALUE(1), 0 }, 
    260260    { SENSORS_LM79_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
  • lm-sensors/trunk/prog/doc/doc-features.c

    r208 r210  
    5252                  const sensors_chip_features *chipdata) 
    5353{ 
    54   printf("  %17s: %17s %17s   %2s   %2d\n",featuredata->name, 
     54  printf("  %17s: %17s %17s   %2s\n",featuredata->name, 
    5555         lookup_feature_name(featuredata->logical_mapping,chipdata), 
    5656         lookup_feature_name(featuredata->compute_mapping,chipdata), 
    57          mode_string(featuredata->mode), 
    58          featuredata->scaling); 
     57         mode_string(featuredata->mode)); 
    5958} 
    6059 
     
    7877 
    7978  printf("Chip `%s'\n",chipdata->prefix); 
    80   printf("  %17s  %17s %17s   %2s   %s\n","NAME","LABEL CLASS","COMPUTE CLASS", 
    81          "RW","SCALE"); 
     79  printf("  %17s  %17s %17s   %2s\n","NAME","LABEL CLASS","COMPUTE CLASS", 
     80         "RW"); 
    8281  for (i = 0; features[i]->name; i++) 
    8382    dump_feature(features[i],chipdata);