From 3dd7d2d9a560bcba8c86391bfbc7bfd2d4936811 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 13 Aug 2007 20:08:14 +0000 Subject: [PATCH] Add FSC Heimdall, Poseidon II detection, change Poseidon I label from just plain Poseidon to Poseidon I git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4664 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 60 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 83530dbb..f061853b 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -1379,9 +1379,15 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x); i2c_detect => sub { ddcmonitor_detect(@_); }, }, { - name => "FSC Poseidon", + name => "FSC Poseidon I", driver => "fscpos", i2c_addrs => [0x73], + i2c_detect => sub { fscpeg_detect(@_); }, + }, + { + name => "FSC Poseidon II", + driver => "to-be-written", + i2c_addrs => [0x73], i2c_detect => sub { fscpos_detect(@_); }, }, { @@ -1396,6 +1402,12 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x); i2c_addrs => [0x73], i2c_detect => sub { fscher_detect(@_); }, }, + { + name => "FSC Heimdal", + driver => "to-be-written", + i2c_addrs => [0x73], + i2c_detect => sub { fschmd_detect(@_); }, + }, { name => "ALi M5879", driver => "to-be-written", @@ -4898,8 +4910,8 @@ sub ddcmonitor_detect # $_[1]: Address # Returns: undef if not detected, (8) if detected. # Registers used: -# 0x00-0x02: Identification ('P','E','G' -> Pegasus ? :-) -sub fscpos_detect +# 0x00-0x02: Identification ('P','E','G' -> Pegasus ? :-) aka Poseidon I +sub fscpeg_detect { my ($file,$addr) = @_; # check the first 3 registers @@ -4915,6 +4927,27 @@ sub fscpos_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 'P','O','S' -> Poseideon II +sub fscpos_detect +{ + my ($file,$addr) = @_; + # check the first 3 registers + if (i2c_smbus_read_byte_data($file,0x00) != 0x50) { + return; + } + if (i2c_smbus_read_byte_data($file,0x01) != 0x4F) { + return; + } + if (i2c_smbus_read_byte_data($file,0x02) != 0x53) { + return; + } + return (8); +} + # $_[0]: A reference to the file descriptor to access this chip. # $_[1]: Address # Returns: undef if not detected, (8) if detected. @@ -4957,6 +4990,27 @@ sub fscher_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','M','D') +sub fschmd_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) != 0x4D) { + return; + } + if (i2c_smbus_read_byte_data($file,0x02) != 0x44) { + 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.