All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH v2] sensors-detect: Add support for NXP/Philips
Date: Thu, 07 Jul 2011 21:46:22 +0000	[thread overview]
Message-ID: <20110707214622.GA25251@ericsson.com> (raw)
In-Reply-To: <1283976237-6067-1-git-send-email-guenter.roeck@ericsson.com>

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

  parent reply	other threads:[~2011-07-07 21:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Guenter Roeck [this message]
2011-07-08  6:30 ` Jean Delvare
2011-07-08 14:37 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110707214622.GA25251@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.