Changeset 5337

Show
Ignore:
Timestamp:
09/19/08 17:05:28 (2 months ago)
Author:
khali
Message:

Add MAX1618 detection.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5332 r5337  
    3434                  Prevent misdetection of W83627DHG on I2C as LM78 
    3535                  W83627DHG has no subclients 
     36                  Add Maxim MAX1618 support 
    3637 
    37383.0.2 (2008-05-18) 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5332 r5337  
    10551055       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10561056       i2c_detect => sub { adm1021_detect(7, @_); }, 
     1057     }, 
     1058     { 
     1059       name => "Maxim MAX1618", 
     1060       driver => "max1619", 
     1061       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
     1062       i2c_detect => sub { max1619_detect(1, @_); }, 
    10571063     }, 
    10581064     { 
     
    50395045 
    50405046# $_[0]: Chip to detect 
    5041 #   (0 = MAX1619
     5047#   (0 = MAX1619, 1 = MAX1618
    50425048# $_[1]: A reference to the file descriptor to access this chip. 
    50435049# $_[2]: Address 
     
    50585064  my $convrate = i2c_smbus_read_byte_data($file, 0x04); 
    50595065 
    5060   return if $man_id != 0x4D 
    5061     or $dev_id != 0x04 
    5062     or ($conf & 0x03) 
    5063     or ($status & 0x61) 
    5064     or $convrate >= 8; 
     5066  if ($chip == 0) {     # MAX1619 
     5067    return if $man_id != 0x4D 
     5068      or $dev_id != 0x04 
     5069      or ($conf & 0x03) 
     5070      or ($status & 0x61) 
     5071      or $convrate >= 8; 
     5072  } 
     5073  if ($chip == 1) {     # MAX1618 
     5074    return if $man_id != 0x4D 
     5075      or $dev_id != 0x02 
     5076      or ($conf & 0x07) 
     5077      or ($status & 0x63); 
     5078  } 
    50655079 
    50665080  return 7;