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

add 8231 sensors detection

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1379 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2002-05-27 21:21:29 +00:00
parent 72c05c05dd
commit 01f1fba822

View File

@@ -640,7 +640,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
lm87_detect ite_detect ite_isa_detect ite_alias_detect
ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect
fscscy_detect pcf8591_detect arp_detect ipmi_kcs_detect
ipmi_smic_detect );
ipmi_smic_detect via8231_isa_detect );
# This is a list of all recognized chips.
# Each entry must have the following fields:
@@ -896,6 +896,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
isa_addrs => [ 0 ],
isa_detect => sub { via686a_isa_detect @_ },
},
{
name => "VIA Technologies VT8231 Integrated Sensors",
driver => "via686a",
isa_addrs => [ 0 ],
isa_detect => sub { via8231_isa_detect @_ },
},
{
name => "ITE IT8705F / IT8712F / SiS 950",
driver => "it87",
@@ -2301,6 +2307,42 @@ sub via686a_isa_detect
return 9;
}
# $_[0]: Address
# Returns: undef if not detected, (9) if detected.
# Note: It is already 99% certain this chip exists if we find the PCI
# entry. The exact address is encoded in PCI space.
sub via8231_isa_detect
{
my ($addr) = @_;
my ($adapter,$try,$local_try);
my $found = 0;
foreach $local_try (@pci_adapters) {
if ($local_try->{procid} eq "VIA Technologies VT8231 South Bridge") {
$try = $local_try;
$found = 1;
last;
}
}
return if not $found;
$found = 0;
foreach $adapter (@pci_list) {
if ((defined($adapter->{vendid}) and
$try->{vendid} == $adapter->{vendid} and
$try->{devid} == $adapter->{devid} and
$try->{func} == $adapter->{func}) or
(! defined($adapter->{vendid}) and
$adapter->{desc} =~ /$try->{procid}/ and
$try->{func} == $adapter->{func})) {
$found = 1;
last;
}
}
return if not $found;
return 9;
}
# $_[0]: Chip to detect (0 = ..., 1 = ...)
# $_[1]: A reference to the file descriptor to access this chip.
# We may assume an i2c_set_slave_addr was already done.