All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH 2/2] sensors-detect: Add detection of TMP431 and TMP432
Date: Sat, 16 Mar 2013 18:30:53 +0000	[thread overview]
Message-ID: <1363458653-18731-2-git-send-email-linux@roeck-us.net> (raw)
In-Reply-To: <1359434448-21181-2-git-send-email-linux@roeck-us.net>

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

diff --git a/CHANGES b/CHANGES
index 51ac3c8..ba6409f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,7 @@ SVN HEAD
                   Add detection of IT8752F
                   Add detection of MCP98244
                   Add detection of LM95234
+                  Add detection of TMP431/TMP432
 
 3.3.3 "Happy Birthday Sophie" (2012-11-06)
   documentation: Update fan-divisors, fan divisors are optional
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
index f238802..00e3904 100755
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -1023,6 +1023,16 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x4c, 0x4d],
 		i2c_detect => sub { tmp42x_detect(@_, 2); },
 	}, {
+		name => "Texas Instruments TMP431",
+		driver => "to-be-written",		# tmp401
+		i2c_addrs => [0x4c, 0x4d],
+		i2c_detect => sub { lm90_detect(@_, 16); },
+	}, {
+		name => "Texas Instruments TMP432",
+		driver => "to-be-written",		# tmp401
+		i2c_addrs => [0x4c, 0x4d],
+		i2c_detect => sub { lm90_detect(@_, 17); },
+	}, {
 		name => "Texas Instruments AMC6821",
 		driver => "amc6821",
 		i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
@@ -4537,7 +4547,7 @@ sub max6680_95_detect
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
 #		  13 = ADT7461A/NCT1008, 14 = SA56004,
-#		  15 = G781
+#		  15 = G781, 16 = TMP431, 17 = TMP432
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
@@ -4655,6 +4665,18 @@ sub lm90_detect
 		return if $mid != 0x47;		# GMT
 		return 8 if $cid = 0x01;	# G781
 	}
+	if ($chip = 16) {
+		return if ($conf & 0x1B) != 0;
+		return if $rate > 0x0F;
+		return if $mid != 0x55;		# Texas Instruments
+		return 6 if ($cid = 0x31);	# TMP431A/B/C/D
+	}
+	if ($chip = 17) {
+		return if ($conf & 0x1B) != 0;
+		return if $rate > 0x0F;
+		return if $mid != 0x55;		# Texas Instruments
+		return 6 if ($cid = 0x32);	# TMP432A/B
+	}
 	return;
 }
 
-- 
1.7.9.7


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

  reply	other threads:[~2013-03-16 18:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  4:40 [lm-sensors] [PATCH 2/2] sensors-detect: Add detection of MCP98244 Guenter Roeck
2013-03-16 18:30 ` Guenter Roeck [this message]
2013-03-17 13:12 ` [lm-sensors] [PATCH 2/2] sensors-detect: Add detection of TMP431 and TMP432 Jean Delvare
2014-06-25 20:42 ` [lm-sensors] [PATCH 2/2] sensors-detect: Add detection of NCT7802Y Guenter Roeck
2014-06-25 20:45 ` Guenter Roeck
2014-06-26  9:40 ` Jean Delvare
2014-06-26 13:13 ` 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=1363458653-18731-2-git-send-email-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --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.