Changeset 5817

Show
Ignore:
Timestamp:
01/18/10 17:19:15 (3 years ago)
Author:
khali
Message:

Add detection for Analog Devices ADT7411.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5814 r5817  
    4343                  Add detection for VIA Nano 
    4444                  Add detection for Texas Instruments AMC6821 
     45                  Add detection for Analog Devices ADT7411 
    4546  sysconfig-lm_sensors-convert: Fix exit code 
    4647 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r5815 r5817  
    588588                i2c_detect => sub { adt7490_detect(@_); }, 
    589589        }, { 
     590                name => "Analog Devices ADT7411", 
     591                driver => "to-be-written", 
     592                i2c_addrs => [0x48, 0x4a, 0x4b], 
     593                i2c_detect => sub { adt7411_detect(@_); }, 
     594        }, { 
    590595                name => "Andigilog aSC7511", 
    591596                driver => "to-be-written", 
     
    43604365        return if $mid != 0x41;                 # Analog Devices 
    43614366        return if ($cid & 0xfc) != 0x6c;        # ADT7490 
     4367        return 5; 
     4368} 
     4369 
     4370# Registers used: 
     4371#   0x4d: Device ID 
     4372#   0x4e: Manufacturer ID 
     4373#   0x4e: Silicon revision 
     4374sub adt7411_detect 
     4375{ 
     4376        my ($file, $addr) = @_; 
     4377        my $dev_id = i2c_smbus_read_byte_data($file, 0x4d); 
     4378        my $man_id = i2c_smbus_read_byte_data($file, 0x4e); 
     4379        my $revision = i2c_smbus_read_byte_data($file, 0x4f); 
     4380 
     4381        return if $man_id != 0x41;              # Analog Devices 
     4382        return if $dev_id != 0x02;              # ADT7411 
     4383        # The datasheet suggests that the version is in the high nibble, but 
     4384        # a dump from a real ADT7411 chip shows that it is in the low nibble. 
     4385        return if ($revision & 0x0f) != 0x04;   # ADT7411 
    43624386        return 5; 
    43634387}