Changeset 2471

Show
Ignore:
Timestamp:
04/24/04 10:10:48 (5 years ago)
Author:
khali
Message:

Support the LM99 (and LM89).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/doc/chips/SUMMARY

    r2453 r2471  
    136136lm90 
    137137        lm90            2       -       -       -       yes     no 
     138        lm99            2       -       -       -       yes     no 
    138139        adm1032         2       -       -       -       yes     no 
     140        (lm89 is detected as an lm99) 
     141        lm89            2       -       -       -       yes     no 
    139142 
    140143lm92 
  • lm-sensors/trunk/doc/chips/lm90

    r2213 r2471  
    11Kernel driver `lm90.o' 
    2 ===================== 
     2====================== 
    33 
    4 Status: Complete and reasonably tested 
     4Status: Complete and well tested 
    55 
    66Supported chips:  
     
    1010    Datasheet: Publicly available at the National Semiconductor website 
    1111               http://www.national.com/pf/LM/LM90.html 
     12  * National Semiconductor LM89 
     13    Prefix: `lm99' 
     14    Addresses scanned: I2C 0x4c and 0x4d 
     15    Datasheet: Publicly available at the National Semiconductor website 
     16               http://www.national.com/pf/LM/LM89.html 
     17  * National Semiconductor LM99 
     18    Prefix: `lm99' 
     19    Addresses scanned: I2C 0x4c and 0x4d 
     20    Datasheet: Publicly available at the National Semiconductor website 
     21               http://www.national.com/pf/LM/LM99.html 
    1222  * Analog Devices ADM1032 
    1323    Prefix: `adm1032' 
     
    3343  List of adapter,address pairs which are unquestionably assumed to contain 
    3444  a `adm1032' chip 
     45* force_lm99: short array (min = 1, max = 48) 
     46  List of adapter,address pairs which are unquestionably assumed to contain 
     47  a `lm99' chip 
    3548* probe: short array (min = 1, max = 48) 
    3649  List of adapter,address pairs to scan additionally 
     
    4861The LM90 is a digital temperature sensor. It senses its own temperature as 
    4962well as the temperature of up to one external diode. It is compatible 
    50 with many other devices such as the LM86, the LM89, the ADM1032, the 
    51 MAX6657 and the MAX6658. Of these, only the ADM1032 is officially 
    52 supported for now, but the others can probably be successfully forced
     63with many other devices such as the LM86, the LM89, the LM99, the ADM1032, 
     64the MAX6657 and the MAX6658. Of these, only the ADM1032, LM89 and LM99 are 
     65supported for now, but the others can be forced (and later added)
    5366 
    5467The specificity of this family of chipsets over the ADM1021/LM84 
     
    5669increased resolution of the remote temperature measurement. 
    5770 
    58 The different chipsets of the family are not stricly identical, although 
     71The different chipsets of the family are not strictly identical, although 
    5972very similar. This driver doesn't handle any specific feature for now, 
    6073but could if there ever was a need for it. For reference, here comes a 
     
    6477  * Filter and alert configuration register at 0xBF. 
    6578  * ALERT is triggered by temperatures over critical limits. 
     79 
     80LM89: 
     81  * Same as LM90 
     82  * Better external channel accuracy 
     83   
     84LM99: 
     85  * Same as LM89 
     86  * External temperature shifted by 16 degrees down 
    6687 
    6788ADM1032: 
     
    7394All temperature values are given in degrees Celcius. Resolution 
    7495is 1.0 degree for the local temperature, 0.125 degree for the remote 
    75 temperature. According to the datasheets, the ADM1032 has a better 
    76 range and accuracy than the LM90 (but is also way more expensive). 
    77 See the datasheets for details. 
     96temperature. 
    7897 
    7998Each sensor has its own high and low limits, plus a critical limit. 
     
    92111------------- 
    93112 
    94 Chip 'lm90
     113Chips 'lm90', adm1032' and 'lm99
    95114 
    96115LABEL                 LABEL CLASS           COMPUTE CLASS          MODE  MAGN 
     
    103122tcrit1                temp1                 temp1                   RW     0 
    104123tcrit2                temp2                 temp2                   RW     0 
    105 hyst1                 tcrit1                tcrit1                  RW     0 
    106 hyst2                 tcrit2                tcrit2                  R-     0 
     124hyst1                 temp1                 temp1                   RW     0 
     125hyst2                 temp2                 temp2                   R-     0 
    107126alarms                -                     -                       R-     0 
    108127 
     
    119138hyst2                 SENSORS_LM90_REMOTE_TCRIT_HYST                    hyst2:1 
    120139alarms                SENSORS_LM90_ALARMS                              alarms:1 
    121  
    122 Chip 'adm1032' 
    123  
    124 LABEL                 LABEL CLASS           COMPUTE CLASS          MODE  MAGN 
    125 temp1                 -                     -                       R-     0 
    126 temp1_high            temp1                 temp1                   RW     0 
    127 temp1_low             temp1                 temp1                   RW     0 
    128 temp2                 -                     -                       R-     1 
    129 temp2_high            temp2                 temp2                   RW     1 
    130 temp2_low             temp2                 temp2                   RW     1 
    131 tcrit1                temp1                 temp1                   RW     0 
    132 tcrit2                temp2                 temp2                   RW     0 
    133 hyst1                 tcrit1                tcrit1                  RW     0 
    134 hyst2                 tcrit2                tcrit2                  R-     0 
    135 alarms                -                     -                       R-     0 
    136  
    137 LABEL                 FEATURE SYMBOL                              SYSCTL FILE:N 
    138 temp1                 SENSORS_LM90_LOCAL_TEMP                           temp1:3 
    139 temp1_high            SENSORS_LM90_LOCAL_HIGH                           temp1:1 
    140 temp1_low             SENSORS_LM90_LOCAL_LOW                            temp1:2 
    141 temp2                 SENSORS_LM90_REMOTE_TEMP                          temp2:3 
    142 temp2_high            SENSORS_LM90_REMOTE_HIGH                          temp2:1 
    143 temp2_low             SENSORS_LM90_REMOTE_LOW                           temp2:2 
    144 tcrit1                SENSORS_LM90_LOCAL_TCRIT                         tcrit1:1 
    145 tcrit2                SENSORS_LM90_REMOTE_TCRIT                        tcrit2:1 
    146 hyst1                 SENSORS_LM90_LOCAL_TCRIT_HYST                     hyst1:1 
    147 hyst2                 SENSORS_LM90_REMOTE_TCRIT_HYST                    hyst2:1 
    148 alarms                SENSORS_LM90_ALARMS                              alarms:1 
  • lm-sensors/trunk/kernel/chips/lm90.c

    r2445 r2471  
    22 * lm90.c - Part of lm_sensors, Linux kernel modules for hardware 
    33 *          monitoring 
    4  * Copyright (C) 2003  Jean Delvare <khali@linux-fr.org> 
     4 * Copyright (C) 2003-2004  Jean Delvare <khali@linux-fr.org> 
    55 * 
    66 * Based on the lm83 driver. The LM90 is a sensor chip made by National 
     
    1010 * obtained from National's website at: 
    1111 *   http://www.national.com/pf/LM/LM90.html 
     12 * 
     13 * This driver also supports the LM89 and LM99, two other sensor chips 
     14 * made by National Semiconductor. Both have an increased remote 
     15 * temperature measurement accuracy (1 degree), and the LM99 
     16 * additionally shifts remote temperatures (measured and limits) by 16 
     17 * degrees, which allows for higher temperatures measurement. The 
     18 * driver doesn't handle it since it can be done easily in user-space. 
     19 * Complete datasheets can be obtained from National's website at: 
     20 *   http://www.national.com/pf/LM/LM89.html 
     21 *   http://www.national.com/pf/LM/LM99.html 
     22 * Note that there is no way to differenciate between both chips. 
    1223 * 
    1324 * This driver also supports the ADM1032, a sensor chip made by Analog 
     
    5061 * Addresses to scan 
    5162 * Address is fully defined internally and cannot be changed. 
    52  */ 
    53  
    54 static unsigned short normal_i2c[] = { 0x4c, SENSORS_I2C_END }; 
     63 * LM89, LM90, LM99 and ADM1032 have address 0x4c. 
     64 * LM89-1, and LM99-1 have address 0x4d. 
     65 */ 
     66 
     67static unsigned short normal_i2c[] = { 0x4c, 0x4d, SENSORS_I2C_END }; 
    5568static unsigned short normal_i2c_range[] = { SENSORS_I2C_END }; 
    5669static unsigned int normal_isa[] = { SENSORS_ISA_END }; 
     
    6174 */ 
    6275 
    63 SENSORS_INSMOD_2(lm90, adm1032); 
     76SENSORS_INSMOD_3(lm90, adm1032, lm99); 
    6477 
    6578/* 
     
    326339                if (man_id == 0x01) /* National Semiconductor */ 
    327340                { 
    328                         if (chip_id >= 0x21 && chip_id < 0x30 /* LM90 */ 
    329                          && (kind == 0 /* skip detection */ 
    330                           || ((i2c_smbus_read_byte_data(new_client, 
    331                                 LM90_REG_R_CONFIG2) & 0xF8) == 0x00 
    332                            && reg_convrate <= 0x09))) 
     341                        u8 reg_config2; 
     342 
     343                        reg_config2 = i2c_smbus_read_byte_data(new_client, 
     344                                LM90_REG_R_CONFIG2); 
     345 
     346                        if (kind == 0 /* skip detection */ 
     347                         || ((reg_config2 & 0xF8) == 0x00 
     348                          && reg_convrate <= 0x09)) 
    333349                        { 
    334                                 kind = lm90; 
     350                                if (address == 0x4C 
     351                                 && (chip_id & 0xF0) == 0x20) /* LM90 */ 
     352                                { 
     353                                        kind = lm90; 
     354                                } 
     355                                else if ((chip_id & 0xF0) == 0x30) /* LM89/LM99 */ 
     356                                { 
     357                                        kind = lm99; 
     358                                } 
    335359                        } 
    336360                } 
    337361                else if (man_id == 0x41) /* Analog Devices */ 
    338362                { 
    339                         if ((chip_id & 0xF0) == 0x40 /* ADM1032 */ 
     363                        if (address == 0x4C 
     364                         && (chip_id & 0xF0) == 0x40 /* ADM1032 */ 
    340365                         && (kind == 0 /* skip detection */ 
    341366                          || (reg_config1 & 0x3F) == 0x00)) 
     
    361386                type_name = "adm1032"; 
    362387                client_name = "ADM1032 chip"; 
     388        } 
     389        else if (kind == lm99) 
     390        { 
     391                type_name = "lm99"; 
     392                client_name = "LM99 chip"; 
    363393        } 
    364394        else 
  • lm-sensors/trunk/lib/chips.c

    r2453 r2471  
    729729      RW, LM90_SYSCTL_REMOTE_TCRIT, VALUE(1), 0, "temp2_crit", 3 }, 
    730730    { SENSORS_LM90_LOCAL_TCRIT_HYST, "hyst1", 
    731       SENSORS_LM90_LOCAL_TCRIT, SENSORS_LM90_LOCAL_TCRIT
     731      SENSORS_LM90_LOCAL_TEMP, SENSORS_LM90_LOCAL_TEMP
    732732      RW, LM90_SYSCTL_LOCAL_HYST, VALUE(1), 0, "temp1_crit_hyst", 3 }, 
    733733    { SENSORS_LM90_REMOTE_TCRIT_HYST, "hyst2", 
    734       SENSORS_LM90_REMOTE_TCRIT, SENSORS_LM90_REMOTE_TCRIT
     734      SENSORS_LM90_REMOTE_TEMP, SENSORS_LM90_REMOTE_TEMP
    735735      R, LM90_SYSCTL_REMOTE_HYST, VALUE(1), 0, "temp2_crit_hyst", 3 }, 
    736736    { SENSORS_LM90_ALARMS, "alarms", 
     
    50325032 { SENSORS_LM90_PREFIX, lm90_features }, 
    50335033 { SENSORS_ADM1032_PREFIX, lm90_features }, 
     5034 { SENSORS_LM99_PREFIX, lm90_features }, 
    50345035 { SENSORS_XEONTEMP_PREFIX, xeontemp_features }, 
    50355036 { SENSORS_MAX6650_PREFIX, max6650_features }, 
  • lm-sensors/trunk/lib/chips.h

    r2453 r2471  
    444444#define SENSORS_LM85_ZONE3_SMOOTH          101  /* RW -- zone3_smooth  */ 
    445445 
    446 /* LM90/ADM1032 chips */ 
     446/* LM89/LM90/LM99/ADM1032 chips */ 
    447447 
    448448#define SENSORS_LM90_PREFIX "lm90" 
    449449#define SENSORS_ADM1032_PREFIX "adm1032" 
     450#define SENSORS_LM99_PREFIX "lm99" 
    450451 
    451452#define SENSORS_LM90_LOCAL_TEMP 51 /* R */ 
  • lm-sensors/trunk/mkpatch/Config.in

    r2241 r2471  
    3434    dep_tristate '  National Semiconductor LM85, Analog Devices ADM1027' CONFIG_SENSORS_LM85 $CONFIG_I2C $CONFIG_I2C_PROC 
    3535    dep_tristate '  National Semiconductor LM87' CONFIG_SENSORS_LM87 $CONFIG_I2C $CONFIG_I2C_PROC 
    36     dep_tristate '  National Semiconductor LM90, Analog Devices ADM1032' CONFIG_SENSORS_LM90 $CONFIG_I2C $CONFIG_I2C_PROC 
     36    dep_tristate '  National Semiconductor LM90 and compatibles' CONFIG_SENSORS_LM90 $CONFIG_I2C $CONFIG_I2C_PROC 
    3737    dep_tristate '  National Semiconductor LM92' CONFIG_SENSORS_LM92 $CONFIG_I2C $CONFIG_I2C_PROC 
    3838    dep_tristate '  Silicon Integrated Systems Corp. SiS5595' CONFIG_SENSORS_SIS5595 $CONFIG_I2C $CONFIG_I2C_PROC $CONFIG_I2C_ISA 
  • lm-sensors/trunk/mkpatch/mkpatch.pl

    r2441 r2471  
    489489CONFIG_SENSORS_LM90 
    490490  If you say yes here you get support for the National Semiconductor 
    491   LM90 and Analog Devices ADM1032 sensor chips.  This can also be 
    492   built as a module. 
     491  LM90, LM89 and LM99, and Analog Devices ADM1032 sensor chips.  This 
     492  can also be built as a module. 
    493493 
    494494  You will also need the latest user-space utilities: you can find 
  • lm-sensors/trunk/prog/sensors/main.c

    r2453 r2471  
    423423        { "lm90", print_lm90 }, 
    424424        { "adm1032", print_lm90 }, 
     425        { "lm99", print_lm90 }, 
    425426        { "xeontemp", print_xeontemp }, 
    426427        { "max6650", print_max6650 },