All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A /
@ 2011-04-06  7:21 Guenter Roeck
  2011-04-06  8:08 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect Jean Delvare
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Guenter Roeck @ 2011-04-06  7:21 UTC (permalink / raw)
  To: lm-sensors

This patch adds code to detect ADT7461A / NCT1008 to sensors-detect.

---

Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect	(revision 5954)
+++ prog/detect/sensors-detect	(working copy)
@@ -1045,6 +1045,11 @@
 		i2c_addrs => [0x4c..0x4d],
 		i2c_detect => sub { lm90_detect(@_, 5); },
 	}, {
+		name => "Analog Devices ADT7461A, ON Semiconductor NCT1008",
+		driver => "to-be-written",	# lm90
+		i2c_addrs => [0x4c..0x4d],
+		i2c_detect => sub { lm90_detect(@_, 13); },
+	}, {
 		name => "Analog Devices ADT7481",
 		driver => "to-be-written",
 		i2c_addrs => [0x4c, 0x4b],
@@ -4317,7 +4322,8 @@
 #		  4 = MAX6654, 5 = ADT7461,
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
-#		  11 = W83L771AWG/ASG, 12 = MAX6690
+#		  11 = W83L771AWG/ASG, 12 = MAX6690,
+#		  13 = ADT7461A/NCT1008
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
@@ -4416,6 +4422,12 @@
 		return if $mid != 0x4d;		# Maxim
 		return 8 if $cid = 0x09;	# MAX6690
 	}
+	if ($chip = 13) {
+		return if ($conf & 0x1b) != 0;
+		return if $rate > 0x0a;
+		return if $mid != 0x41;		# Analog Devices
+		return 8 if $cid = 0x57;	# ADT7461A, NCT1008
+	}
 	return;
 }
 
Index: CHANGES
=================================--- CHANGES	(revision 5954)
+++ CHANGES	(working copy)
@@ -1,6 +1,9 @@
 lm-sensors CHANGES file
 -----------------------
 
