Changeset 5214

Show
Ignore:
Timestamp:
04/27/08 09:08:08 (6 years ago)
Author:
khali
Message:

Add National Semiconductor LM64 detection.

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

    r5192 r5214  
    2222                  New device ID for the SMSC SCH5317 
    2323                  Add SMSC SCH5127 detection 
     24                  Add National Semiconductor LM64 detection 
    2425 
    25263.0.1 (2008-01-28) 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5211 r5214  
    12511251     }, 
    12521252     { 
     1253       name => "National Semiconductor LM64", 
     1254       driver => "to-be-written", # lm63 
     1255       i2c_addrs => [0x18, 0x4e], 
     1256       i2c_detect => sub { lm63_detect(3, @_); }, 
     1257     }, 
     1258     { 
    12531259       name => "Fintek F75363SG", 
    12541260       driver => "lm63", # Not yet 
     
    40514057 
    40524058# $_[0]: Chip to detect 
    4053 #   (1 = LM63, 2 = F75363SG) 
     4059#   (1 = LM63, 2 = F75363SG, 3 = LM64) 
    40544060# $_[1]: A reference to the file descriptor to access this chip. 
    40554061# $_[2]: Address (unused) 
    4056 # Returns: undef if not detected, 8 if detected. 
     4062# Returns: undef if not detected, 6 if detected. 
    40574063# Registers used: 
    40584064#   0xfe: Manufacturer ID 
     
    40604066#   0x03: Configuration (two or three unused bits) 
    40614067#   0x16: Alert mask (two or three unused bits) 
    4062 #   0x03-0x0e: Mirrored registers (five pairs) 
    40634068sub lm63_detect 
    40644069{ 
     
    40794084           || $cid != 0x20;   # F75363SG 
    40804085    return if ($conf & 0x1a) != 0x00 
    4081            || ($mask & 0x84) != 0x00;   
    4082   } 
    4083  
    4084   # For compatibility with the LM86, some registers are mirrored 
    4085   # to alternative locations 
    4086   return if $conf != i2c_smbus_read_byte_data($file, 0x09); 
    4087   foreach my $i (0x04, 0x05, 0x07, 0x08) { 
    4088     return if i2c_smbus_read_byte_data($file, $i) 
    4089            != i2c_smbus_read_byte_data($file, $i+6); 
    4090   } 
    4091  
    4092   return 8; 
     4086           || ($mask & 0x84) != 0x00; 
     4087  } elsif ($chip == 3) { 
     4088    return if $mid != 0x01    # National Semiconductor 
     4089           || $cid != 0x51;   # LM64 
     4090    return if ($conf & 0x18) != 0x00 
     4091           || ($mask & 0xa4) != 0xa4; 
     4092  } 
     4093 
     4094  return 6; 
    40934095} 
    40944096