Add detection of SMSC EMC2103 to sensors-detect
PATCH 1/1 Add detection of SMSC EMC2103 to sensors-detect
This patch allows the sensors-detect script to detect the SMSC EMC2103 family of temperature sensors and fan controllers.
Signed-off-by Steve Glendinning <[email protected]>
--- prog/detect/sensors-detect | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
prog/detect/sensors-detect +20 -0
@@ -1130,6 +1130,11 @@ use vars qw(@i2c_adapter_names); i2c_addrs => [0x2c..0x2e], i2c_detect => sub { dme1737_detect(@_, 2); }, }, { + name => "SMSC EMC2103", + driver => "smscemc", + i2c_addrs => [0x2e], + i2c_detect => sub { smsc_emc2103_detect(@_); }, + }, { name => "Fintek F75121R/F75122R/RG (VID+GPIO)", driver => "to-be-written", i2c_addrs => [0x4e], # 0x37 not probed
@@ -5079,6 +5084,21 @@ sub smsc47m192_detect return ($addr = 0x2d ? 6 : 5); } +# Registers used: +# 0xFD: Product ID +# 0xFE: Manufacturer ID +# 0xFF: Revision +sub smsc_emc2103_detect +{ + my ($file, $addr) = @_; + return unless i2c_smbus_read_byte_data($file, 0xFE) = 0x5D; + + my $product = i2c_smbus_read_byte_data($file, 0xFD); + return unless (($product = 0x24) || ($product = 0x26)); + + return 8; +} + # Chip to detect: 1 = DME1737, 2 = SCH5027 # Registers used: # 0x3E: Manufacturer ID
Signature · 7 lines
1.6.6.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors