mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-03 15:55:15 +00:00
Add National Semiconductor LM64 detection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5214 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -21,6 +21,7 @@ SVN-HEAD
|
|||||||
Run chip_special_cases() earlier
|
Run chip_special_cases() earlier
|
||||||
New device ID for the SMSC SCH5317
|
New device ID for the SMSC SCH5317
|
||||||
Add SMSC SCH5127 detection
|
Add SMSC SCH5127 detection
|
||||||
|
Add National Semiconductor LM64 detection
|
||||||
|
|
||||||
3.0.1 (2008-01-28)
|
3.0.1 (2008-01-28)
|
||||||
documentation: Update the application writing guidelines
|
documentation: Update the application writing guidelines
|
||||||
|
@@ -1249,6 +1249,12 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x);
|
|||||||
i2c_addrs => [0x4c],
|
i2c_addrs => [0x4c],
|
||||||
i2c_detect => sub { lm63_detect(1, @_); },
|
i2c_detect => sub { lm63_detect(1, @_); },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name => "National Semiconductor LM64",
|
||||||
|
driver => "to-be-written", # lm63
|
||||||
|
i2c_addrs => [0x18, 0x4e],
|
||||||
|
i2c_detect => sub { lm63_detect(3, @_); },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name => "Fintek F75363SG",
|
name => "Fintek F75363SG",
|
||||||
driver => "lm63", # Not yet
|
driver => "lm63", # Not yet
|
||||||
@@ -4050,16 +4056,15 @@ sub lm90_detect
|
|||||||
}
|
}
|
||||||
|
|
||||||
# $_[0]: Chip to detect
|
# $_[0]: Chip to detect
|
||||||
# (1 = LM63, 2 = F75363SG)
|
# (1 = LM63, 2 = F75363SG, 3 = LM64)
|
||||||
# $_[1]: A reference to the file descriptor to access this chip.
|
# $_[1]: A reference to the file descriptor to access this chip.
|
||||||
# $_[2]: Address (unused)
|
# $_[2]: Address (unused)
|
||||||
# Returns: undef if not detected, 8 if detected.
|
# Returns: undef if not detected, 6 if detected.
|
||||||
# Registers used:
|
# Registers used:
|
||||||
# 0xfe: Manufacturer ID
|
# 0xfe: Manufacturer ID
|
||||||
# 0xff: Chip ID / die revision
|
# 0xff: Chip ID / die revision
|
||||||
# 0x03: Configuration (two or three unused bits)
|
# 0x03: Configuration (two or three unused bits)
|
||||||
# 0x16: Alert mask (two or three unused bits)
|
# 0x16: Alert mask (two or three unused bits)
|
||||||
# 0x03-0x0e: Mirrored registers (five pairs)
|
|
||||||
sub lm63_detect
|
sub lm63_detect
|
||||||
{
|
{
|
||||||
my ($chip, $file, $addr) = @_;
|
my ($chip, $file, $addr) = @_;
|
||||||
@@ -4079,17 +4084,14 @@ sub lm63_detect
|
|||||||
|| $cid != 0x20; # F75363SG
|
|| $cid != 0x20; # F75363SG
|
||||||
return if ($conf & 0x1a) != 0x00
|
return if ($conf & 0x1a) != 0x00
|
||||||
|| ($mask & 0x84) != 0x00;
|
|| ($mask & 0x84) != 0x00;
|
||||||
|
} elsif ($chip == 3) {
|
||||||
|
return if $mid != 0x01 # National Semiconductor
|
||||||
|
|| $cid != 0x51; # LM64
|
||||||
|
return if ($conf & 0x18) != 0x00
|
||||||
|
|| ($mask & 0xa4) != 0xa4;
|
||||||
}
|
}
|
||||||
|
|
||||||
# For compatibility with the LM86, some registers are mirrored
|
return 6;
|
||||||
# to alternative locations
|
|
||||||
return if $conf != i2c_smbus_read_byte_data($file, 0x09);
|
|
||||||
foreach my $i (0x04, 0x05, 0x07, 0x08) {
|
|
||||||
return if i2c_smbus_read_byte_data($file, $i)
|
|
||||||
!= i2c_smbus_read_byte_data($file, $i+6);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# $_[0]: Chip to detect
|
# $_[0]: Chip to detect
|
||||||
|
Reference in New Issue
Block a user