diff --git a/CHANGES b/CHANGES index ce9150b0..54f04ee1 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,7 @@ SVN-HEAD Add detection for National Semiconductor LM73 Add SMBus detection for AMD Hudson-2 Add detection for Nuvoton W83667HG-B and W83677HG-I + Add detection for Analog Devices ADT7490 sysconfig-lm_sensors-convert: Fix exit code 3.1.1 (2009-06-21) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 3c485d45..0fc5f6fb 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -581,6 +581,11 @@ use vars qw(@i2c_adapter_names); driver => "to-be-written", i2c_addrs => [0x2c..0x2e], i2c_detect => sub { adt7467_detect(@_, 1); }, + }, { + name => "Analog Devices ADT7490", + driver => "to-be-written", + i2c_addrs => [0x2c..0x2e], + i2c_detect => sub { adt7490_detect(@_); }, }, { name => "Andigilog aSC7511", driver => "to-be-written", @@ -4284,6 +4289,20 @@ sub adt7473_detect return 5; } +# Registers used: +# 0x3e: Manufacturer ID +# 0x3f: Chip ID +sub adt7490_detect +{ + my ($file, $addr, $chip) = @_; + my $mid = i2c_smbus_read_byte_data($file, 0x3e); + my $cid = i2c_smbus_read_byte_data($file, 0x3f); + + return if $mid != 0x41; # Analog Devices + return if ($cid & 0xfc) != 0x6c; # ADT7490 + return 5; +} + # Chip to detect: 0 = aSC7512, 1 = aSC7611, 2 = aSC7621 # Registers used: # 0x3e: Manufacturer ID