+head
+  sensors-detect: Add detection of ADT7461A / NCT1008
+
 3.3.0 (2011-03-28)
   Makefile: Check for bison and flex
   libsensors: Add support for intrusion detection (#2370)

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
@ 2011-04-06  8:08 ` Jean Delvare
  2011-07-08 16:25 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect LM95245 Guenter Roeck
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2011-04-06  8:08 UTC (permalink / raw)
  To: lm-sensors

On Wed, 6 Apr 2011 00:21:37 -0700, Guenter Roeck wrote:
> This patch adds code to detect ADT7461A / NCT1008 to sensors-detect.
> 
> ---
> 
> Index: prog/detect/sensors-detect
> =================================> --- prog/detect/sensors-detect	(revision 5954)
> +++ prog/detect/sensors-detect	(working copy)
> @@ -1045,6 +1045,11 @@
>  		i2c_addrs => [0x4c..0x4d],
>  		i2c_detect => sub { lm90_detect(@_, 5); },
>  	}, {
> +		name => "Analog Devices ADT7461A, ON Semiconductor NCT1008",
> +		driver => "to-be-written",	# lm90
> +		i2c_addrs => [0x4c..0x4d],
> +		i2c_detect => sub { lm90_detect(@_, 13); },
> +	}, {
>  		name => "Analog Devices ADT7481",
>  		driver => "to-be-written",
>  		i2c_addrs => [0x4c, 0x4b],
> @@ -4317,7 +4322,8 @@
>  #		  4 = MAX6654, 5 = ADT7461,
>  #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
>  #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
> -#		  11 = W83L771AWG/ASG, 12 = MAX6690
> +#		  11 = W83L771AWG/ASG, 12 = MAX6690,
> +#		  13 = ADT7461A/NCT1008
>  # Registers used:
>  #   0x03: Configuration
>  #   0x04: Conversion rate
> @@ -4416,6 +4422,12 @@
>  		return if $mid != 0x4d;		# Maxim
>  		return 8 if $cid = 0x09;	# MAX6690
>  	}
> +	if ($chip = 13) {
> +		return if ($conf & 0x1b) != 0;
> +		return if $rate > 0x0a;
> +		return if $mid != 0x41;		# Analog Devices
> +		return 8 if $cid = 0x57;	# ADT7461A, NCT1008
> +	}
>  	return;
>  }
>  
> Index: CHANGES
> =================================> --- CHANGES	(revision 5954)
> +++ CHANGES	(working copy)
> @@ -1,6 +1,9 @@
>  lm-sensors CHANGES file
>  -----------------------
>  
> +head
> +  sensors-detect: Add detection of ADT7461A / NCT1008
> +
>  3.3.0 (2011-03-28)
>    Makefile: Check for bison and flex
>    libsensors: Add support for intrusion detection (#2370)
> 

Looks alright, please commit. Please add the new chips to wiki/Devices
too.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lm-sensors] [PATCH] sensors-detect: Add code to detect LM95245
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
  2011-04-06  8:08 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect Jean Delvare
@ 2011-07-08 16:25 ` Guenter Roeck
  2011-07-10 15:46 ` Jean Delvare
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2011-07-08 16:25 UTC (permalink / raw)
  To: lm-sensors

Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect	(revision 5983)
+++ prog/detect/sensors-detect	(working copy)
@@ -1008,6 +1008,11 @@
 		i2c_addrs => [0x2b, 0x19, 0x2a],
 		i2c_detect => sub { lm95231_detect(@_, 1); },
 	}, {
+		name => "National Semiconductor LM95245",
+		driver => "lm95245",
+		i2c_addrs => [0x2b, 0x19, 0x2a],
+		i2c_detect => sub { lm95231_detect(@_, 2); },
+	}, {
 		name => "National Semiconductor LM63",
 		driver => "lm63",
 		i2c_addrs => [0x4c],
@@ -4540,7 +4545,7 @@
 	return 5;
 }
 
-# Chip to detect: 0 = LM95231, 1 = LM95241
+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
 # Registers used:
 #   0x02: Status (3 unused bits)
 #   0x03: Configuration (3 unused bits)
@@ -4557,6 +4562,7 @@
 	return if $mid != 0x01;				# National Semiconductor
 	return if $chip = 0 && $cid != 0xa1;		# LM95231
 	return if $chip = 1 && $cid != 0xa4;		# LM95241
+	return if $chip = 2 && $cid != 0xb3;		# LM95245
 
 	return if i2c_smbus_read_byte_data($file, 0x02) & 0x70;
 	return if i2c_smbus_read_byte_data($file, 0x03) & 0x89;
Index: CHANGES
=================================--- CHANGES	(revision 5983)
+++ CHANGES	(working copy)
@@ -17,6 +17,7 @@
                   Add detection of ITE IT8772E
                   Don't advertise the ipmisensors driver
                   Add detection of SA56004
+                  Add detection of LM95245
 
 3.3.0 (2011-03-28)
   Makefile: Check for bison and flex

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect LM95245
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
  2011-04-06  8:08 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect Jean Delvare
  2011-07-08 16:25 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect LM95245 Guenter Roeck
@ 2011-07-10 15:46 ` Jean Delvare
  2011-07-10 15:57 ` Guenter Roeck
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2011-07-10 15:46 UTC (permalink / raw)
  To: lm-sensors

Hi Guenter,

On Fri, 8 Jul 2011 09:25:45 -0700, Guenter Roeck wrote:
> Index: prog/detect/sensors-detect
> =================================> --- prog/detect/sensors-detect	(revision 5983)
> +++ prog/detect/sensors-detect	(working copy)
> @@ -1008,6 +1008,11 @@
>  		i2c_addrs => [0x2b, 0x19, 0x2a],
>  		i2c_detect => sub { lm95231_detect(@_, 1); },
>  	}, {
> +		name => "National Semiconductor LM95245",
> +		driver => "lm95245",
> +		i2c_addrs => [0x2b, 0x19, 0x2a],

The datasheet I have lists the following 5 addresses instead: 0x18,
0x19, 0x29, 0x4C and 0x4D, and the lm95245 driver agrees.

> +		i2c_detect => sub { lm95231_detect(@_, 2); },
> +	}, {
>  		name => "National Semiconductor LM63",
>  		driver => "lm63",
>  		i2c_addrs => [0x4c],
> @@ -4540,7 +4545,7 @@
>  	return 5;
>  }
>  
> -# Chip to detect: 0 = LM95231, 1 = LM95241
> +# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
>  # Registers used:
>  #   0x02: Status (3 unused bits)
>  #   0x03: Configuration (3 unused bits)
> @@ -4557,6 +4562,7 @@
>  	return if $mid != 0x01;				# National Semiconductor
>  	return if $chip = 0 && $cid != 0xa1;		# LM95231
>  	return if $chip = 1 && $cid != 0xa4;		# LM95241
> +	return if $chip = 2 && $cid != 0xb3;		# LM95245
>  
>  	return if i2c_smbus_read_byte_data($file, 0x02) & 0x70;
>  	return if i2c_smbus_read_byte_data($file, 0x03) & 0x89;

These checks for unused bits were OK for the LM95231/LM95241 but not
for the LM95245.

> Index: CHANGES
> =================================> --- CHANGES	(revision 5983)
> +++ CHANGES	(working copy)
> @@ -17,6 +17,7 @@
>                    Add detection of ITE IT8772E
>                    Don't advertise the ipmisensors driver
>                    Add detection of SA56004
> +                  Add detection of LM95245
>  
>  3.3.0 (2011-03-28)
>    Makefile: Check for bison and flex

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect LM95245
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
                   ` (2 preceding siblings ...)
  2011-07-10 15:46 ` Jean Delvare
@ 2011-07-10 15:57 ` Guenter Roeck
  2014-12-04 19:14 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435 Guenter Roeck
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2011-07-10 15:57 UTC (permalink / raw)
  To: lm-sensors

On Sun, Jul 10, 2011 at 11:46:40AM -0400, Jean Delvare wrote:
> Hi Guenter,
> 
> On Fri, 8 Jul 2011 09:25:45 -0700, Guenter Roeck wrote:
> > Index: prog/detect/sensors-detect
> > =================================> > --- prog/detect/sensors-detect	(revision 5983)
> > +++ prog/detect/sensors-detect	(working copy)
> > @@ -1008,6 +1008,11 @@
> >  		i2c_addrs => [0x2b, 0x19, 0x2a],
> >  		i2c_detect => sub { lm95231_detect(@_, 1); },
> >  	}, {
> > +		name => "National Semiconductor LM95245",
> > +		driver => "lm95245",
> > +		i2c_addrs => [0x2b, 0x19, 0x2a],
> 
> The datasheet I have lists the following 5 addresses instead: 0x18,
> 0x19, 0x29, 0x4C and 0x4D, and the lm95245 driver agrees.
> 
> > +		i2c_detect => sub { lm95231_detect(@_, 2); },
> > +	}, {
> >  		name => "National Semiconductor LM63",
> >  		driver => "lm63",
> >  		i2c_addrs => [0x4c],
> > @@ -4540,7 +4545,7 @@
> >  	return 5;
> >  }
> >  
> > -# Chip to detect: 0 = LM95231, 1 = LM95241
> > +# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
> >  # Registers used:
> >  #   0x02: Status (3 unused bits)
> >  #   0x03: Configuration (3 unused bits)
> > @@ -4557,6 +4562,7 @@
> >  	return if $mid != 0x01;				# National Semiconductor
> >  	return if $chip = 0 && $cid != 0xa1;		# LM95231
> >  	return if $chip = 1 && $cid != 0xa4;		# LM95241
> > +	return if $chip = 2 && $cid != 0xb3;		# LM95245
> >  
> >  	return if i2c_smbus_read_byte_data($file, 0x02) & 0x70;
> >  	return if i2c_smbus_read_byte_data($file, 0x03) & 0x89;
> 
> These checks for unused bits were OK for the LM95231/LM95241 but not
> for the LM95245.
> 
Sigh. Must have been late.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
                   ` (3 preceding siblings ...)
  2011-07-10 15:57 ` Guenter Roeck
