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

sensors-detect patches

* W83783S now correctly assumes only one LM75-like chip address
* No more runtime-errors if an unknown adapter was found.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@825 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard
2000-06-25 18:25:52 +00:00
parent d92cb40e10
commit 8b1076786d

View File

@@ -747,7 +747,7 @@ sub find_adapter_driver
for $adapter (@pci_adapters) {
return $adapter->{driver} if &{$adapter->{match}} ($_[0],$_[1]);
}
return "?????";
return "UNKNOWN";
}
#############################
@@ -1479,8 +1479,8 @@ sub w83781d_detect
return if $chip == 4 and $reg1 != 0x30;
$reg1 = i2c_smbus_read_byte_data($file,0x4a);
@res = (8);
push @res, ($reg1 & 0x07) + 0x48 unless $reg1 & 0x08;
push @res, (($reg1 & 0x80) >> 4) + 0x48 unless $reg1 & 0x80;
push @res, ($reg1 & 0x07) + 0x48 unless $reg1 & 0x08 ;
push @res, (($reg1 & 0x80) >> 4) + 0x48 unless ($reg1 & 0x80 or $chip == 2);
return @res;
}
@@ -1932,7 +1932,11 @@ sub generate_modprobes
for ($i = 0; $i < $nr; $i++) {
foreach $adap (@adapters) {
$modprobes .= "modprobe $adap->{driver}\n" if (defined($adap->{nr_later}) and $adap->{nr_later} == $i) and not $modprobes =~ /modprobe $adap->{driver}\n/;
if ($adap->{driver} eq "UNKNOWN") {
$modprobes .= "# modprobe some unknown, currently loaded adapter(s)";
} else {
$modprobes .= "modprobe $adap->{driver}\n" if (defined($adap->{nr_later}) and $adap->{nr_later} == $i) and not $modprobes =~ /modprobe $adap->{driver}\n/;
}
}
}
$modprobes .= "modprobe i2c-isa\n" if ($isa);