2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-05 08:45:26 +00:00

fix unreliable it87 detection (config reg. is 0x00, not 0x40)

ticket 758.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1273 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2001-12-19 19:29:31 +00:00
parent 683482a66d
commit a94b5074fd
2 changed files with 6 additions and 6 deletions

View File

@@ -2181,7 +2181,7 @@ sub via686a_isa_detect
# $_[2]: Address
# Returns: undef if not detected, (7) if detected.
# Registers used:
# 0x40: Configuration
# 0x00: Configuration
# 0x48: Full I2C Address
# 0x58: Mfr ID
# Note that this function is always called through a closure, so the
@@ -2191,7 +2191,7 @@ sub ite_detect
my $reg;
my ($chip,$file,$addr) = @_;
return unless i2c_smbus_read_byte_data($file,0x48) == $addr;
return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00;
return unless (i2c_smbus_read_byte_data($file,0x00) & 0x80) == 0x00;
return unless i2c_smbus_read_byte_data($file,0x58) == 0x90;
return (7);
}
@@ -2214,7 +2214,7 @@ sub ite_isa_detect
return;
}
my $readproc = sub { isa_read_byte $addr + 5, $addr + 6, @_ };
return unless (&$readproc(0x40) & 0x80) == 0x00;
return unless (&$readproc(0x00) & 0x80) == 0x00;
my $reg = &$readproc(0x58);
return unless ($reg == 0x90);
return 7;