mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
Fujitsu Poseidon support from Hermann Jung <hej@odn.de>
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1179 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -445,7 +445,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);
|
||||
ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect);
|
||||
|
||||
# This is a list of all recognized chips.
|
||||
# Each entry must have the following fields:
|
||||
@@ -719,6 +719,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
i2c_addrs => [0x50],
|
||||
i2c_detect => sub { ddcmonitor_detect @_ },
|
||||
},
|
||||
{
|
||||
name => "FSC poseidon chip",
|
||||
driver => "fscpos",
|
||||
i2c_addrs => [0x73],
|
||||
i2c_detect => sub { fscpos_detect @_ },
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -2197,6 +2203,29 @@ FAILURE:
|
||||
return;
|
||||
}
|
||||
|
||||
# $_[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, (2) if detected.
|
||||
# Registers used:
|
||||
# 0x00-0x02: Identification
|
||||
sub fscpos_detect
|
||||
{
|
||||
my ($file,$addr) = @_;
|
||||
# check the first 3 registers
|
||||
if (i2c_smbus_read_byte_data($file,0x00) != 0x50) {
|
||||
return (0);
|
||||
}
|
||||
if (i2c_smbus_read_byte_data($file,0x01) != 0x45) {
|
||||
return (0);
|
||||
}
|
||||
if (i2c_smbus_read_byte_data($file,0x02) != 0x47) {
|
||||
return (0);
|
||||
}
|
||||
# no poseidon chip
|
||||
return (1);
|
||||
}
|
||||
|
||||
################
|
||||
# MAIN PROGRAM #
|
||||
################
|
||||
|
Reference in New Issue
Block a user