mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
detect I810E, SMBus 2.0 ARP-responder (maybe)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1259 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -334,6 +334,14 @@ use vars qw(@pci_adapters @chip_ids @undetectable_adapters);
|
||||
driver => "i2c-i810",
|
||||
match => sub { $_[0] =~ /^I810/ },
|
||||
} ,
|
||||
{
|
||||
vendid => 0x8086,
|
||||
devid => 0x7125,
|
||||
func => 0,
|
||||
procid => "Intel 82810E GMCH",
|
||||
driver => "i2c-i810",
|
||||
match => sub { $_[0] =~ /^I810/ },
|
||||
} ,
|
||||
{
|
||||
vendid => 0x8086,
|
||||
devid => 0x1132,
|
||||
@@ -518,8 +526,8 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
adm9240_detect adm1021_detect sis5595_isa_detect eeprom_detect
|
||||
via686a_isa_detect adm1022_detect ltc1710_detect gl525sm_detect
|
||||
lm87_detect ite_detect ite_isa_detect ite_alias_detect
|
||||
ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect fscscy_detect
|
||||
pcf8591_detect);
|
||||
ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect
|
||||
fscscy_detect pcf8591_detect arp_detect);
|
||||
|
||||
# This is a list of all recognized chips.
|
||||
# Each entry must have the following fields:
|
||||
@@ -643,6 +651,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
i2c_driver_addrs => [0x20..0x2f],
|
||||
i2c_detect => sub { w83781d_detect 4, @_},
|
||||
} ,
|
||||
{
|
||||
name => "Winbond W83L784R/AR",
|
||||
i2c_addrs => [0x00..0x68,0x6a..0x7f],
|
||||
i2c_driver_addrs => [0x20..0x2f],
|
||||
i2c_detect => sub { w83781d_detect 6, @_},
|
||||
} ,
|
||||
{
|
||||
name => "Winbond W83697HF",
|
||||
driver => "w83781d",
|
||||
@@ -813,6 +827,11 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
i2c_addrs => [0x48..0x4f],
|
||||
i2c_detect => sub { pcf8591_detect @_},
|
||||
},
|
||||
{
|
||||
name => "SMBus 2.0 ARP-Capable Device??",
|
||||
i2c_addrs => [0x61],
|
||||
i2c_detect => sub { arp_detect @_},
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -1814,7 +1833,7 @@ sub lm87_detect
|
||||
}
|
||||
|
||||
# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S,
|
||||
# 3 = W83627HF, 4 = AS99127F)
|
||||
# 3 = W83627HF, 4 = AS99127F, 6 = W83L784R/AR
|
||||
# $_[1]: A reference to the file descriptor to access this chip.
|
||||
# We may assume an i2c_set_slave_addr was already done.
|
||||
# $_[2]: Address
|
||||
@@ -1834,7 +1853,7 @@ sub w83781d_detect
|
||||
my ($reg1,$reg2,@res);
|
||||
my ($chip,$file,$addr) = @_;
|
||||
return unless (i2c_smbus_read_byte_data($file,0x48) == $addr)
|
||||
or ($chip == 4);
|
||||
or ($chip == 4) or ($chip == 6);
|
||||
$reg1 = i2c_smbus_read_byte_data($file,0x4e);
|
||||
$reg2 = i2c_smbus_read_byte_data($file,0x4f);
|
||||
if ($chip != 4) {
|
||||
@@ -1852,6 +1871,7 @@ sub w83781d_detect
|
||||
return if $chip == 2 and $reg1 != 0x40;
|
||||
return if $chip == 3 and $reg1 != 0x20;
|
||||
return if $chip == 4 and $reg1 != 0x30;
|
||||
return if $chip == 6 and $reg1 != 0x50;
|
||||
$reg1 = i2c_smbus_read_byte_data($file,0x4a);
|
||||
@res = (8);
|
||||
push @res, ($reg1 & 0x07) + 0x48 unless $reg1 & 0x08 ;
|
||||
@@ -2338,13 +2358,25 @@ sub fscscy_detect
|
||||
# $_[0]: A reference to the file descriptor to access this chip.
|
||||
# We may assume an i2c_set_slave_addr was already done.
|
||||
# $_[1]: Address
|
||||
# Returns: undef if not detected, (1) if detected.
|
||||
# Detection is impossible!
|
||||
# Returns: 1
|
||||
# Detection is impossible...
|
||||
sub pcf8591_detect
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
# $_[0]: A reference to the file descriptor to access this chip.
|
||||
# We may assume an i2c_set_slave_addr was already done.
|
||||
# $_[1]: Address
|
||||
# Returns: 1
|
||||
# This is a placeholder so we get a report if any device responds
|
||||
# to the SMBus Device Default Address (0x61), which is used for
|
||||
# ARP in SMBus 2.0.
|
||||
sub arp_detect
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
################
|
||||
# MAIN PROGRAM #
|
||||
|
Reference in New Issue
Block a user