Skip to contentSkip to conversation

Add detection for EMCD103 chip revisions

PATCH In review Guenter Roeck 2 participants 3 messages Feb 18, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add detection for EMCD103 chip revisions

Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect (revision 5933)
+++ prog/detect/sensors-detect (working copy)
@@ -547,11 +547,16 @@
i2c_addrs => [0x2c..0x2e], i2c_detect => sub { lm85_detect(@_, 5); },
}, {
- name => "SMSC EMC6D103",
+ name => "SMSC EMC6D103 rev A0, A1",
driver => "lm85",
i2c_addrs => [0x2c..0x2e], i2c_detect => sub { lm85_detect(@_, 6); },
}, {
+ name => "SMSC EMC6D103 rev A2",
+ driver => "to-be-written", # lm85
+ i2c_addrs => [0x2c..0x2e],
+ i2c_detect => sub { lm85_detect(@_, 8); },
+ }, {
name => "Winbond WPCD377I", driver => "not-a-sensor", i2c_addrs => [0x2c..0x2e],
@@ -4776,7 +4781,11 @@
return if $verstep != 0x65; # EMC6D102
} elsif ($chip = 6) {
return if $vendor != 0x5c; # SMSC
- return if $verstep != 0x68; # EMC6D103
+ return if $verstep != 0x68 # EMC6D103 A0
+ && $verstep != 0x69; # EMC6D103 A1
+ } elsif ($chip = 8) {
+ return if $vendor != 0x5c; # SMSC
+ return if $verstep != 0x6a; # EMC6D103 A2
}

if ($vendor = 0x41) { # Analog Devices

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

#1 lore raw

Hi Guenter,

Quoted 8 lines · Guenter Roeck

Index: prog/detect/sensors-detect
=================================> --- prog/detect/sensors-detect (revision 5933)
+++ prog/detect/sensors-detect (working copy)

(quoted diff) +0 -1
@@ -547,11 +547,16 @@
 		i2c_addrs => [0x2c..0x2e],
 		i2c_detect => sub { lm85_detect(@_, 5); },
 	}, {
-		name => "SMSC EMC6D103",

Review line 559

Quoted 10 lines
(quoted diff) +6 -0
+		name => "SMSC EMC6D103 rev A0, A1",
 		driver => "lm85",
 		i2c_addrs => [0x2c..0x2e],
 		i2c_detect => sub { lm85_detect(@_, 6); },
 	}, {
+		name => "SMSC EMC6D103 rev A2",
+		driver => "to-be-written",	# lm85
+		i2c_addrs => [0x2c..0x2e],
+		i2c_detect => sub { lm85_detect(@_, 8); },
+	}, {

For the AS99127F, where we also had to differentiate, we have the following strings:

Asus AS99127F (rev.1)
Asus AS99127F (rev.2)

While I agree this is a minor issue, it would be nice to stay consistent.

Quoted 6 lines
(quoted diff) +0 -0
 		name => "Winbond WPCD377I",
 		driver => "not-a-sensor",
 		i2c_addrs => [0x2c..0x2e],
@@ -4776,7 +4781,11 @@
 		return if $verstep != 0x65;	# EMC6D102
 	} elsif ($chip = 6) {

Review line 4791

Quoted 10 lines
(quoted diff) +5 -1
 		return if $vendor != 0x5c;	# SMSC
-		return if $verstep != 0x68;	# EMC6D103
+		return if $verstep != 0x68	# EMC6D103 A0
+		       && $verstep != 0x69;	# EMC6D103 A1
+	} elsif ($chip = 8) {
+		return if $vendor != 0x5c;	# SMSC
+		return if $verstep != 0x6a;	# EMC6D103 A2
 	}
 
 	if ($vendor = 0x41) {			# Analog Devices

Can you please also update the "Chip to detect" comment at the top of function lm85_detect?

Other than this, the code looks OK, please commit.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Guenter Roeck
Quoted 25 lines · Jean Delvare

Hi Guenter,

Quoted 8 lines · Guenter Roeck

Index: prog/detect/sensors-detect
=================================> > --- prog/detect/sensors-detect (revision 5933)
+++ prog/detect/sensors-detect (working copy)

(quoted diff) +0 -1
@@ -547,11 +547,16 @@
 		i2c_addrs => [0x2c..0x2e],
 		i2c_detect => sub { lm85_detect(@_, 5); },
 	}, {
-		name => "SMSC EMC6D103",

Review line 559

Quoted 10 lines
(quoted diff) +6 -0
+		name => "SMSC EMC6D103 rev A0, A1",
 		driver => "lm85",
 		i2c_addrs => [0x2c..0x2e],
 		i2c_detect => sub { lm85_detect(@_, 6); },
 	}, {
+		name => "SMSC EMC6D103 rev A2",
+		driver => "to-be-written",	# lm85
+		i2c_addrs => [0x2c..0x2e],
+		i2c_detect => sub { lm85_detect(@_, 8); },
+	}, {

For the AS99127F, where we also had to differentiate, we have the following strings:

Quoted 6 lines

Asus AS99127F (rev.1)
Asus AS99127F (rev.2)

While I agree this is a minor issue, it would be nice to stay consistent.

I'll list it as EMC6D103S, following the datasheet.

Quoted 15 lines
Quoted 15 lines
(quoted diff) +5 -1
 		name => "Winbond WPCD377I",
 		driver => "not-a-sensor",
 		i2c_addrs => [0x2c..0x2e],
@@ -4776,7 +4781,11 @@
 		return if $verstep != 0x65;	# EMC6D102
 	} elsif ($chip = 6) {
 		return if $vendor != 0x5c;	# SMSC
-		return if $verstep != 0x68;	# EMC6D103
+		return if $verstep != 0x68	# EMC6D103 A0
+		       && $verstep != 0x69;	# EMC6D103 A1
+	} elsif ($chip = 8) {
+		return if $vendor != 0x5c;	# SMSC
+		return if $verstep != 0x6a;	# EMC6D103 A2
 	}
 
Quoted 5 lines

Review line 4791

Quoted 1 line
(quoted diff) +0 -0
 	if ($vendor = 0x41) {			# Analog Devices

Can you please also update the "Chip to detect" comment at the top of function lm85_detect?

Ok.

Guenter

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