@ 2014-12-04 19:14 ` Guenter Roeck
  2014-12-04 21:57 ` Guenter Roeck
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-12-04 19:14 UTC (permalink / raw)
  To: lm-sensors

Also update driver support status for TMP431 and TMP432.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 CHANGES                    |  1 +
 prog/detect/sensors-detect | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/CHANGES b/CHANGES
index 638a8bf..534b810 100644
--- a/CHANGES
+++ b/CHANGES
@@ -24,6 +24,7 @@ SVN HEAD
                   Document support for EMC1402, EMC1404, and EMC1424
                   Detect new revisions of EMC14xx
                   Add detection of EMC1422
+                  Add detection of TMP435
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
index 448cf22..d169fb9 100755
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -1029,15 +1029,20 @@ use vars qw(@i2c_adapter_names);
 		i2c_detect => sub { tmp42x_detect(@_, 2); },
 	}, {
 		name => "Texas Instruments TMP431",
-		driver => "to-be-written",		# tmp401
+		driver => "tmp401",
 		i2c_addrs => [0x4c, 0x4d],
 		i2c_detect => sub { lm90_detect(@_, 16); },
 	}, {
 		name => "Texas Instruments TMP432",
-		driver => "to-be-written",		# tmp401
+		driver => "tmp401",
 		i2c_addrs => [0x4c, 0x4d],
 		i2c_detect => sub { lm90_detect(@_, 17); },
 	}, {
+		name => "Texas Instruments TMP435",
+		driver => "tmp401",
+		i2c_addrs => [0x4c],
+		i2c_detect => sub { lm90_detect(@_, 19); },
+	}, {
 		name => "Texas Instruments TMP441",
 		driver => "tmp421",
 		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
@@ -4674,7 +4679,8 @@ sub max6680_95_detect
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
 #		  13 = ADT7461A/NCT1008, 14 = SA56004,
-#		  15 = G781, 16 = TMP431, 17 = TMP432, 18 = TMP451
+#		  15 = G781, 16 = TMP431, 17 = TMP432, 18 = TMP451,
+#		  19 = TMP435
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
@@ -4810,6 +4816,12 @@ sub lm90_detect
 		return if $mid != 0x55;		# Texas Instruments
 		return 4 if ($cid = 0x00);	# TMP451
 	}
