All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips
@ 2013-05-20 12:15 Jean Delvare
  2013-05-20 13:26 ` Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jean Delvare @ 2013-05-20 12:15 UTC (permalink / raw)
  To: lm-sensors

Detection of the Dallas/Maxim DS1621, DS1625 and DS1631 chips is weak
and likely to result in false positives. There's no rationale for
keeping it in sensors-detect as these chips are not found in desktop
computer systems. So drop detection of these chips altogether.
---
 prog/detect/sensors-detect |   46 ---------------------------------------------
 1 file changed, 46 deletions(-)

--- lm-sensors.orig/prog/detect/sensors-detect	2013-05-20 13:25:33.992641174 +0200
+++ lm-sensors/prog/detect/sensors-detect	2013-05-20 14:11:21.668063379 +0200
@@ -803,11 +803,6 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x2c..0x2f],
 		i2c_detect => sub { adm9240_detect(@_, 0); },
 	}, {
-		name => "Dallas Semiconductor DS1621/DS1631",
-		driver => "ds1621",
-		i2c_addrs => [0x48..0x4f],
-		i2c_detect => sub { ds1621_detect(@_); },
-	}, {
 		name => "Dallas Semiconductor DS1780",
 		driver => "adm9240",
 		i2c_addrs => [0x2c..0x2f],
@@ -4357,47 +4352,6 @@ sub lm92_detect
 	return ($chip = 0) ? 4 : 2;
 }
 
-# Registers used:
-#   0xAA: Temperature
-#   0xA1: High limit
-#   0xA2: Low limit
-#   0xA8: Counter
-#   0xA9: Slope
-#   0xAC: Configuration
-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
-# unlikely to be set (would mean that EEPROM is currently being accessed).
-# We also check the value of the counter and slope registers, the datasheet
-# doesn't mention the possible values but the conversion formula together
-# with experimental evidence suggest possible sanity checks.
-# Not all devices enjoy SMBus read word transactions, so we do as much as
-# possible with read byte transactions first, and only use read word
-# transactions second.
-sub ds1621_detect
-{
-	my ($file, $addr) = @_;
-
-	my $conf = i2c_smbus_read_byte_data($file, 0xAC);
-	return if ($conf & 0x10);
-
-	my $temp = i2c_smbus_read_word_data($file, 0xAA);
-	return if $temp < 0 || ($temp & 0x0f00);
-	# On the DS1631, the following two checks are too strict in theory,
-	# but in practice I very much doubt that anyone will set temperature
-	# limits not a multiple of 0.5 degrees C.
-	my $high = i2c_smbus_read_word_data($file, 0xA1);
-	return if $high < 0 || ($high & 0x7f00);
-	my $low = i2c_smbus_read_word_data($file, 0xA2);
-	return if $low < 0 || ($low & 0x7f00);
-
-	return if ($temp = 0 && $high = 0 && $low = 0 && $conf = 0);
-
-	# Old versions of the DS1621 apparently don't have the counter and
-	# slope registers (or they return crap)
-	my $counter = i2c_smbus_read_byte_data($file, 0xA8);
-	my $slope = i2c_smbus_read_byte_data($file, 0xA9);
-	return ($slope = 0x10 && $counter <= $slope) ? 3 : 2;
-}
-
 # Chip to detect: 0 = LM80, 1 = LM96080
 # Registers used:
 #   0x00: Configuration register


-- 
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] 5+ messages in thread

* Re: [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips
  2013-05-20 12:15 [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips Jean Delvare
@ 2013-05-20 13:26 ` Guenter Roeck
  2013-05-20 21:25 ` Robert Coulson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2013-05-20 13:26 UTC (permalink / raw)
  To: lm-sensors

On Mon, May 20, 2013 at 02:15:25PM +0200, Jean Delvare wrote:
> Detection of the Dallas/Maxim DS1621, DS1625 and DS1631 chips is weak
> and likely to result in false positives. There's no rationale for
> keeping it in sensors-detect as these chips are not found in desktop
> computer systems. So drop detection of these chips altogether.
> ---

Good idea.

Guenter

>  prog/detect/sensors-detect |   46 ---------------------------------------------
>  1 file changed, 46 deletions(-)
> 
> --- lm-sensors.orig/prog/detect/sensors-detect	2013-05-20 13:25:33.992641174 +0200
> +++ lm-sensors/prog/detect/sensors-detect	2013-05-20 14:11:21.668063379 +0200
> @@ -803,11 +803,6 @@ use vars qw(@i2c_adapter_names);
>  		i2c_addrs => [0x2c..0x2f],
>  		i2c_detect => sub { adm9240_detect(@_, 0); },
>  	}, {
> -		name => "Dallas Semiconductor DS1621/DS1631",
> -		driver => "ds1621",
> -		i2c_addrs => [0x48..0x4f],
> -		i2c_detect => sub { ds1621_detect(@_); },
> -	}, {
>  		name => "Dallas Semiconductor DS1780",
>  		driver => "adm9240",
>  		i2c_addrs => [0x2c..0x2f],
> @@ -4357,47 +4352,6 @@ sub lm92_detect
>  	return ($chip = 0) ? 4 : 2;
>  }
>  
> -# Registers used:
> -#   0xAA: Temperature
> -#   0xA1: High limit
> -#   0xA2: Low limit
> -#   0xA8: Counter
> -#   0xA9: Slope
> -#   0xAC: Configuration
> -# Detection is weak. We check if bit 4 (NVB) is clear, because it is
> -# unlikely to be set (would mean that EEPROM is currently being accessed).
> -# We also check the value of the counter and slope registers, the datasheet
> -# doesn't mention the possible values but the conversion formula together
> -# with experimental evidence suggest possible sanity checks.
> -# Not all devices enjoy SMBus read word transactions, so we do as much as
> -# possible with read byte transactions first, and only use read word
> -# transactions second.
> -sub ds1621_detect
> -{
> -	my ($file, $addr) = @_;
> -
> -	my $conf = i2c_smbus_read_byte_data($file, 0xAC);
> -	return if ($conf & 0x10);
> -
> -	my $temp = i2c_smbus_read_word_data($file, 0xAA);
> -	return if $temp < 0 || ($temp & 0x0f00);
> -	# On the DS1631, the following two checks are too strict in theory,
> -	# but in practice I very much doubt that anyone will set temperature
> -	# limits not a multiple of 0.5 degrees C.
> -	my $high = i2c_smbus_read_word_data($file, 0xA1);
> -	return if $high < 0 || ($high & 0x7f00);
> -	my $low = i2c_smbus_read_word_data($file, 0xA2);
> -	return if $low < 0 || ($low & 0x7f00);
> -
> -	return if ($temp = 0 && $high = 0 && $low = 0 && $conf = 0);
> -
> -	# Old versions of the DS1621 apparently don't have the counter and
> -	# slope registers (or they return crap)
> -	my $counter = i2c_smbus_read_byte_data($file, 0xA8);
> -	my $slope = i2c_smbus_read_byte_data($file, 0xA9);
> -	return ($slope = 0x10 && $counter <= $slope) ? 3 : 2;
> -}
> -
>  # Chip to detect: 0 = LM80, 1 = LM96080
>  # Registers used:
>  #   0x00: Configuration register
> 
> 
> -- 
> 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] 5+ messages in thread

* Re: [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips
  2013-05-20 12:15 [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips Jean Delvare
  2013-05-20 13:26 ` Guenter Roeck
