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

Fix ADM1022 detection.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4562 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2007-07-06 09:54:10 +00:00
parent 4d2fa4eadd
commit e17f73da24
2 changed files with 4 additions and 1 deletions

View File

@@ -48,6 +48,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)

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