+	if ($chip = 19) {
+		return if ($conf & 0x1B) != 0;
+		return if $rate > 0x0F;
+		return if $mid != 0x55;		# Texas Instruments
+		return 6 if ($cid = 0x35);	# TMP435
+	}
 	return;
 }
 
-- 
1.9.1


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
                   ` (4 preceding siblings ...)
  2014-12-04 19:14 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435 Guenter Roeck
@ 2014-12-04 21:57 ` Guenter Roeck
  2014-12-05  9:37 ` Jean Delvare
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-12-04 21:57 UTC (permalink / raw)
  To: lm-sensors

On Thu, Dec 04, 2014 at 11:14:59AM -0800, Guenter Roeck wrote:
> Also update driver support status for TMP431 and TMP432.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  CHANGES                    |  1 +
>  prog/detect/sensors-detect | 18 +++++++++++++++---
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 
[ ... ]

> +		name => "Texas Instruments TMP435",
> +		driver => "tmp401",
> +		i2c_addrs => [0x4c],

I requested samples to figure out if 0x4c is really the only
supported address.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
                   ` (5 preceding siblings ...)
  2014-12-04 21:57 ` Guenter Roeck
@ 2014-12-05  9:37 ` Jean Delvare
  2014-12-05  9:43 ` Jean Delvare
  2014-12-05 14:16 ` Guenter Roeck
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2014-12-05  9:37 UTC (permalink / raw)
  To: lm-sensors

