Changeset 2469

Show
Ignore:
Timestamp:
04/23/04 18:25:56 (9 years ago)
Author:
khali
Message:

Improve LM89/LM99 support.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/detect/sensors-detect

    r2463 r2469  
    11331133     }, 
    11341134     { 
    1135        name => "National Semiconductor LM89", 
    1136        driver => "to-be-written", 
    1137        i2c_addrs => [0x4c], 
     1135       name => "National Semiconductor LM89/LM99", 
     1136       driver => "lm90", 
     1137       i2c_addrs => [0x4c..0x4d], 
    11381138       i2c_detect => sub { lm90_detect 1, @_ }, 
    11391139     }, 
     
    29312931#        We may assume an i2c_set_slave_addr was already done. 
    29322932# $_[2]: Address 
    2933 # Returns: undef if not detected, 3, 7 or 8 if detected. 
     2933# Returns: undef if not detected, 3, 5, 7 or 8 if detected. 
    29342934#   The Maxim chips have a low confidence value (3) 
    29352935#   because the die revision codes are not known. 
     
    29472947  if ($chip == 0) { 
    29482948    return if ($conf & 0x2a) != 0; 
    2949         return if $mid != 0x01;     # National Semicondutor 
     2949    return if $mid != 0x01;     # National Semiconductor 
    29502950    return 8 if $cid == 0x21;   # LM90 
    29512951    return 7 if $cid > 0x21 and $cid < 0x30; 
     
    29532953  if ($chip == 1) { 
    29542954    return if ($conf & 0x2a) != 0; 
    2955         return if $mid != 0x01;     # National Semicondutor 
    2956     return 8 if $cid == 0x31;   # LM89 
    2957     return 7 if $cid > 0x31 and $cid < 0x40; 
     2955    return if $mid != 0x01;     # National Semiconductor 
     2956    return 8 if $addr == 0x4c and $cid == 0x31; # LM89/LM99 
     2957    return 8 if $addr == 0x4d and $cid == 0x34; # LM89-1/LM99-1 
     2958    return 5 if $cid > 0x31 and $cid < 0x40; 
    29582959  } 
    29592960  if ($chip == 2) { 
    29602961    return if ($conf & 0x2a) != 0; 
    2961         return if $mid != 0x01;     # National Semicondutor 
     2962    return if $mid != 0x01;     # National Semiconductor 
    29622963    return 8 if $cid == 0x11;   # LM86 
    29632964    return 7 if $cid > 0x11 and $cid < 0x20; 
     
    29652966  if ($chip == 3) { 
    29662967    return if ($conf & 0x3f) != 0; 
    2967         return if $mid != 0x41;     # Analog Devices 
    2968         return 8 if ($cid & 0xf0) == 0x40; # ADM1032 
     2968    return if $mid != 0x41;     # Analog Devices 
     2969    return 8 if ($cid & 0xf0) == 0x40; # ADM1032 
    29692970  } 
    29702971  if ($chip == 4) { 
    29712972    return if ($conf & 0x1f) != 0; 
    2972         return if $mid != 0x4d;     # Maxim 
    2973         return 3; 
     2973    return if $mid != 0x4d;     # Maxim 
     2974    return 3; 
    29742975  } 
    29752976  if ($chip == 5) {