Changeset 4185

Show
Ignore:
Timestamp:
09/26/06 11:18:33 (7 years ago)
Author:
khali
Message:

Add SMSC DME1737 detection.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4181 r4185  
    33 
    442.10.2 (2006????) 
     5  Program sensors-detect: Add SMSC DME1737 detection 
    56 
    672.10.1 (20060924) 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r4171 r4185  
    13301330       i2c_addrs => [0x2c..0x2d], 
    13311331       i2c_detect => sub { smsc47m192_detect(@_); }, 
     1332     }, 
     1333     { 
     1334       name => "SMSC DME1737", 
     1335       driver => "to-be-written", 
     1336       i2c_addrs => [0x2c..0x2e], 
     1337       i2c_detect => sub { dme1737_detect(@_); }, 
    13321338     }, 
    13331339     { 
     
    17241730        devid => 0x76, 
    17251731      }, 
     1732      { 
     1733        name => "SMSC DME1737 Super IO", 
     1734        # Hardware monitoring features are accessed on the SMBus 
     1735        driver => "not-a-sensor", 
     1736        devid => 0x78, 
     1737      }, 
    17261738    ], 
    17271739  }, 
     
    45954607} 
    45964608 
     4609# $_[0]: A reference to the file descriptor to access this chip. 
     4610#        We assume an i2c_set_slave_addr was already done. 
     4611# $_[1]: Address 
     4612# Returns: undef if not detected, 5 or 6 if detected. 
     4613# Registers used: 
     4614#   0x3E: Manufacturer ID 
     4615#   0x3F: Version/Stepping 
     4616#   0x40: Configuration (2 reserved bits) 
     4617#   0x42: Interrupt Status 2 (1 reserved bit) 
     4618#   0x43: VID (2 reserved bits) 
     4619sub dme1737_detect 
     4620{ 
     4621  my ($file, $addr) = @_; 
     4622  return unless i2c_smbus_read_byte_data($file, 0x3E) == 0x55 
     4623           and (i2c_smbus_read_byte_data($file, 0x3F) & 0xF8) == 0x88 
     4624           and (i2c_smbus_read_byte_data($file, 0x40) & 0xC4) == 0x04 
     4625           and (i2c_smbus_read_byte_data($file, 0x42) & 0x02) == 0x00 
     4626           and (i2c_smbus_read_byte_data($file, 0x43) & 0xC0) == 0x00; 
     4627  return ($addr == 0x2e ? 6 : 5); 
     4628} 
     4629 
    45974630# $_[0]: Chip to detect 
    45984631#   (1 = F75111R/RG/N, 2 = F75121R/F75122R/RG, 3 = F75373S/SG,