2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

(mds) Add support for LM84 (ADM1021 clone) to adm1021.c and sensors-detect.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@602 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
1999-10-20 01:51:27 +00:00
parent 52ede0a657
commit 129e08cc94
5 changed files with 34 additions and 3 deletions

View File

@@ -290,6 +290,12 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
i2c_detect => sub { adm1021_detect 3, @_ },
},
{
name => "National Semiconductor LM84"
driver => "adm1021",
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
i2c_detect => sub { adm1021_detect 4, @_ },
},
{
name => "Analog Devices ADM1022",
driver => "thmc50",
@@ -1419,7 +1425,8 @@ sub adm1022_detect
return (8);
}
# $_[0]: Chip to detect (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10)
# $_[0]: Chip to detect
# (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10, 4 = LM84)
# $_[1]: A reference to the file descriptor to access this chip.
# We may assume an i2c_set_slave_addr was already done.
# $_[2]: Address
@@ -1435,6 +1442,7 @@ sub adm1021_detect
my ($chip, $file,$addr) = @_;
return if $chip == 0 and i2c_smbus_read_byte_data($file,0xfe) != 0x41;
return if $chip == 3 and i2c_smbus_read_byte_data($file,0xfe) != 0x49;
return if $chip == 4 and i2c_smbus_read_byte_data($file,0xfe) != 0x00;
return if $chip == 2 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d and
i2c_smbus_read_byte_data($file,0xff) != 0x01;
# The remaining things are flaky at best. Perhaps something can be done