@ 2013-05-20 21:25 ` Robert Coulson
  2013-05-21  6:21 ` Jean Delvare
  2013-05-22 15:43 ` Robert Coulson
  3 siblings, 0 replies; 5+ messages in thread
From: Robert Coulson @ 2013-05-20 21:25 UTC (permalink / raw)
  To: lm-sensors


[-- Attachment #1.1: Type: text/plain, Size: 3607 bytes --]

Agreed.

Thank you Jean. Since the ds1621 detection is being dropped, is the
doc/chips/SUMMARY ds1621 reference necessary? If not, then please also
remove it too.

thanks,

Rob.


On Mon, May 20, 2013 at 6:26 AM, Guenter Roeck <linux@roeck-us.net> wrote:

> On Mon, May 20, 2013 at 02:15:25PM +0200, Jean Delvare wrote:
> > Detection of the Dallas/Maxim DS1621, DS1625 and DS1631 chips is weak
> > and likely to result in false positives. There's no rationale for
> > keeping it in sensors-detect as these chips are not found in desktop
> > computer systems. So drop detection of these chips altogether.
> > ---
>
> Good idea.
>
> Guenter
>
> >  prog/detect/sensors-detect |   46
> ---------------------------------------------
> >  1 file changed, 46 deletions(-)
> >
> > --- lm-sensors.orig/prog/detect/sensors-detect        2013-05-20
> 13:25:33.992641174 +0200
> > +++ lm-sensors/prog/detect/sensors-detect     2013-05-20
> 14:11:21.668063379 +0200
> > @@ -803,11 +803,6 @@ use vars qw(@i2c_adapter_names);
> >               i2c_addrs => [0x2c..0x2f],
> >               i2c_detect => sub { adm9240_detect(@_, 0); },
> >       }, {
> > -             name => "Dallas Semiconductor DS1621/DS1631",
> > -             driver => "ds1621",
> > -             i2c_addrs => [0x48..0x4f],
> > -             i2c_detect => sub { ds1621_detect(@_); },
> > -     }, {
> >               name => "Dallas Semiconductor DS1780",
> >               driver => "adm9240",
> >               i2c_addrs => [0x2c..0x2f],
> > @@ -4357,47 +4352,6 @@ sub lm92_detect
> >       return ($chip == 0) ? 4 : 2;
> >  }
> >
> > -# Registers used:
> > -#   0xAA: Temperature
> > -#   0xA1: High limit
> > -#   0xA2: Low limit
> > -#   0xA8: Counter
> > -#   0xA9: Slope
> > -#   0xAC: Configuration
> > -# Detection is weak. We check if bit 4 (NVB) is clear, because it is
> > -# unlikely to be set (would mean that EEPROM is currently being
> accessed).
> > -# We also check the value of the counter and slope registers, the
> datasheet
> > -# doesn't mention the possible values but the conversion formula
> together
> > -# with experimental evidence suggest possible sanity checks.
> > -# Not all devices enjoy SMBus read word transactions, so we do as much
> as
> > -# possible with read byte transactions first, and only use read word
> > -# transactions second.
> > -sub ds1621_detect
> > -{
> > -     my ($file, $addr) = @_;
> > -
> > -     my $conf = i2c_smbus_read_byte_data($file, 0xAC);
> > -     return if ($conf & 0x10);
> > -
> > -     my $temp = i2c_smbus_read_word_data($file, 0xAA);
> > -     return if $temp < 0 || ($temp & 0x0f00);
> > -     # On the DS1631, the following two checks are too strict in theory,
> > -     # but in practice I very much doubt that anyone will set
> temperature
> > -     # limits not a multiple of 0.5 degrees C.
> > -     my $high = i2c_smbus_read_word_data($file, 0xA1);
> > -     return if $high < 0 || ($high & 0x7f00);
> > -     my $low = i2c_smbus_read_word_data($file, 0xA2);
> > -     return if $low < 0 || ($low & 0x7f00);
> > -
> > -     return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
> > -
> > -     # Old versions of the DS1621 apparently don't have the counter and
> > -     # slope registers (or they return crap)
> > -     my $counter = i2c_smbus_read_byte_data($file, 0xA8);
> > -     my $slope = i2c_smbus_read_byte_data($file, 0xA9);
> > -     return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
> > -}
> > -
> >  # Chip to detect: 0 = LM80, 1 = LM96080
> >  # Registers used:
> >  #   0x00: Configuration register
> >
> >
> > --
> > Jean Delvare
> >
>

[-- Attachment #1.2: Type: text/html, Size: 4727 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

* Re: [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips
  2013-05-20 12:15 [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips Jean Delvare
  2013-05-20 13:26 ` Guenter Roeck
  2013-05-20 21:25 ` Robert Coulson
@ 2013-05-21  6:21 ` Jean Delvare
  2013-05-22 15:43 ` Robert Coulson
  3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2013-05-21  6:21 UTC (permalink / raw)
  To: lm-sensors

Hi Robert,

On Mon, 20 May 2013 14:25:51 -0700, Robert Coulson wrote:
> Thank you Jean. Since the ds1621 detection is being dropped, is the
> doc/chips/SUMMARY ds1621 reference necessary? If not, then please also
> remove it too.

I deleted this file a couple weeks ago, it was outdated anyway.

-- 
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] 5+ messages in thread

* Re: [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips
  2013-05-20 12:15 [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips Jean Delvare
                   ` (2 preceding siblings ...)
  2013-05-21  6:21 ` Jean Delvare
@ 2013-05-22 15:43 ` Robert Coulson
  3 siblings, 0 replies; 5+ messages in thread
From: Robert Coulson @ 2013-05-22 15:43 UTC (permalink / raw)
  To: lm-sensors


[-- Attachment #1.1: Type: text/plain, Size: 526 bytes --]

On Mon, May 20, 2013 at 11:21 PM, Jean Delvare <khali@linux-fr.org> wrote:

> Hi Robert,
>
> On Mon, 20 May 2013 14:25:51 -0700, Robert Coulson wrote:
> > Thank you Jean. Since the ds1621 detection is being dropped, is the
> > doc/chips/SUMMARY ds1621 reference necessary? If not, then please also
> > remove it too.
>
> I deleted this file a couple weeks ago, it was outdated anyway.
>

Good morning Jean,

you are correct and I apologize for the noise; i was not looking at the
master branch.

Rob.

>
> --
> Jean Delvare
>

[-- Attachment #1.2: Type: text/html, Size: 1165 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

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

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

end of thread, other threads:[~2013-05-22 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-20 12:15 [lm-sensors] sensors-detect:: Drop detection of DS1621-like chips Jean Delvare
2013-05-20 13:26 ` Guenter Roeck
2013-05-20 21:25 ` Robert Coulson
2013-05-21  6:21 ` Jean Delvare
2013-05-22 15:43 ` Robert Coulson

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.