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

Update sensors-detect for new fschmd driver

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4958 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Hans de Goede
2007-10-19 09:43:31 +00:00
parent bf2524aeae
commit 180ebb1d95

View File

@@ -1373,7 +1373,7 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x);
},
{
name => "FSC Poseidon I",
driver => "fscpos",
driver => "fschmd",
i2c_addrs => [0x73],
i2c_detect => sub { fscpeg_detect(@_); },
},
@@ -1385,22 +1385,28 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x);
},
{
name => "FSC Scylla",
driver => "fscscy",
driver => "fschmd",
i2c_addrs => [0x73],
i2c_detect => sub { fscscy_detect(@_); },
},
{
name => "FSC Hermes",
driver => "fscher",
driver => "fschmd",
i2c_addrs => [0x73],
i2c_detect => sub { fscher_detect(@_); },
},
{
name => "FSC Heimdal",
driver => "to-be-written",
driver => "fschmd",
i2c_addrs => [0x73],
i2c_detect => sub { fschmd_detect(@_); },
},
{
name => "FSC Heracles",
driver => "fschmd",
i2c_addrs => [0x73],
i2c_detect => sub { fschrc_detect(@_); },
},
{
name => "ALi M5879",
driver => "to-be-written",
@@ -5016,6 +5022,27 @@ sub fschmd_detect
return (8);
}
# $_[0]: A reference to the file descriptor to access this chip.
# $_[1]: Address
# Returns: undef if not detected, (8) if detected.
# Registers used:
# 0x00-0x02: Identification ('H','R','C')
sub fschrc_detect
{
my ($file,$addr) = @_;
# check the first 3 registers
if (i2c_smbus_read_byte_data($file,0x00) != 0x48) {
return;
}
if (i2c_smbus_read_byte_data($file,0x01) != 0x52) {
return;
}
if (i2c_smbus_read_byte_data($file,0x02) != 0x43) {
return;
}
return (8);
}
# $_[0]: A reference to the file descriptor to access this chip.
# $_[1]: Address (unused)
# Returns: undef if not detected, 5 if detected.