SGkgR3VlbnRlciwKCk9uIFRodSwgNCBEZWMgMjAxNCAxMzo1NzoyMiAtMDgwMCwgR3VlbnRlciBS
b2VjayB3cm90ZToKPiBPbiBUaHUsIERlYyAwNCwgMjAxNCBhdCAxMToxNDo1OUFNIC0wODAwLCBH
dWVudGVyIFJvZWNrIHdyb3RlOgo+ID4gQWxzbyB1cGRhdGUgZHJpdmVyIHN1cHBvcnQgc3RhdHVz
IGZvciBUTVA0MzEgYW5kIFRNUDQzMi4KPiA+IAo+ID4gU2lnbmVkLW9mZi1ieTogR3VlbnRlciBS
b2VjayA8bGludXhAcm9lY2stdXMubmV0Pgo+ID4gLS0tCj4gPiAgQ0hBTkdFUyAgICAgICAgICAg
ICAgICAgICAgfCAgMSArCj4gPiAgcHJvZy9kZXRlY3Qvc2Vuc29ycy1kZXRlY3QgfCAxOCArKysr
KysrKysrKysrKystLS0KPiA+ICAyIGZpbGVzIGNoYW5nZWQsIDE2IGluc2VydGlvbnMoKyksIDMg
ZGVsZXRpb25zKC0pCj4gPiAKPiBbIC4uLiBdCj4gCj4gPiArCQluYW1lID0+ICJUZXhhcyBJbnN0
cnVtZW50cyBUTVA0MzUiLAo+ID4gKwkJZHJpdmVyID0+ICJ0bXA0MDEiLAo+ID4gKwkJaTJjX2Fk
ZHJzID0+IFsweDRjXSwKPiAKPiBJIHJlcXVlc3RlZCBzYW1wbGVzIHRvIGZpZ3VyZSBvdXQgaWYg
MHg0YyBpcyByZWFsbHkgdGhlIG9ubHkKPiBzdXBwb3J0ZWQgYWRkcmVzcy4KCkkgdmVyeSBtdWNo
IGRvdWJ0IHRoYXQgMHg0QyBpcyB0aGUgb25seSBzdXBwb3J0ZWQgYWRkcmVzcy4gVGhlcmUgYXJl
CmxpdGVyYWxseSBhIGRvemVuIHBsYWNlcyBpbiB0aGUgZGF0YXNoZWV0IHdoaWNoIGluZGljYXRl
cyB0aGF0IHRoZQphZGRyZXNzIGlzIHByb2dyYW1tYWJsZSwgc3RhcnRpbmcgd2l0aCB0aGUgcHJv
ZHVjdCBkZXNjcmlwdGlvbiBpdHNlbGY6CiLCsTHCsEMgVEVNUEVSQVRVUkUgU0VOU09SIHdpdGgg
KC4uLikgYW5kIFByb2dyYW1tYWJsZSBBZGRyZXNzaW5nIi4gQW5kCnlvdSB3b3VsZG4ndCBwdXQg
MiBhZGRyZXNzaW5nIHBpbnMgb24gYSBjaGlwIHdpdGggYSBmaXhlZCBhZGRyZXNzLgoKLS0gCkpl
YW4gRGVsdmFyZQpTVVNFIEwzIFN1cHBvcnQKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fCmxtLXNlbnNvcnMgbWFpbGluZyBsaXN0CmxtLXNlbnNvcnNAbG0t
c2Vuc29ycy5vcmcKaHR0cDovL2xpc3RzLmxtLXNlbnNvcnMub3JnL21haWxtYW4vbGlzdGluZm8v
bG0tc2Vuc29ycw=

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
                   ` (6 preceding siblings ...)
  2014-12-05  9:37 ` Jean Delvare
@ 2014-12-05  9:43 ` Jean Delvare
  2014-12-05 14:16 ` Guenter Roeck
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2014-12-05  9:43 UTC (permalink / raw)
  To: lm-sensors

