Improve AMC6821 detection.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5812 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2009-12-15 16:57:34 +00:00
1 parent a312cc6da1
commit 57373f9e6b
1 file changed
+6 -1
+6 -1
View File
@@ -4063,7 +4063,12 @@ sub amc6821_detect()
my $comp_id = i2c_smbus_read_byte_data($file, 0x3e);
return if ($comp_id != 0x49); # Texas Instruments
return 5 if ($dev_id == 0x21); # AMC6821
# Bit 7 of register address is ignored
return if i2c_smbus_read_byte_data($file, 0x80 | 0x3d) != $dev_id;
return if i2c_smbus_read_byte_data($file, 0x80 | 0x3e) != $comp_id;
return 6 if ($dev_id == 0x21); # AMC6821
return;
}