mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 13:57:41 +00:00
(MKN) Add fscscy detection. Tested on D1230 based System.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1225 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -470,7 +470,7 @@ 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);
|
||||
ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect fscscy_detect);
|
||||
|
||||
# This is a list of all recognized chips.
|
||||
# Each entry must have the following fields:
|
||||
@@ -752,6 +752,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
i2c_addrs => [0x73],
|
||||
i2c_detect => sub { fscpos_detect @_ },
|
||||
},
|
||||
{
|
||||
name => "FSC Scylla chip",
|
||||
driver => "fscscy",
|
||||
i2c_addrs => [0x73],
|
||||
i2c_detect => sub { fscscy_detect @_ },
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -2235,7 +2241,7 @@ FAILURE:
|
||||
# $_[1]: Address
|
||||
# Returns: undef if not detected, (8) if detected.
|
||||
# Registers used:
|
||||
# 0x00-0x02: Identification
|
||||
# 0x00-0x02: Identification ('P','E','G' -> Pegasus ? :-)
|
||||
sub fscpos_detect
|
||||
{
|
||||
my ($file,$addr) = @_;
|
||||
@@ -2252,6 +2258,28 @@ sub fscpos_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 ('S','C','Y')
|
||||
sub fscscy_detect
|
||||
{
|
||||
my ($file,$addr) = @_;
|
||||
# check the first 3 registers
|
||||
if (i2c_smbus_read_byte_data($file,0x00) != 0x53) {
|
||||
return;
|
||||
}
|
||||
if (i2c_smbus_read_byte_data($file,0x01) != 0x43) {
|
||||
return;
|
||||
}
|
||||
if (i2c_smbus_read_byte_data($file,0x02) != 0x59) {
|
||||
return;
|
||||
}
|
||||
return (8);
|
||||
}
|
||||
|
||||
################
|
||||
# MAIN PROGRAM #
|
||||
################
|
||||
|
Reference in New Issue
Block a user