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

Let ISA-access and non-sensor devices take part in the confidence

comparison process. Otherwise, we might miss misdetections.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5848 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2010-07-05 16:53:59 +00:00
parent cb76d5af68
commit f11a2a6d3a
2 changed files with 11 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ SVN HEAD
Add support for Fintek F71889ED Add support for Fintek F71889ED
Add support for ITE IT8721F Add support for ITE IT8721F
Fix Maxim MAX6690 support Fix Maxim MAX6690 support
Fix handling of duplicate detections
3.1.2 (2010-02-02) 3.1.2 (2010-02-02)
libsensors: Support upcoming sysfs path to i2c adapters libsensors: Support upcoming sysfs path to i2c adapters

View File

@@ -3003,6 +3003,15 @@ sub add_i2c_to_chips_detected
push @{$chips_detected{$chipdriver}}, $datahash; push @{$chips_detected{$chipdriver}}, $datahash;
} }
# Fake i2c drivers such as "not-a-sensor" or "use-isa-instead" have to be
# inserted so that confidence comparison can be performed. But then we have
# to filter them out so that the user doesn't get confused.
sub filter_out_fake_i2c_drivers
{
delete $chips_detected{"not-a-sensor"};
delete $chips_detected{"use-isa-instead"};
}
# This adds a detection to the above structure. # This adds a detection to the above structure.
# $_[0]: chip driver # $_[0]: chip driver
# $_[1]: reference to data hash # $_[1]: reference to data hash
@@ -3190,9 +3199,6 @@ sub probe_free_i2c_address
} }
print ")\n"; print ")\n";
return if ($chip->{driver} eq "not-a-sensor"
|| $chip->{driver} eq "use-isa-instead");
$new_hash = { $new_hash = {
conf => $conf, conf => $conf,
i2c_addr => $addr, i2c_addr => $addr,
@@ -5986,6 +5992,7 @@ sub main
next unless exists $i2c_adapters[$dev_nr]; next unless exists $i2c_adapters[$dev_nr];
scan_i2c_adapter($dev_nr, $by_default); scan_i2c_adapter($dev_nr, $by_default);
} }
filter_out_fake_i2c_drivers();
} }
if (!keys %chips_detected) { if (!keys %chips_detected) {