Skip to contentSkip to conversation

Add detection of SMSC EMC2103 to sensors-detect

PATCH New Steve Glendinning 1 participant 1 message Jun 6, 2010

lore
Share & tools
lore
#0 lore raw

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.

---
 prog/detect/sensors-detect |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
prog/detect/sensors-detect +9 -1
index e7f5ab2..9ffaf98 100755
@@ -1130,6 +1130,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x2c..0x2e],
 		i2c_detect => sub { dme1737_detect(@_, 2); },
 	}, {
+		name => "SMSC EMC2103",
+		driver => "emc2103",
+		i2c_addrs => [0x2e],
+		i2c_detect => sub { emc1403_detect(@_, 2); },
+	}, {
 		name => "Fintek F75121R/F75122R/RG (VID+GPIO)",
 		driver => "to-be-written",
 		i2c_addrs => [0x4e], # 0x37 not probed
@@ -5143,7 +5148,7 @@ sub fintek_detect
 	return 7;
 }
 
-# Chip to detect: 0 = EMC1403, 1 = EMC1404
+# Chip to detect: 0 = EMC1403, 1 = EMC1404, 2 = EMC2103
 # Registers used:
 #   0xfd: Device ID register
 #   0xfe: Vendor ID register
@@ -5163,6 +5168,9 @@ sub emc1403_detect
 	} elsif ($chip = 1) {
 		return unless $dev_id = 0x25;
 		return unless $rev = 0x01;
+	} elsif ($chip = 2) {
+		return unless ($dev_id = 0x24) || ($dev_id = 0x26);
+		return unless $rev = 0x01;
 	}
 
 	return 6;
Signature · 7 lines
1.7.0.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors