All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Jean Delvare <khali@linux-fr.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>
Subject: [lm-sensors] [PATCH] lm90: Support the MAX6648/6692 chips
Date: Mon, 02 Mar 2009 21:01:06 +0000	[thread overview]
Message-ID: <20090302210106.GD6550@plum> (raw)

The max6648 chip has nearly the same register set as the 6657 and
seems to have a working manufacturer/chip id so we can detect it.
This patch adds support for it.  Tested on a Nvidia Quadro FX 1500
card.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

 drivers/hwmon/Kconfig |    4 ++--
 drivers/hwmon/lm90.c  |    7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 8c312c6..7da49d3 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -550,8 +550,8 @@ config SENSORS_LM90
 	help
 	  If you say yes here you get support for National Semiconductor LM90,
 	  LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim
-	  MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680 and
-	  MAX6681 sensor chips.
+	  MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680,
+	  MAX6648, MAX6692 and MAX6681 sensor chips.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called lm90.
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 96a7018..1802366 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -776,7 +776,12 @@ static int lm90_detect(struct i2c_client *new_client, int kind,
 			 && (reg_config1 & 0x3f) = 0x00
 			 && reg_convrate <= 0x07) {
 				kind = max6646;
-			}
+			} else
+			/* The MAX6648/6692 chips have a working man/chip id
+			 * and the same register set as the 6657.
+			 */
+			if (chip_id = 0x59 && address = 0x4C)
+				kind = max6657;
 		}
 
 		if (kind <= 0) { /* identification failed */

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

WARNING: multiple messages have this Message-ID (diff)
From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Jean Delvare <khali@linux-fr.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>
Subject: [PATCH] lm90: Support the MAX6648/6692 chips
Date: Mon, 2 Mar 2009 13:01:06 -0800	[thread overview]
Message-ID: <20090302210106.GD6550@plum> (raw)

The max6648 chip has nearly the same register set as the 6657 and
seems to have a working manufacturer/chip id so we can detect it.
This patch adds support for it.  Tested on a Nvidia Quadro FX 1500
card.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

 drivers/hwmon/Kconfig |    4 ++--
 drivers/hwmon/lm90.c  |    7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 8c312c6..7da49d3 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -550,8 +550,8 @@ config SENSORS_LM90
 	help
 	  If you say yes here you get support for National Semiconductor LM90,
 	  LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim
-	  MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680 and
-	  MAX6681 sensor chips.
+	  MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680,
+	  MAX6648, MAX6692 and MAX6681 sensor chips.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called lm90.
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 96a7018..1802366 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -776,7 +776,12 @@ static int lm90_detect(struct i2c_client *new_client, int kind,
 			 && (reg_config1 & 0x3f) == 0x00
 			 && reg_convrate <= 0x07) {
 				kind = max6646;
-			}
+			} else
+			/* The MAX6648/6692 chips have a working man/chip id
+			 * and the same register set as the 6657.
+			 */
+			if (chip_id == 0x59 && address == 0x4C)
+				kind = max6657;
 		}
 
 		if (kind <= 0) { /* identification failed */

             reply	other threads:[~2009-03-02 21:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 21:01 Darrick J. Wong [this message]
2009-03-02 21:01 ` [PATCH] lm90: Support the MAX6648/6692 chips Darrick J. Wong
2009-03-02 23:04 ` [lm-sensors] " Andrew Morton
2009-03-02 23:04   ` Andrew Morton
2009-03-03  7:47   ` [lm-sensors] " Jean Delvare
2009-03-03  7:47     ` Jean Delvare
2009-03-03  8:04     ` [lm-sensors] " Andrew Morton
2009-03-03  8:04       ` Andrew Morton
2009-03-04 15:27       ` [lm-sensors] " Jean Delvare
2009-03-04 15:27         ` Jean Delvare
2009-03-02 23:07 ` [lm-sensors] " Andrew Morton
2009-03-02 23:07   ` Andrew Morton
2009-03-04 15:28   ` [lm-sensors] " Jean Delvare
2009-03-04 15:28     ` Jean Delvare
2009-03-05 14:25 ` [lm-sensors] " Jean Delvare
2009-03-05 14:25   ` Jean Delvare
2009-03-05 15:47   ` [lm-sensors] " Darrick J. Wong
2009-03-05 15:47     ` Darrick J. Wong
2009-03-05 16:44     ` [lm-sensors] " Jean Delvare
2009-03-05 16:44       ` Jean Delvare
2009-03-05 17:37       ` [lm-sensors] [PATCH] lm90: Document support for the MAX6648/6692 Darrick J. Wong
2009-03-05 17:37         ` [PATCH] lm90: Document support for the MAX6648/6692 chips Darrick J. Wong
2009-03-05 18:01         ` [lm-sensors] [PATCH] lm90: Document support for the Jean Delvare
2009-03-05 18:01           ` [PATCH] lm90: Document support for the MAX6648/6692 chips Jean Delvare
2009-03-05 17:58       ` [lm-sensors] [PATCH] lm90: Update Documentation/hwmon/lm90 to Darrick J. Wong
2009-03-05 17:58         ` [PATCH] lm90: Update Documentation/hwmon/lm90 to reflect max6648/92 support Darrick J. Wong

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=20090302210106.GD6550@plum \
    --to=djwong@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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.