Changeset 5811

Show
Ignore:
Timestamp:
12/15/09 17:53:00 (4 years ago)
Author:
khali
Message:

Add detection for Texas Instruments AMC6821.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5809 r5811  
    4242                  Add detection for Nuvoton W83L771AWG/ASG 
    4343                  Add detection for VIA Nano 
     44                  Add detection for Texas Instruments AMC6821 
    4445  sysconfig-lm_sensors-convert: Fix exit code 
    4546 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r5810 r5811  
    939939                i2c_detect => sub { tmp42x_detect(@_, 2); }, 
    940940        }, { 
     941                name => "Texas Instruments AMC6821", 
     942                driver => "amc6821", 
     943                i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e], 
     944                i2c_detect => sub { amc6821_detect(@_); }, 
     945        }, { 
    941946                name => "National Semiconductor LM95231", 
    942947                driver => "to-be-written", 
     
    40444049        return 6 if ($chip == 1 && $cid == 0x22); # TMP422 
    40454050        return 6 if ($chip == 2 && $cid == 0x23); # TMP423 
     4051 
     4052        return; 
     4053} 
     4054 
     4055# Registers used: 
     4056#   0x3d: Device ID 
     4057#   0x3e: Company ID 
     4058sub amc6821_detect() 
     4059{ 
     4060        my ($file, $addr) = @_; 
     4061 
     4062        my $dev_id = i2c_smbus_read_byte_data($file, 0x3d); 
     4063        my $comp_id = i2c_smbus_read_byte_data($file, 0x3e); 
     4064 
     4065        return if ($comp_id != 0x49);           # Texas Instruments 
     4066        return 5 if ($dev_id == 0x21);          # AMC6821 
    40464067 
    40474068        return;