Fix ADM1028 detection.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4333 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-02-24 18:13:41 +00:00
1 parent 946fc47468
commit 4da00e38a6
2 files changed
+5 -4

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ SVN HEAD
Add Dallas DS75 detection
Add SMSC LPC47M292 detection
Add nVidia MCP61 and MCP65 detection
Fix ADM1028 detection
2.10.2 (20070115)
+4 -4
View File
@@ -4351,10 +4351,10 @@ sub adm1022_detect
($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, 0x3f);
return unless ($reg & 0xc0) == 0xc0;
return if $chip == 0 and ($reg & 0xc0) != 0xc0;
return if $chip == 2 and ($reg & 0xc0) == 0xc0;
$reg = i2c_smbus_read_byte_data($file, 0x3f) & 0xf0;
return unless ($chip == 0 and $reg == 0xc0) or
($chip == 1 and $reg == 0xc0) or
($chip == 2 and $reg == 0xd0);
return (8);
}