Add SMSC DME1737 detection.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4185 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-09-26 09:18:33 +00:00
1 parent 9dcdca81b7
commit 9b5bba29c4
2 files changed
+34

No files matched your search

+1
View File
@@ -2,6 +2,7 @@ lm_sensors CHANGES file
-----------------------
2.10.2 (2006????)
Program sensors-detect: Add SMSC DME1737 detection
2.10.1 (20060924)
File doc/developers/checklist renamed to dev/developers/release_checklist
+33
View File
@@ -1330,6 +1330,12 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x);
i2c_addrs => [0x2c..0x2d],
i2c_detect => sub { smsc47m192_detect(@_); },
},
{
name => "SMSC DME1737",
driver => "to-be-written",
i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { dme1737_detect(@_); },
},
{
name => "Fintek F75111R/RG/N (GPIO)",
driver => "to-be-written",
@@ -1723,6 +1729,12 @@ $chip_kern26_w83791d = {
# No datasheet
devid => 0x76,
},
{
name => "SMSC DME1737 Super IO",
# Hardware monitoring features are accessed on the SMBus
driver => "not-a-sensor",
devid => 0x78,
},
],
},
{
@@ -4594,6 +4606,27 @@ sub smsc47m192_detect
return ($addr == 0x2d ? 6 : 5);
}
# $_[0]: A reference to the file descriptor to access this chip.
# We assume an i2c_set_slave_addr was already done.
# $_[1]: Address
# Returns: undef if not detected, 5 or 6 if detected.
# Registers used:
# 0x3E: Manufacturer ID
# 0x3F: Version/Stepping
# 0x40: Configuration (2 reserved bits)
# 0x42: Interrupt Status 2 (1 reserved bit)
# 0x43: VID (2 reserved bits)
sub dme1737_detect
{
my ($file, $addr) = @_;
return unless i2c_smbus_read_byte_data($file, 0x3E) == 0x55
and (i2c_smbus_read_byte_data($file, 0x3F) & 0xF8) == 0x88
and (i2c_smbus_read_byte_data($file, 0x40) & 0xC4) == 0x04
and (i2c_smbus_read_byte_data($file, 0x42) & 0x02) == 0x00
and (i2c_smbus_read_byte_data($file, 0x43) & 0xC0) == 0x00;
return ($addr == 0x2e ? 6 : 5);
}
# $_[0]: Chip to detect
# (1 = F75111R/RG/N, 2 = F75121R/F75122R/RG, 3 = F75373S/SG,
# 4 = F75375S/SP, 5 = F75387SG/RG, 6 = F75383M/S/F75384M/S,