Hi Guenter,

On Thu,  4 Dec 2014 11:14:59 -0800, Guenter Roeck wrote:
> Also update driver support status for TMP431 and TMP432.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  CHANGES                    |  1 +
>  prog/detect/sensors-detect | 18 +++++++++++++++---
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/CHANGES b/CHANGES
> index 638a8bf..534b810 100644
> --- a/CHANGES
> +++ b/CHANGES
> @@ -24,6 +24,7 @@ SVN HEAD
>                    Document support for EMC1402, EMC1404, and EMC1424
>                    Detect new revisions of EMC14xx
>                    Add detection of EMC1422
> +                  Add detection of TMP435
>  
>  3.3.5 "Happy Birthday Beddy" (2014-01-22)
>    libsensors: Improve documentation of two functions
> diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
> index 448cf22..d169fb9 100755
> --- a/prog/detect/sensors-detect
> +++ b/prog/detect/sensors-detect
> @@ -1029,15 +1029,20 @@ use vars qw(@i2c_adapter_names);
>  		i2c_detect => sub { tmp42x_detect(@_, 2); },
>  	}, {
>  		name => "Texas Instruments TMP431",
> -		driver => "to-be-written",		# tmp401
> +		driver => "tmp401",
>  		i2c_addrs => [0x4c, 0x4d],
>  		i2c_detect => sub { lm90_detect(@_, 16); },
>  	}, {
>  		name => "Texas Instruments TMP432",
> -		driver => "to-be-written",		# tmp401
> +		driver => "tmp401",
>  		i2c_addrs => [0x4c, 0x4d],
>  		i2c_detect => sub { lm90_detect(@_, 17); },
>  	}, {
> +		name => "Texas Instruments TMP435",
> +		driver => "tmp401",
> +		i2c_addrs => [0x4c],
> +		i2c_detect => sub { lm90_detect(@_, 19); },
> +	}, {
>  		name => "Texas Instruments TMP441",
>  		driver => "tmp421",
>  		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
> @@ -4674,7 +4679,8 @@ sub max6680_95_detect
>  #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
>  #		  11 = W83L771AWG/ASG, 12 = MAX6690,
>  #		  13 = ADT7461A/NCT1008, 14 = SA56004,
> -#		  15 = G781, 16 = TMP431, 17 = TMP432, 18 = TMP451
> +#		  15 = G781, 16 = TMP431, 17 = TMP432, 18 = TMP451,
> +#		  19 = TMP435
>  # Registers used:
>  #   0x03: Configuration
>  #   0x04: Conversion rate
> @@ -4810,6 +4816,12 @@ sub lm90_detect
>  		return if $mid != 0x55;		# Texas Instruments
>  		return 4 if ($cid = 0x00);	# TMP451
>  	}
> +	if ($chip = 19) {
> +		return if ($conf & 0x1B) != 0;

Would it make sense to also check configuration register 2 at 0x1a? It
has 5 unused bits. We do check configuration register 2 (but at a
different address) for other brands already.

> +		return if $rate > 0x0F;
> +		return if $mid != 0x55;		# Texas Instruments
> +		return 6 if ($cid = 0x35);	# TMP435
> +	}
>  	return;
>  }

Other than that, and the pending programmable address question, patch
looks good.

-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435
  2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
                   ` (7 preceding siblings ...)
  2014-12-05  9:43 ` Jean Delvare
