Add FSC Hermes detection.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2002 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2003-09-27 08:19:20 +00:00
1 parent 64418721e3
commit 51817d862a
1 file changed
+32 -3
+32 -3
View File
@@ -776,7 +776,8 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
fscscy_detect pcf8591_detect arp_detect ipmi_kcs_detect
ipmi_smic_detect via8231_isa_detect lm85_detect smartbatt_detect
adm1026_detect w83l785ts_detect lm83_detect lm90_detect
saa1064_detect w83l784r_detect mozart_detect max6650_detect);
saa1064_detect w83l784r_detect mozart_detect max6650_detect
fscher_detect);
# This is a list of all recognized chips.
# Each entry must have the following fields:
@@ -1195,17 +1196,23 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
i2c_detect => sub { ddcmonitor_detect @_ },
},
{
name => "FSC poseidon chip",
name => "FSC Poseidon",
driver => "fscpos",
i2c_addrs => [0x73],
i2c_detect => sub { fscpos_detect @_ },
},
{
name => "FSC Scylla chip",
name => "FSC Scylla",
driver => "fscscy",
i2c_addrs => [0x73],
i2c_detect => sub { fscscy_detect @_ },
},
{
name => "FSC Hermes",
driver => "to-be-written",
i2c_addrs => [0x73],
i2c_detect => sub { fscher_detect @_ },
},
{
name => "Philips Semiconductors PCF8591",
driver => "pcf8591",
@@ -3304,6 +3311,28 @@ sub fscscy_detect
return (8);
}
# $_[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, (8) if detected.
# Registers used:
# 0x00-0x02: Identification ('H','E','R')
sub fscher_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) != 0x45) {
return;
}
if (i2c_smbus_read_byte_data($file,0x02) != 0x52) {
return;
}
return (8);
}
# $_[0]: Chip to detect (0 = PCF8591, 1 = PCF8574, 2 = PCF8574A).
# $_[1]: A reference to the file descriptor to access this chip.
# We may assume an i2c_set_slave_addr was already done.