mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
Slightly improve alias detection of W83627EHF and W83627DHG.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5274 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -4669,7 +4669,7 @@ sub mozart_detect
|
||||
}
|
||||
|
||||
# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 3 = W83627HF,
|
||||
# 9 = W83627EHF 10 = W83627DHG)
|
||||
# 9 = W83627EHF 10, = W83627DHG)
|
||||
# $_[1]: ISA address
|
||||
# $_[2]: I2C file handle
|
||||
# $_[3]: I2C address
|
||||
@@ -4677,9 +4677,10 @@ sub w83781d_alias_detect
|
||||
{
|
||||
my ($chip, $isa_addr, $file, $i2c_addr) = @_;
|
||||
my $i;
|
||||
my $max = ($chip == 9 || $chip == 10) ? 0x3e : 0x3d;
|
||||
|
||||
return 0 unless isa_read_i5d6($isa_addr, 0x48) == $i2c_addr;
|
||||
for ($i = 0x2b; $i <= 0x3d; $i ++) {
|
||||
for ($i = 0x2b; $i <= $max; $i ++) {
|
||||
return 0 unless isa_read_i5d6($isa_addr, $i) == i2c_smbus_read_byte_data($file, $i);
|
||||
}
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user