Changeset 4411

Show
Ignore:
Timestamp:
05/22/07 13:31:51 (7 years ago)
Author:
khali
Message:

Add Maxim MAX6680/MAX6681 detection. Patch contributed by
Rainer Birkenmaier (Siemens).

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r4409 r4411  
    2828                          Add /usr/sbin to the PATH (#2199) 
    2929                          Add ATI SB700 detection 
     30                          Add Maxim MAX6680/MAX6681 detection 
    3031 
    3132 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r4409 r4411  
    12601260       i2c_addrs => [0x4c], 
    12611261       i2c_detect => sub { lm90_detect(6, @_); }, 
     1262     }, 
     1263     { 
     1264       name => "Maxim MAX6680/MAX6681", 
     1265       driver => "lm90", 
     1266       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
     1267       i2c_detect => sub { lm90_detect(7, @_); }, 
    12621268     }, 
    12631269     { 
     
    36713677# $_[0]: Chip to detect 
    36723678#   (0 = LM90, 1=LM89/LM99, 2=LM86, 3=ADM1032, 4=MAX6657/MAX6658/MAX6659, 
    3673 #    5 = ADT7461, 6 = MAX6648/MAX6692) 
     3679#    5 = ADT7461, 6 = MAX6648/MAX6692, 7 = MAX6680/MAX6681) 
    36743680# $_[1]: A reference to the file descriptor to access this chip. 
    36753681# $_[2]: Address 
    36763682# Returns: undef if not detected, 4, 6 or 8 if detected. 
    3677 #   The Maxim chips have a low confidence value (4) 
    3678 #   because they don't have a die revision register. 
     3683#   The Maxim chips MAX6657, MAX6658 and MAX6659 have a low confidence 
     3684#   value (4) because they don't have a die revision register. 
    36793685# Registers used: 
    36803686#   0x03: Configuration 
     
    37393745    return 8; 
    37403746  }     
     3747  if ($chip == 7) { 
     3748    return if ($conf & 0x03) != 0; 
     3749    return if $rate > 0x07; 
     3750    return if $mid != 0x4d;     # Maxim 
     3751    return if $cid != 0x01;     # MAX6680/MAX6681 
     3752    return 6; 
     3753  } 
    37413754  return; 
    37423755}