All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96
@ 2010-09-08 20:03 Guenter Roeck
  2010-09-10  8:23 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Guenter Roeck @ 2010-09-08 20:03 UTC (permalink / raw)
  To: lm-sensors

This patch adds support for max6695/96 to sensors-detect.
---
v2:
Fix and improve max6680/81 vs. max6695/96 detection code
Remove chip=7 code from lm90_detect

---
Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect	(revision 5857)
+++ prog/detect/sensors-detect	(working copy)
@@ -921,8 +921,13 @@
 		name => "Maxim MAX6680/MAX6681",
 		driver => "lm90",
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
-		i2c_detect => sub { lm90_detect(@_, 7); },
+		i2c_detect => sub { max6680_95_detect(@_, 0); },
 	}, {
+		name => "Maxim MAX6695/MAX6696",
+		driver => "lm90",
+		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
+		i2c_detect => sub { max6680_95_detect(@_, 1); },
+	}, {
 		name => "Winbond W83L771W/G",
 		driver => "to-be-written",
 		i2c_addrs => [0x4c],
@@ -4051,10 +4056,47 @@
 	return $confidence;
 }
 
+# Chip to detect: 0 = MAX6680/81, 1 = MAX6695/96
+# Registers used:
+#   0x03: Configuration
+#   0x04: Conversion rate
+#   0x12: Status2
+#   0x16: Overtemperature 2
+#   0xfe: Manufacturer ID
+#   0xff: Chip ID / die revision
+sub max6680_95_detect
+{
+	my ($file, $addr, $chip) = @_;
+	my $cid = i2c_smbus_read_byte_data($file, 0xff);
+	my $conf = i2c_smbus_read_byte_data($file, 0x03);
+	my $mid = i2c_smbus_read_byte_data($file, 0xfe, NO_CACHE);
+	my $emerg = i2c_smbus_read_byte_data($file, 0x16, NO_CACHE);
+	my $rate = i2c_smbus_read_byte_data($file, 0x04, NO_CACHE);
+	my $emerg2 = i2c_smbus_read_byte_data($file, 0x16, NO_CACHE);
+
+	# Check common conditions
+	return if $rate > 0x07;
+	return if $mid != 0x4d;		# Not Maxim
+	return if $cid != 0x01;		# None of the chips we are looking for
+
+	if ($chip = 0) {
+		return if ($conf & 0x03) != 0;
+		return 8 if $emerg != $emerg2;	# MAX6680/MAX6681
+	}
+	if ($chip = 1) {
+		my $status2 = i2c_smbus_read_byte_data($file, 0x12);
+
+		return if ($conf & 0x10) != 0;
+		return if ($status2 & 0x01) != 0;
+		return 8 if $emerg = $emerg2;	# MAX6695/MAX6696
+	}
+	return;
+}
+
 # Chip to detect: 0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032,
 #		  4 = MAX6654, 5 = ADT7461,
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
-#		  7 = MAX6680/MAX6681, 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
+#		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690
 # Registers used:
 #   0x03: Configuration
@@ -4115,12 +4157,6 @@
 		return if $mid != 0x4d;		# Maxim
 		return 8 if $cid = 0x59;	# MAX6648/MAX6692
 	}
