diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 143aaf3b..1fc986fa 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -39,8 +39,8 @@ foreach ('/usr/sbin', '/usr/local/sbin', '/sbin') { ######################### use constant NO_CACHE => 1; -use vars qw(@pci_adapters @chip_ids $i2c_addresses_to_scan @superio_ids - @cpu_ids $revision @i2c_byte_cache); +use vars qw(@pci_adapters @chip_ids @non_hwmon_chip_ids $i2c_addresses_to_scan + @superio_ids @cpu_ids $revision @i2c_byte_cache); $revision = '$Revision$ ($Date$)'; $revision =~ s/\$\w+: (.*?) \$/$1/g; @@ -439,7 +439,6 @@ use vars qw(@i2c_adapter_names); # name: The full chip name # driver: The driver name. Put in exactly: # * "to-be-written" if it is not yet available -# * "not-a-sensor" if it is not a hardware monitoring chip # * "use-isa-instead" if no i2c driver will be written # i2c_addrs (optional): For I2C chips, the list of I2C addresses to # probe. @@ -638,11 +637,6 @@ use vars qw(@i2c_adapter_names); driver => "w83793", i2c_addrs => [0x2c..0x2f], i2c_detect => sub { w83793_detect(@_); }, - }, { - name => "Winbond W83791SD", - driver => "not-a-sensor", - i2c_addrs => [0x2c..0x2f], - i2c_detect => sub { w83791sd_detect(@_); }, }, { name => "Winbond W83627HF", driver => "use-isa-instead", @@ -1000,24 +994,6 @@ use vars qw(@i2c_adapter_names); driver => "it87", i2c_addrs => [0x28..0x2f], i2c_detect => sub { it8712_i2c_detect(@_); }, - }, { - name => "ITE IT8201R/IT8203R/IT8206R/IT8266R", - driver => "not-a-sensor", - i2c_addrs => [0x4e], - i2c_detect => sub { ite_overclock_detect(@_); }, - }, { - name => "SPD EEPROM", - driver => "not-a-sensor", - # Can also live at 0x54-0x57, but we don't care: we only check - # for SPD and EDID EEPROMs because some hardware monitoring - # chips can live at 0x50-0x53. - i2c_addrs => [0x50..0x53], - i2c_detect => sub { eeprom_detect(@_); }, - }, { - name => "EDID EEPROM", - driver => "not-a-sensor", - i2c_addrs => [0x50..0x53], - i2c_detect => sub { ddcmonitor_detect(@_); }, }, { name => "FSC Poseidon I", driver => sub { kernel_version_at_least(2, 6, 24) ? "fschmd" : "fscpos" }, @@ -1068,11 +1044,6 @@ use vars qw(@i2c_adapter_names); driver => "dme1737", i2c_addrs => [0x2c..0x2e], i2c_detect => sub { dme1737_detect(@_, 2); }, - }, { - name => "Fintek F75111R/RG/N (GPIO)", - driver => "not-a-sensor", - i2c_addrs => [0x4e], # 0x37 not probed - i2c_detect => sub { fintek_detect(@_, 1); }, }, { name => "Fintek F75121R/F75122R/RG (VID+GPIO)", driver => "to-be-written", @@ -1126,6 +1097,38 @@ use vars qw(@i2c_adapter_names); } ); +# Here is a similar list, but for devices which are not hardware monitoring +# chips. We only list popular devices which happen to live at the same I2C +# address as recognized hardware monitoring chips. The idea is to make it +# clear that the chip in question is of no interest for lm-sensors. +@non_hwmon_chip_ids = ( + { + name => "Winbond W83791SD", + driver => "not-a-sensor", + i2c_addrs => [0x2c..0x2f], + i2c_detect => sub { w83791sd_detect(@_); }, + }, { + name => "Fintek F75111R/RG/N (GPIO)", + driver => "not-a-sensor", + i2c_addrs => [0x37, 0x4e], + i2c_detect => sub { fintek_detect(@_, 1); }, + }, { + name => "ITE IT8201R/IT8203R/IT8206R/IT8266R", + driver => "not-a-sensor", + i2c_addrs => [0x4e], + i2c_detect => sub { ite_overclock_detect(@_); }, + }, { + name => "SPD EEPROM", + driver => "not-a-sensor", + i2c_addrs => [0x50..0x57], + i2c_detect => sub { eeprom_detect(@_); }, + }, { + name => "EDID EEPROM", + driver => "not-a-sensor", + i2c_addrs => [0x50], + i2c_detect => sub { ddcmonitor_detect(@_); }, + } +); # This is a list of all recognized superio chips. # Each entry must have the following fields: @@ -2138,7 +2141,6 @@ sub initialize_modules_supported { foreach my $chip (@chip_ids) { next if $chip->{driver} eq "to-be-written"; - next if $chip->{driver} eq "not-a-sensor"; next if $chip->{driver} eq "use-isa-instead"; my $normalized = $chip->{driver}; @@ -2733,7 +2735,6 @@ sub i2c_addresses_to_scan foreach my $chip (@chip_ids) { next unless defined $chip->{i2c_addrs}; - next if $chip->{driver} eq 'not-a-sensor'; foreach $addr (@{$chip->{i2c_addrs}}) { $used[$addr]++; } @@ -2833,7 +2834,7 @@ sub scan_adapter } $| = 1; - foreach $chip (@chip_ids) { + foreach $chip (@chip_ids, @non_hwmon_chip_ids) { if (exists $chip->{i2c_addrs} and contains($addr, @{$chip->{i2c_addrs}})) { printf("\%-60s", sprintf("Probing for `\%s'... ", $chip->{name})); if (($conf, @chips) = &{$chip->{i2c_detect}} (\*FILE, $addr)) {