mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +00:00
List a few non-sensors Super IO chips.
Use a hash for modules list, for performance. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2414 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -1306,6 +1306,9 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
# name: The full chip name
|
||||
# driver: The driver name (without .o extension). Put in
|
||||
# "to-be-written" if it is not yet available.
|
||||
# Put in "not-a-sensor" if the chip doesn't have hardware monitoring
|
||||
# capabilities (listing such chips here removes the need of manual
|
||||
# lookup when people report them).
|
||||
# enter: The password sequence to write to the address register
|
||||
# devid: The device ID(s) we have to match (base device)
|
||||
# logdev: The logical device containing the sensors
|
||||
@@ -1386,6 +1389,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
devid => 0xf0,
|
||||
logdev => 0x09,
|
||||
},
|
||||
{
|
||||
name => "Nat. Semi. PC8741x Super IO",
|
||||
driver => "not-a-sensor",
|
||||
enter => [],
|
||||
devid => 0xee,
|
||||
},
|
||||
{
|
||||
name => "SMSC 47B27x Super IO Fan Sensors",
|
||||
driver => "smsc47m1",
|
||||
@@ -1434,6 +1443,13 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
logdev => 0x0a,
|
||||
exit => [0xaa],
|
||||
},
|
||||
{
|
||||
name => "SMSC 47M172 Super IO",
|
||||
driver => "not-a-sensor",
|
||||
enter => [0x55],
|
||||
devid => 0x14,
|
||||
exit => [0xaa],
|
||||
},
|
||||
{
|
||||
name => "VT1211 Super IO Sensors",
|
||||
driver => "vt1211",
|
||||
@@ -1482,6 +1498,13 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
logdev => 0x0b,
|
||||
exit => [0xaa],
|
||||
},
|
||||
{
|
||||
name => "Winbond W83L517D Super IO",
|
||||
driver => "not-a-sensor",
|
||||
enter => [0x87, 0x87],
|
||||
devid => 0x61,
|
||||
exit => [0xaa],
|
||||
},
|
||||
);
|
||||
|
||||
#######################
|
||||
@@ -1677,14 +1700,14 @@ sub kernel_version_at_least
|
||||
# MODULES #
|
||||
###########
|
||||
|
||||
use vars qw(@modules_list);
|
||||
use vars qw(%modules_list);
|
||||
|
||||
sub initialize_modules_list
|
||||
{
|
||||
open INPUTFILE, "/proc/modules" or die "Can't access /proc/modules!";
|
||||
while (<INPUTFILE>) {
|
||||
tr/_/-/;
|
||||
push @modules_list, /^(\S*)/ ;
|
||||
$modules_list{$1} = 1 if m/^(\S*)/;
|
||||
}
|
||||
close INPUTFILE;
|
||||
}
|
||||
@@ -1735,15 +1758,9 @@ sub initialize_proc_pci
|
||||
sub all_available_adapters
|
||||
{
|
||||
my @res = ();
|
||||
my ($module,$adapter);
|
||||
MODULES:
|
||||
foreach $module (@modules_list) {
|
||||
foreach $adapter (@pci_adapters) {
|
||||
if (exists $adapter->{driver} and $module eq $adapter->{driver}) {
|
||||
push @res, $module;
|
||||
next MODULES;
|
||||
}
|
||||
}
|
||||
foreach my $adapter (@pci_adapters) {
|
||||
push @res, $adapter->{driver}
|
||||
if exists $modules_list{$adapter->{driver}};
|
||||
}
|
||||
return @res;
|
||||
}
|
||||
@@ -2451,6 +2468,12 @@ sub scan_superio
|
||||
}
|
||||
if($val == $$chip{devid}) {
|
||||
print " Success...";
|
||||
# does it have hardware monitoring capabilities
|
||||
if($$chip{driver} eq "not-a-sensor") {
|
||||
print " (no hardware monitoring capabilities)\n";
|
||||
exit_superio($addrreg, $datareg, $chip, 1);
|
||||
next;
|
||||
}
|
||||
# switch to the sensor logical device
|
||||
outb($addrreg, $superio{logdevreg});
|
||||
outb($datareg, $$chip{logdev});
|
||||
@@ -4318,7 +4341,7 @@ sub main
|
||||
print "We will now try to load each adapter module in turn.\n";
|
||||
foreach $adapter (@adapters) {
|
||||
next if $adapter eq "DISABLED";
|
||||
if (contains $adapter, @modules_list) {
|
||||
if (exists($modules_list{$adapter})) {
|
||||
print "Module `$adapter' already loaded.\n";
|
||||
} else {
|
||||
print "Load `$adapter' (say NO if built into your kernel)? (YES/no): ";
|
||||
@@ -4341,7 +4364,7 @@ sub main
|
||||
|
||||
print " To continue, we need module `i2c-dev' to be loaded.\n";
|
||||
print " If it is built-in into your kernel, you can safely skip this.\n";
|
||||
if (contains "i2c-dev", @modules_list) {
|
||||
if (exists($modules_list{"i2c-dev"})) {
|
||||
print "i2c-dev is already loaded.\n";
|
||||
} else {
|
||||
if ($> != 0) {
|
||||
|
Reference in New Issue
Block a user