Fix ADM1022 detection.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4561 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-07-06 09:52:32 +00:00
1 parent 04d8373812
commit 85634eab57
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -52,6 +52,7 @@ SVN HEAD
No longer depend on i2cdetect
Add SMSC SCH5317 detection
Drop detection of most non-sensors I2C chips
Fix ADM1022 detection
2.10.3 (20070319)
+3 -1
View File
@@ -4469,7 +4469,9 @@ sub adm1022_detect
return unless ($chip == 0 and $reg == 0x41) or
($chip == 1 and $reg == 0x49) or
($chip == 2 and $reg == 0x41);
return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00;
$reg = i2c_smbus_read_byte_data($file,0x40);
return if ($reg & 0x10); # Soft Reset always reads 0
return if ($chip != 0 and ($reg & 0x80)); # Reserved on THMC50 and ADM1028
$reg = i2c_smbus_read_byte_data($file, 0x3f) & 0xf0;
return unless ($chip == 0 and $reg == 0xc0) or
($chip == 1 and $reg == 0xc0) or