-	if ($chip = 7) {
-		return if ($conf & 0x03) != 0;
-		return if $rate > 0x07;
-		return if $mid != 0x4d;		# Maxim
-		return 8 if $cid = 0x01;	# MAX6680/MAX6681
-	}
 	if ($chip = 8) {
 		return if ($conf & 0x2a) != 0;
 		return if $rate > 0x09;

_______________________________________________
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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
@ 2010-09-10  8:23 ` Jean Delvare
  2010-09-10 13:33 ` Guenter Roeck
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2010-09-10  8:23 UTC (permalink / raw)
  To: lm-sensors

Hi Guenter,

On Wed, 8 Sep 2010 13:03:57 -0700, Guenter Roeck wrote:
> This patch adds support for max6695/96 to sensors-detect.
> ---
> v2:
> Fix and improve max6680/81 vs. max6695/96 detection code
> Remove chip=7 code from lm90_detect
> 
> ---
> Index: prog/detect/sensors-detect
> =================================> --- prog/detect/sensors-detect	(revision 5857)
> +++ prog/detect/sensors-detect	(working copy)
> @@ -921,8 +921,13 @@
>  		name => "Maxim MAX6680/MAX6681",
>  		driver => "lm90",
>  		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
> -		i2c_detect => sub { lm90_detect(@_, 7); },
> +		i2c_detect => sub { max6680_95_detect(@_, 0); },
>  	}, {
> +		name => "Maxim MAX6695/MAX6696",
> +		driver => "lm90",
> +		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
> +		i2c_detect => sub { max6680_95_detect(@_, 1); },
> +	}, {
>  		name => "Winbond W83L771W/G",
>  		driver => "to-be-written",
>  		i2c_addrs => [0x4c],
> @@ -4051,10 +4056,47 @@
>  	return $confidence;
>  }
>  
> +# Chip to detect: 0 = MAX6680/81, 1 = MAX6695/96
> +# Registers used:
> +#   0x03: Configuration
> +#   0x04: Conversion rate
> +#   0x12: Status2
> +#   0x16: Overtemperature 2
> +#   0xfe: Manufacturer ID
> +#   0xff: Chip ID / die revision
> +sub max6680_95_detect
> +{
> +	my ($file, $addr, $chip) = @_;
> +	my $cid = i2c_smbus_read_byte_data($file, 0xff);
> +	my $conf = i2c_smbus_read_byte_data($file, 0x03);
> +	my $mid = i2c_smbus_read_byte_data($file, 0xfe, NO_CACHE);
> +	my $emerg = i2c_smbus_read_byte_data($file, 0x16, NO_CACHE);
> +	my $rate = i2c_smbus_read_byte_data($file, 0x04, NO_CACHE);
> +	my $emerg2 = i2c_smbus_read_byte_data($file, 0x16, NO_CACHE);
> +
> +	# Check common conditions
> +	return if $rate > 0x07;
> +	return if $mid != 0x4d;		# Not Maxim
> +	return if $cid != 0x01;		# None of the chips we are looking for
> +
> +	if ($chip = 0) {
> +		return if ($conf & 0x03) != 0;
> +		return 8 if $emerg != $emerg2;	# MAX6680/MAX6681
> +	}
> +	if ($chip = 1) {
> +		my $status2 = i2c_smbus_read_byte_data($file, 0x12);
> +
> +		return if ($conf & 0x10) != 0;
> +		return if ($status2 & 0x01) != 0;
> +		return 8 if $emerg = $emerg2;	# MAX6695/MAX6696
> +	}
> +	return;
> +}
> +
>  # Chip to detect: 0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032,
>  #		  4 = MAX6654, 5 = ADT7461,
>  #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
> -#		  7 = MAX6680/MAX6681, 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
> +#		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
>  #		  11 = W83L771AWG/ASG, 12 = MAX6690
>  # Registers used:
>  #   0x03: Configuration
> @@ -4115,12 +4157,6 @@
>  		return if $mid != 0x4d;		# Maxim
>  		return 8 if $cid = 0x59;	# MAX6648/MAX6692
>  	}
> -	if ($chip = 7) {
> -		return if ($conf & 0x03) != 0;
> -		return if $rate > 0x07;
> -		return if $mid != 0x4d;		# Maxim
> -		return 8 if $cid = 0x01;	# MAX6680/MAX6681
> -	}
>  	if ($chip = 8) {
>  		return if ($conf & 0x2a) != 0;
>  		return if $rate > 0x09;

Looks good, please commit!

-- 
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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
  2010-09-10  8:23 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
@ 2010-09-10 13:33 ` Guenter Roeck
  2010-09-10 14:45 ` Jean Delvare
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2010-09-10 13:33 UTC (permalink / raw)
  To: lm-sensors

Hi Jean,

On Fri, Sep 10, 2010 at 04:23:21AM -0400, Jean Delvare wrote:
> Hi Guenter,
> 
> On Wed, 8 Sep 2010 13:03:57 -0700, Guenter Roeck wrote:
> > This patch adds support for max6695/96 to sensors-detect.
> > ---
> > v2:
> > Fix and improve max6680/81 vs. max6695/96 detection code
> > Remove chip=7 code from lm90_detect
> > 
> > ---
> > Index: prog/detect/sensors-detect
> > =================================> > --- prog/detect/sensors-detect	(revision 5857)
> > +++ prog/detect/sensors-detect	(working copy)
> > @@ -921,8 +921,13 @@
> >  		name => "Maxim MAX6680/MAX6681",
> >  		driver => "lm90",
> >  		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
> > -		i2c_detect => sub { lm90_detect(@_, 7); },
> > +		i2c_detect => sub { max6680_95_detect(@_, 0); },
> >  	}, {
> > +		name => "Maxim MAX6695/MAX6696",
> > +		driver => "lm90",
> > +		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
> > +		i2c_detect => sub { max6680_95_detect(@_, 1); },
> > +	}, {
> >  		name => "Winbond W83L771W/G",
> >  		driver => "to-be-written",
> >  		i2c_addrs => [0x4c],
> > @@ -4051,10 +4056,47 @@
> >  	return $confidence;
> >  }
> >  
> > +# Chip to detect: 0 = MAX6680/81, 1 = MAX6695/96
> > +# Registers used:
> > +#   0x03: Configuration
> > +#   0x04: Conversion rate
> > +#   0x12: Status2
> > +#   0x16: Overtemperature 2
> > +#   0xfe: Manufacturer ID
> > +#   0xff: Chip ID / die revision
> > +sub max6680_95_detect
> > +{
> > +	my ($file, $addr, $chip) = @_;
> > +	my $cid = i2c_smbus_read_byte_data($file, 0xff);
> > +	my $conf = i2c_smbus_read_byte_data($file, 0x03);
> > +	my $mid = i2c_smbus_read_byte_data($file, 0xfe, NO_CACHE);
> > +	my $emerg = i2c_smbus_read_byte_data($file, 0x16, NO_CACHE);
> > +	my $rate = i2c_smbus_read_byte_data($file, 0x04, NO_CACHE);
> > +	my $emerg2 = i2c_smbus_read_byte_data($file, 0x16, NO_CACHE);
> > +
> > +	# Check common conditions
> > +	return if $rate > 0x07;
> > +	return if $mid != 0x4d;		# Not Maxim
> > +	return if $cid != 0x01;		# None of the chips we are looking for
> > +
> > +	if ($chip = 0) {
> > +		return if ($conf & 0x03) != 0;
> > +		return 8 if $emerg != $emerg2;	# MAX6680/MAX6681
> > +	}
> > +	if ($chip = 1) {
> > +		my $status2 = i2c_smbus_read_byte_data($file, 0x12);
> > +
> > +		return if ($conf & 0x10) != 0;
> > +		return if ($status2 & 0x01) != 0;
> > +		return 8 if $emerg = $emerg2;	# MAX6695/MAX6696
> > +	}
> > +	return;
> > +}
> > +
> >  # Chip to detect: 0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032,
> >  #		  4 = MAX6654, 5 = ADT7461,
> >  #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
> > -#		  7 = MAX6680/MAX6681, 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
> > +#		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
> >  #		  11 = W83L771AWG/ASG, 12 = MAX6690
> >  # Registers used:
> >  #   0x03: Configuration
> > @@ -4115,12 +4157,6 @@
> >  		return if $mid != 0x4d;		# Maxim
> >  		return 8 if $cid = 0x59;	# MAX6648/MAX6692
> >  	}
> > -	if ($chip = 7) {
> > -		return if ($conf & 0x03) != 0;
> > -		return if $rate > 0x07;
> > -		return if $mid != 0x4d;		# Maxim
> > -		return 8 if $cid = 0x01;	# MAX6680/MAX6681
> > -	}
> >  	if ($chip = 8) {
> >  		return if ($conf & 0x2a) != 0;
> >  		return if $rate > 0x09;
> 
> Looks good, please commit!
> 
I don't have a svn account, as least not to my knowledge.
Guess it is time to create one for me.

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

* Re: [lm-sensors] [PATCH v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
  2010-09-10  8:23 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
  2010-09-10 13:33 ` Guenter Roeck
@ 2010-09-10 14:45 ` Jean Delvare
  2010-09-10 18:23 ` Guenter Roeck
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2010-09-10 14:45 UTC (permalink / raw)
  To: lm-sensors

On Fri, 10 Sep 2010 06:33:10 -0700, Guenter Roeck wrote:
> I don't have a svn account, as least not to my knowledge.
> Guess it is time to create one for me.

Oh, good point. I've moved you to the lm-sensors commiters group, so it
should be OK now. Use the same login and password as for the wiki.

-- 
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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
                   ` (2 preceding siblings ...)
  2010-09-10 14:45 ` Jean Delvare
@ 2010-09-10 18:23 ` Guenter Roeck
  2010-09-12  9:17 ` Jean Delvare
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2010-09-10 18:23 UTC (permalink / raw)
  To: lm-sensors

On Fri, 2010-09-10 at 10:45 -0400, Jean Delvare wrote:
> On Fri, 10 Sep 2010 06:33:10 -0700, Guenter Roeck wrote:
> > I don't have a svn account, as least not to my knowledge.
> > Guess it is time to create one for me.
> 
> Oh, good point. I've moved you to the lm-sensors commiters group, so it
> should be OK now. Use the same login and password as for the wiki.
> 
Unfortunately we are behind a proxy, and svn doesn't seem to like that.
And https doesn't work, as it looks like because of a problem with svn
on Ubuntu Lucid :-(.

I'll keep playing with it.

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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
                   ` (3 preceding siblings ...)
  2010-09-10 18:23 ` Guenter Roeck
@ 2010-09-12  9:17 ` Jean Delvare
  2010-09-12 16:24 ` Guenter Roeck
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2010-09-12  9:17 UTC (permalink / raw)
  To: lm-sensors

On Fri, 10 Sep 2010 11:23:59 -0700, Guenter Roeck wrote:
> On Fri, 2010-09-10 at 10:45 -0400, Jean Delvare wrote:
> > On Fri, 10 Sep 2010 06:33:10 -0700, Guenter Roeck wrote:
> > > I don't have a svn account, as least not to my knowledge.
> > > Guess it is time to create one for me.
> > 
> > Oh, good point. I've moved you to the lm-sensors commiters group, so it
> > should be OK now. Use the same login and password as for the wiki.
>
> Unfortunately we are behind a proxy, and svn doesn't seem to like that.
> And https doesn't work, as it looks like because of a problem with svn
> on Ubuntu Lucid :-(.
> 
> I'll keep playing with it.

If there's anything that can be done on the server side that would make
it easier for you, please let me know and we can ask Axel Thimm (the
lm-sensors.org server admin, Cc'd) if he can help.

-- 
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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
                   ` (4 preceding siblings ...)
  2010-09-12  9:17 ` Jean Delvare
@ 2010-09-12 16:24 ` Guenter Roeck
  2011-07-07 21:46 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for NXP/Philips Guenter Roeck
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2010-09-12 16:24 UTC (permalink / raw)
  To: lm-sensors

On Sun, Sep 12, 2010 at 05:17:57AM -0400, Jean Delvare wrote:
> On Fri, 10 Sep 2010 11:23:59 -0700, Guenter Roeck wrote:
> > On Fri, 2010-09-10 at 10:45 -0400, Jean Delvare wrote:
> > > On Fri, 10 Sep 2010 06:33:10 -0700, Guenter Roeck wrote:
> > > > I don't have a svn account, as least not to my knowledge.
> > > > Guess it is time to create one for me.
> > > 
> > > Oh, good point. I've moved you to the lm-sensors commiters group, so it
> > > should be OK now. Use the same login and password as for the wiki.
> >
> > Unfortunately we are behind a proxy, and svn doesn't seem to like that.
> > And https doesn't work, as it looks like because of a problem with svn
> > on Ubuntu Lucid :-(.
> > 
> > I'll keep playing with it.
> 
> If there's anything that can be done on the server side that would make
> it easier for you, please let me know and we can ask Axel Thimm (the
> lm-sensors.org server admin, Cc'd) if he can help.
> 
I managed to commit using http by switching to another system.
Turns out the culprit was not the proxy, but NAT.

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 v2] sensors-detect: Add support for NXP/Philips
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
                   ` (5 preceding siblings ...)
  2010-09-12 16:24 ` Guenter Roeck
@ 2011-07-07 21:46 ` Guenter Roeck
  2011-07-08  6:30 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
  2011-07-08 14:37 ` Guenter Roeck
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2011-07-07 21:46 UTC (permalink / raw)
  To: lm-sensors

v2: Stronger detection code. Confidence reduced from 8 to 6.

--

Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect	(revision 5982)
+++ prog/detect/sensors-detect	(working copy)
@@ -1055,6 +1055,11 @@
 		i2c_addrs => [0x4c..0x4d],
 		i2c_detect => sub { lm90_detect(@_, 13); },
 	}, {
+		name => "NXP/Philips SA56004",
+		driver => "lm90",
+		i2c_addrs => [0x48..0x4f],
+		i2c_detect => sub { lm90_detect(@_, 14); },
+	}, {
 		name => "Analog Devices ADT7481",
 		driver => "to-be-written",
 		i2c_addrs => [0x4c, 0x4b],
@@ -4352,11 +4357,11 @@
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
-#		  13 = ADT7461A/NCT1008
+#		  13 = ADT7461A/NCT1008, 14 = SA56004
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
-#   0xbf: Configuration 2 (National Semiconductor and Winbond only)
+#   0xbf: Configuration 2 (National Semiconductor, Winbond, and Philips only)
 #   0xfe: Manufacturer ID
 #   0xff: Chip ID / die revision
 sub lm90_detect
@@ -4457,6 +4462,13 @@
 		return if $mid != 0x41;		# Analog Devices
 		return 8 if $cid = 0x57;	# ADT7461A, NCT1008
 	}
+	if ($chip = 14) {
+		return if ($conf & 0x2a) != 0;
+		return if ($conf2 & 0xfe) != 0;
+		return if $rate > 0x09;
+		return if $mid != 0xa1;		# NXP Semiconductor/Philips
+		return 6 if $cid = 0x00;	# SA56004
+	}
 	return;
 }
 
Index: CHANGES
=================================--- CHANGES	(revision 5982)
+++ CHANGES	(working copy)
@@ -16,6 +16,7 @@
                   Add detection of MAX6642
                   Add detection of ITE IT8772E
                   Don't advertise the ipmisensors driver
+                  Add detection of SA56004
 
 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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
                   ` (6 preceding siblings ...)
  2011-07-07 21:46 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for NXP/Philips Guenter Roeck
@ 2011-07-08  6:30 ` Jean Delvare
  2011-07-08 14:37 ` Guenter Roeck
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2011-07-08  6:30 UTC (permalink / raw)
  To: lm-sensors

Hi Guenter,

On Thu, 7 Jul 2011 14:46:22 -0700, Guenter Roeck wrote:
> v2: Stronger detection code. Confidence reduced from 8 to 6.
> 
> --
> 
> Index: prog/detect/sensors-detect
> =================================> --- prog/detect/sensors-detect	(revision 5982)
> +++ prog/detect/sensors-detect	(working copy)
> @@ -1055,6 +1055,11 @@
>  		i2c_addrs => [0x4c..0x4d],
>  		i2c_detect => sub { lm90_detect(@_, 13); },
>  	}, {
> +		name => "NXP/Philips SA56004",
> +		driver => "lm90",
> +		i2c_addrs => [0x48..0x4f],
> +		i2c_detect => sub { lm90_detect(@_, 14); },
> +	}, {
>  		name => "Analog Devices ADT7481",
>  		driver => "to-be-written",
>  		i2c_addrs => [0x4c, 0x4b],
> @@ -4352,11 +4357,11 @@
>  #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
>  #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
>  #		  11 = W83L771AWG/ASG, 12 = MAX6690,
> -#		  13 = ADT7461A/NCT1008
> +#		  13 = ADT7461A/NCT1008, 14 = SA56004
>  # Registers used:
>  #   0x03: Configuration
>  #   0x04: Conversion rate
> -#   0xbf: Configuration 2 (National Semiconductor and Winbond only)
> +#   0xbf: Configuration 2 (National Semiconductor, Winbond, and Philips only)
>  #   0xfe: Manufacturer ID
>  #   0xff: Chip ID / die revision
>  sub lm90_detect
> @@ -4457,6 +4462,13 @@
>  		return if $mid != 0x41;		# Analog Devices
>  		return 8 if $cid = 0x57;	# ADT7461A, NCT1008
>  	}
> +	if ($chip = 14) {
> +		return if ($conf & 0x2a) != 0;
> +		return if ($conf2 & 0xfe) != 0;
> +		return if $rate > 0x09;
> +		return if $mid != 0xa1;		# NXP Semiconductor/Philips
> +		return 6 if $cid = 0x00;	# SA56004
> +	}
>  	return;
>  }
>  
> Index: CHANGES
> =================================> --- CHANGES	(revision 5982)
> +++ CHANGES	(working copy)
> @@ -16,6 +16,7 @@
>                    Add detection of MAX6642
>                    Add detection of ITE IT8772E
>                    Don't advertise the ipmisensors driver
> +                  Add detection of SA56004
>  
>  3.3.0 (2011-03-28)
>    Makefile: Check for bison and flex

Looks good, please commit and update wiki/Devices accordingly.

-- 
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 v2] sensors-detect: Add support for
  2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
                   ` (7 preceding siblings ...)
  2011-07-08  6:30 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
@ 2011-07-08 14:37 ` Guenter Roeck
  8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2011-07-08 14:37 UTC (permalink / raw)
  To: lm-sensors

On Fri, Jul 08, 2011 at 02:30:19AM -0400, Jean Delvare wrote:
> Hi Guenter,
> 
> On Thu, 7 Jul 2011 14:46:22 -0700, Guenter Roeck wrote:
> > v2: Stronger detection code. Confidence reduced from 8 to 6.
> > 
[ ... ]
> 
> Looks good, please commit and update wiki/Devices accordingly.
> 
Done, and done.

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:[~2011-07-08 14:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08 20:03 [lm-sensors] [PATCH v2] sensors-detect: Add support for max6695/96 Guenter Roeck
2010-09-10  8:23 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
2010-09-10 13:33 ` Guenter Roeck
2010-09-10 14:45 ` Jean Delvare
2010-09-10 18:23 ` Guenter Roeck
2010-09-12  9:17 ` Jean Delvare
2010-09-12 16:24 ` Guenter Roeck
2011-07-07 21:46 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for NXP/Philips Guenter Roeck
2011-07-08  6:30 ` [lm-sensors] [PATCH v2] sensors-detect: Add support for Jean Delvare
2011-07-08 14:37 ` 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.