@ 2014-12-05 14:16 ` Guenter Roeck
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-12-05 14:16 UTC (permalink / raw)
  To: lm-sensors

On 12/05/2014 01:43 AM, Jean Delvare wrote:
> Hi Guenter,
>
> On Thu,  4 Dec 2014 11:14:59 -0800, Guenter Roeck wrote:
>> Also update driver support status for TMP431 and TMP432.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   CHANGES                    |  1 +
>>   prog/detect/sensors-detect | 18 +++++++++++++++---
>>   2 files changed, 16 insertions(+), 3 deletions(-)
>>
>> diff --git a/CHANGES b/CHANGES
>> index 638a8bf..534b810 100644
>> --- a/CHANGES
>> +++ b/CHANGES
>> @@ -24,6 +24,7 @@ SVN HEAD
>>                     Document support for EMC1402, EMC1404, and EMC1424
>>                     Detect new revisions of EMC14xx
>>                     Add detection of EMC1422
>> +                  Add detection of TMP435
>>
>>   3.3.5 "Happy Birthday Beddy" (2014-01-22)
>>     libsensors: Improve documentation of two functions
>> diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
>> index 448cf22..d169fb9 100755
>> --- a/prog/detect/sensors-detect
>> +++ b/prog/detect/sensors-detect
>> @@ -1029,15 +1029,20 @@ use vars qw(@i2c_adapter_names);
>>   		i2c_detect => sub { tmp42x_detect(@_, 2); },
>>   	}, {
>>   		name => "Texas Instruments TMP431",
>> -		driver => "to-be-written",		# tmp401
>> +		driver => "tmp401",
>>   		i2c_addrs => [0x4c, 0x4d],
>>   		i2c_detect => sub { lm90_detect(@_, 16); },
>>   	}, {
>>   		name => "Texas Instruments TMP432",
>> -		driver => "to-be-written",		# tmp401
>> +		driver => "tmp401",
>>   		i2c_addrs => [0x4c, 0x4d],
>>   		i2c_detect => sub { lm90_detect(@_, 17); },
>>   	}, {
>> +		name => "Texas Instruments TMP435",
>> +		driver => "tmp401",
>> +		i2c_addrs => [0x4c],
>> +		i2c_detect => sub { lm90_detect(@_, 19); },
>> +	}, {
>>   		name => "Texas Instruments TMP441",
>>   		driver => "tmp421",
>>   		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
>> @@ -4674,7 +4679,8 @@ sub max6680_95_detect
>>   #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
>>   #		  11 = W83L771AWG/ASG, 12 = MAX6690,
>>   #		  13 = ADT7461A/NCT1008, 14 = SA56004,
>> -#		  15 = G781, 16 = TMP431, 17 = TMP432, 18 = TMP451
>> +#		  15 = G781, 16 = TMP431, 17 = TMP432, 18 = TMP451,
>> +#		  19 = TMP435
>>   # Registers used:
>>   #   0x03: Configuration
>>   #   0x04: Conversion rate
>> @@ -4810,6 +4816,12 @@ sub lm90_detect
>>   		return if $mid != 0x55;		# Texas Instruments
>>   		return 4 if ($cid = 0x00);	# TMP451
>>   	}
>> +	if ($chip = 19) {
>> +		return if ($conf & 0x1B) != 0;
>
> Would it make sense to also check configuration register 2 at 0x1a? It
> has 5 unused bits. We do check configuration register 2 (but at a
> different address) for other brands already.
>
Makes sense. I'll add that.

>> +		return if $rate > 0x0F;
>> +		return if $mid != 0x55;		# Texas Instruments
>> +		return 6 if ($cid = 0x35);	# TMP435
>> +	}
>>   	return;
>>   }
>
> Other than that, and the pending programmable address question, patch
> looks good.
>
Thanks,
Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-12-05 14:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-06  7:21 [lm-sensors] [PATCH] sensors-detect: Add code to detect ADT7461A / Guenter Roeck
2011-04-06  8:08 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect Jean Delvare
2011-07-08 16:25 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect LM95245 Guenter Roeck
2011-07-10 15:46 ` Jean Delvare
2011-07-10 15:57 ` Guenter Roeck
2014-12-04 19:14 ` [lm-sensors] [PATCH] sensors-detect: Add code to detect TMP435 Guenter Roeck
2014-12-04 21:57 ` Guenter Roeck
2014-12-05  9:37 ` Jean Delvare
2014-12-05  9:43 ` Jean Delvare
2014-12-05 14:16 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.