sensors-detect: Add Texas Instruments TMP401 detection

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4999 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Hans de Goede committed 2007-10-28 14:12:19 +00:00
1 parent 7383ca5f92
commit 278ac47e54
2 files changed
+15 -1

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ lm_sensors CHANGES file
SVN-HEAD
Library: Fix fschrc and fschmd support
Program sensors-detect: Add Texas Instruments TMP401 detection
2.10.5 (20071024)
File i2c-dev.h: Rename I2C_FUNC_SMBUS_HWPEC_CALC to I2C_FUNC_SMBUS_PEC
+14 -1
View File
@@ -1236,6 +1236,12 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x);
i2c_addrs => [0x4c],
i2c_detect => sub { lm90_detect(8, @_); },
},
{
name => "Texas Instruments TMP401",
driver => "tmp401",
i2c_addrs => [0x4c],
i2c_detect => sub { lm90_detect(9, @_); },
},
{
name => "National Semiconductor LM63",
driver => "lm63",
@@ -3905,7 +3911,7 @@ sub lm83_detect
# $_[0]: Chip to detect
# (0 = LM90, 1=LM89/LM99, 2=LM86, 3=ADM1032, 4=MAX6657/MAX6658/MAX6659,
# 5 = ADT7461, 6 = MAX6648/MAX6692, 7 = MAX6680/MAX6681,
# 8 = W83L771W/G)
# 8 = W83L771W/G), 9 = TI TMP401
# $_[1]: A reference to the file descriptor to access this chip.
# $_[2]: Address
# Returns: undef if not detected, 4, 6 or 8 if detected.
@@ -3987,6 +3993,13 @@ sub lm90_detect
return if $cid != 0x00; # W83L771W/G
return 6;
}
if ($chip == 9) {
return if ($conf & 0x1B) != 0;
return if $rate > 0x0F;
return if $mid != 0x55; # Texas Instruments
return if $cid != 0x11; # TMP401
return 6;
}
return;
}