Changeset 532

Show
Ignore:
Timestamp:
08/22/99 19:52:38 (9 years ago)
Author:
mds
Message:

(mds) add lm81 support to the adm9240 driver.

Files:

Legend:

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

    r430 r532  
    2424  Author of the i2c-via and sis5595 drivers. 
    2525* Mark D. Studebaker <mds@eng.paradyne.com> 
    26   Author of the i2c-ali15x3 driver, as well as other drivers. 
     26  Author of the i2c-ali15x3 bus driver and the i2c-i810 bus driver. 
     27  Added w83782d, w83783s, and w83627hf support to the w83781d driver. 
     28  Added max1617 support to the adm1021 driver. 
     29  Added lm81 support to the adm9240 driver. 
     30  Author of the decode-xeon.pl xeon EEPROM decoder. 
    2731* Geert Uytterhoeven <geert@linux-m68k.org> 
    2832  Author of the i2c-hydra driver. 
  • lm-sensors/trunk/README

    r530 r532  
    2424At least the following SMBus adapters are supported: 
    2525  Intel PIIX4 (used in most Intel chipsets) 
    26   Intel ICH (used Intel 810 chipsets for Celeron processors) 
     26  Intel ICH (used in Intel 810 chipsets for Celeron processors) 
    2727  Acer Labs M1541 and M1543C (used in the Aladdin IV, V and Pro 2 chipsets) 
    2828  VIA Technologies 82C586B (used in most VIA chipsets) 
    2929 
    3030At least the following hardware sensor chips are supported: 
    31   National Semicoductor LM75, LM78, LM78-J, LM79 and LM80 
     31  National Semicoductor LM75, LM78, LM78-J, LM79. LM80, and LM81 
    3232  Winbond W83781D, W83782D, W83783S, and W83627HF 
    3333  Genesys Logic GL518SM (several revisions) 
     
    4343  Linear Technologies LTC1710 
    4444  Dimms with EEPROMs 
     45  Intel Xeon processor embedded EEPROMs 
    4546 
    4647We could use some testers of hardware. If you own a specific monitoring 
  • lm-sensors/trunk/doc/chips/SUMMARY

    r526 r532  
    55 
    66For further information on a particular chip, see the documentation 
    7 in this directory. 
     7in this directory. Data sheets are generally available on the 
     8manufacturer's web site. 
    89 
    9 To determine what chips you have on your system, 
     10To determine what chips you have in your system, 
    1011run prog/detect/sensors-detect. 
    1112 
     13If your sensor chip is not detected or supported by this package, 
     14please send mail to lm78@stimpy.netroedge.com. 
    1215 
    13  
     16--------------------------------------------------------------------- 
     17--------------------------------------------------------------------- 
    1418 
    1519SENSOR CHIPS 
     
    2731 
    2832adm9240 
    29         adm9240         1       6       5       1 dac   yes     no 
    30         ds1780          1       6       5       1 dac   yes     no 
     33        adm9240         1       6       2       1 dac   yes     no 
     34        ds1780          1       6       2       1 dac   yes     no 
     35        lm81            1       6       2       1 dac   yes     no 
    3136 
    3237gl518sm 
     
    4954 
    5055maxilife 
    51         maxilife        5       4       3       -       yes     no 
     56        maxilife-as     5       4       3       -       yes     no 
     57        maxilife-co     5       4       3       -       yes     no 
     58        maxilife-cg     5       4       3       -       yes     no 
    5259 
    5360sis5595 
  • lm-sensors/trunk/doc/chips/adm9240

    r401 r532  
    1313    Addresses scanned: I2C 0x2c - 0x2f (inclusive) 
    1414    Datasheet: Publicly available at the Dallas Semiconductor website 
     15  * National Semiconductor LM81 
     16    Prefix `lm81' 
     17    Addresses scanned: I2C 0x2c - 0x2f (inclusive) 
     18    Datasheet: Publicly available at the National Semiconductor website 
    1519 
    1620 
     
    3034  List of adapter,address pairs which are unquestionably assumed to contain 
    3135  a `ds1780' chip 
     36* force_lm81: short array (min = 1, max = 48) 
     37  List of adapter,address pairs which are unquestionably assumed to contain 
     38  a `lm81' chip 
    3239* ignore: short array (min = 1, max = 48) 
    3340  List of adapter,address pairs not to scan 
     
    4350----------- 
    4451 
    45 This driver implements support for the Analog Devices ADM9240 and 
    46 Dallas Semiconductor DS1780 chips. These chips appear to be completely 
     52This driver implements support for the Analog Devices ADM9240, 
     53Dallas Semiconductor DS1780, and National Semiconductor LM81 chips. 
     54These chips appear to be completely 
    4755identical, except for the manufacturer IDs encoded in two registers, and 
    4856the speed with which they update their sensor readings. 
    4957 
    50 The ADM9240 and DS1780 implement six voltage sensors, a temperature sensor, 
     58The chips implement six voltage sensors, a temperature sensor, 
    5159two FAN rotation speed sensors, VID lines and some miscellaneous stuff. 
    5260 
     
    93101miss once-only alarms. 
    94102 
    95 Thes ADM9240 only updates its values every 0.5 seconds; the DS1760 one 
    96 every 2 seconds; reading them more often will do no harm, but will return  
     103Thes ADM9240 only updates its values every 0.5 seconds; the DS1780 one 
     104every 2 seconds; and the LM81 every 0.4 seconds. 
     105Reading them more often will do no harm, but will return  
    97106'old' values. (NB: theoretically, this could be done much faster for the 
    98107ADM9240, but there is no real reason to do so, and this way the SMBus use  
     
    233242            alarms                   SENSORS_DS1780_ALARMS             alarms:1 
    234243        analog_out               SENSORS_DS1780_ANALOG_OUT         analog_out:1 
     244 
     245 
     246Chip `lm81' 
     247             LABEL        LABEL CLASS      COMPUTE CLASS ACCESS MAGNITUDE 
     248              2.5V               NONE               NONE     R     2 
     249             Vccp1               NONE               NONE     R     2 
     250              3.3V               NONE               NONE     R     2 
     251                5V               NONE               NONE     R     2 
     252               12V               NONE               NONE     R     2 
     253             Vccp2               NONE               NONE     R     2 
     254          2.5V_min               2.5V               2.5V     RW    2 
     255         Vccp1_min              Vccp1              Vccp1     RW    2 
     256          3.3V_min               3.3V               3.3V     RW    2 
     257            5V_min                 5V                 5V     RW    2 
     258           12V_min                12V                12V     RW    2 
     259         Vccp2_min              Vccp2              Vccp2     RW    2 
     260          2.5V_max               2.5V               2.5V     RW    2 
     261         Vccp1_max              Vccp1              Vccp1     RW    2 
     262          3.3V_max               3.3V               3.3V     RW    2 
     263            5V_max                 5V                 5V     RW    2 
     264           12V_max                12V                12V     RW    2 
     265         Vccp2_max              Vccp2              Vccp2     RW    2 
     266              fan1               NONE               NONE     R     0 
     267              fan2               NONE               NONE     R     0 
     268          fan1_min               fan1               fan1     RW    0 
     269          fan2_min               fan2               fan2     RW    0 
     270              temp               NONE               NONE     R     1 
     271         temp_hyst               temp               temp     RW    1 
     272         temp_over               temp               temp     RW    1 
     273               vid               NONE               NONE     R     2 
     274          fan1_div               fan1               NONE     RW    0 
     275          fan2_div               fan2               NONE     RW    0 
     276            alarms               NONE               NONE     R     0 
     277        analog_out               NONE               NONE     RW    0 
     278 
     279             LABEL                          FEATURE SYMBOL        SYSCTL FILE:NR 
     280              2.5V                     SENSORS_ADM9240_IN0               2.5V:3 
     281             Vccp1                     SENSORS_ADM9240_IN1              Vccp1:3 
     282              3.3V                     SENSORS_ADM9240_IN2               3.3V:3 
     283                5V                     SENSORS_ADM9240_IN3                 5V:3 
     284               12V                     SENSORS_ADM9240_IN4                12V:3 
     285             Vccp2                     SENSORS_ADM9240_IN5              Vccp2:3 
     286          2.5V_min                 SENSORS_ADM9240_IN0_MIN               2.5V:1 
     287         Vccp1_min                 SENSORS_ADM9240_IN1_MIN              Vccp1:1 
     288          3.3V_min                 SENSORS_ADM9240_IN2_MIN               3.3V:1 
     289            5V_min                 SENSORS_ADM9240_IN3_MIN                 5V:1 
     290           12V_min                 SENSORS_ADM9240_IN4_MIN                12V:1 
     291         Vccp2_min                 SENSORS_ADM9240_IN5_MIN              Vccp2:1 
     292          2.5V_max                 SENSORS_ADM9240_IN0_MAX               2.5V:2 
     293         Vccp1_max                 SENSORS_ADM9240_IN1_MAX              Vccp1:2 
     294          3.3V_max                 SENSORS_ADM9240_IN2_MAX               3.3V:2 
     295            5V_max                 SENSORS_ADM9240_IN3_MAX                 5V:2 
     296           12V_max                 SENSORS_ADM9240_IN4_MAX                12V:2 
     297         Vccp2_max                 SENSORS_ADM9240_IN5_MAX              Vccp2:2 
     298              fan1                    SENSORS_ADM9240_FAN1               fan1:2 
     299              fan2                    SENSORS_ADM9240_FAN2               fan2:2 
     300          fan1_min                SENSORS_ADM9240_FAN1_MIN               fan1:1 
     301          fan2_min                SENSORS_ADM9240_FAN2_MIN               fan2:1 
     302              temp                    SENSORS_ADM9240_TEMP               temp:3 
     303         temp_hyst               SENSORS_ADM9240_TEMP_HYST               temp:2 
     304         temp_over               SENSORS_ADM9240_TEMP_OVER               temp:1 
     305               vid                     SENSORS_ADM9240_VID                vid:1 
     306          fan1_div                SENSORS_ADM9240_FAN1_DIV            fan_div:1 
     307          fan2_div                SENSORS_ADM9240_FAN2_DIV            fan_div:2 
     308            alarms                  SENSORS_ADM9240_ALARMS             alarms:1 
     309        analog_out              SENSORS_ADM9240_ANALOG_OUT         analog_out:1 
     310 
    235311 
    236312 
  • lm-sensors/trunk/kernel/chips/adm9240.c

    r516 r532  
    1919    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    2020*/ 
     21 
     22/* Supports ADM9240, DS1780, and LM81. See doc/chips/adm9240 for details */ 
    2123 
    2224/*  
     
    7577 
    7678/* Insmod parameters */ 
    77 SENSORS_INSMOD_2(adm9240,ds1780); 
     79SENSORS_INSMOD_3(adm9240,ds1780,lm81); 
    7880 
    7981/* Many ADM9240 constants specified below */ 
     
    9799#define ADM9240_REG_FAN2 0x29 
    98100#define ADM9240_REG_COMPANY_ID 0x3E  /* 0x23 for ADM9240; 0xDA for DS1780 */ 
     101                                     /* 0x01 for LM81 */ 
    99102#define ADM9240_REG_DIE_REV 0x3F 
    100103/* These are read/write */ 
     
    111114#define ADM9240_REG_VCCP2_HIGH 0x35 
    112115#define ADM9240_REG_VCCP2_LOW 0x36 
     116#define ADM9240_REG_TCRIT_LIMIT 0x37  /* LM81 only - not supported */ 
     117#define ADM9240_REG_LOW_LIMIT 0x38    /* LM81 only - not supported */ 
    113118#define ADM9240_REG_TOS 0x39 
    114119#define ADM9240_REG_THYST 0x3A 
     
    128133#define ADM9240_REG_VID4 0x49 
    129134#define ADM9240_REG_TEMP_CONFIG 0x4B 
     135#define ADM9240_REG_EXTMODE1 0x4C     /* LM81 only - not supported */ 
     136#define ADM9240_REG_EXTMODE2 0x4D     /* LM81 only - not supported */ 
    130137 
    131138/* Conversions. Rounding and limit checking is only done on the TO_REG 
     
    391398    else if (i == 0xda) 
    392399      kind = ds1780; 
     400    else if (i == 0x01) 
     401      kind = lm81; 
    393402    else { 
    394403      if (kind == 0) 
     
    405414    type_name = "ds1780"; 
    406415    client_name = "DS1780 chip"; 
     416  } else if (kind == lm81) { 
     417    type_name = "lm81"; 
     418    client_name = "LM81 chip"; 
    407419  } else { 
    408420#ifdef DEBUG 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r527 r532  
    151151@chip_ids = ( 
    152152     { 
    153        name => "National Semiconductors LM78", 
     153       name => "National Semiconductor LM78", 
    154154       driver => "lm78", 
    155155       i2c_addrs => [0x00..0x7f],  
     
    161161     } , 
    162162     { 
    163        name => "National Semiconductors LM78-J", 
     163       name => "National Semiconductor LM78-J", 
    164164       driver => "lm78", 
    165165       i2c_addrs => [0x00..0x7f], 
     
    171171     } , 
    172172     { 
    173        name => "National Semiconductors LM79", 
     173       name => "National Semiconductor LM79", 
    174174       driver => "lm78", 
    175175       i2c_addrs => [0x00..0x7f], 
     
    181181     } , 
    182182     { 
    183        name => "National Semiconductors LM75", 
     183       name => "National Semiconductor LM75", 
    184184       driver => "lm75", 
    185185       i2c_addrs => [0x48..0x4f], 
     
    187187     } , 
    188188     { 
    189        name => "National Semiconductors LM80", 
     189       name => "National Semiconductor LM80", 
    190190       driver => "lm80", 
    191191       i2c_addrs => [0x28..0x2f], 
     
    258258       i2c_addrs => [0x2c..0x2f], 
    259259       i2c_detect => sub { adm9240_detect 1, @_ } 
     260     }, 
     261     { 
     262       name => "National Semiconductor LM81", 
     263       driver => "adm9240", 
     264       i2c_addrs => [0x2c..0x2f], 
     265       i2c_detect => sub { adm9240_detect 2, @_ } 
    260266     }, 
    261267     { 
     
    13471353} 
    13481354 
    1349 # $_[0]: Chip to detect (0 = ADM9240, 1 = DS1780
     1355# $_[0]: Chip to detect (0 = ADM9240, 1 = DS1780, 2 = LM81
    13501356# $_[1]: A reference to the file descriptor to access this chip. 
    13511357#        We may assume an i2c_set_slave_addr was already done. 
     
    13631369  $reg = i2c_smbus_read_byte_data($file,0x3e); 
    13641370  return unless ($chip == 0 and $reg == 0x23) or 
    1365                 ($chip == 1 and $reg == 0xda); 
     1371                ($chip == 1 and $reg == 0xda) or 
     1372                ($chip == 2 and $reg == 0x01); 
    13661373  return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00; 
    13671374  return unless i2c_smbus_read_byte_data($file,0x48) == $addr; 
  • lm-sensors/trunk/prog/sensors/main.c

    r526 r532  
    253253           !strcmp(name.prefix,"max1617a")) 
    254254    print_adm1021(&name); 
    255   else if (!strcmp(name.prefix,"adm9240") || !strcmp(name.prefix,"ds1780")) 
     255  else if (!strcmp(name.prefix,"adm9240") || 
     256           !strcmp(name.prefix,"ds1780") || 
     257           !strcmp(name.prefix,"lm81")) 
    256258    print_adm9240(&name); 
    257259  else if (!strcmp(name.prefix,"lm78") || !strcmp(name.prefix,"lm78-j") ||