public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver fixes for 2.6.0
Date: Tue, 30 Dec 2003 14:06:10 -0800	[thread overview]
Message-ID: <10728219701628@kroah.com> (raw)
In-Reply-To: <10728219702175@kroah.com>

ChangeSet 1.1496.8.31, 2003/12/17 16:04:10-08:00, mhoffman@lightlink.com

[PATCH] I2C: improve chip detection in w83781d.c driver

This patch improves chip detection.  It was forward ported from the
lm_sensors project CVS, from these revisions:

	1.104 (Khali) Enhance chip detection (stricter).
	1.108 (Khali) Fix W83627HF detection.


 drivers/i2c/chips/w83781d.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)


diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
--- a/drivers/i2c/chips/w83781d.c	Tue Dec 30 12:30:38 2003
+++ b/drivers/i2c/chips/w83781d.c	Tue Dec 30 12:30:38 2003
@@ -24,10 +24,11 @@
     Supports following chips:
 
     Chip	#vin	#fanin	#pwm	#temp	wchipid	vendid	i2c	ISA
-    as99127f	7	3	1?	3	0x30	0x12c3	yes	no
-    asb100 "bach" (type_name = as99127f)	0x30	0x0694	yes	no
-    w83781d	7	3	0	3	0x10	0x5ca3	yes	yes
-    w83627hf	9	3	2	3	0x20	0x5ca3	yes	yes(LPC)
+    as99127f	7	3	1?	3	0x31	0x12c3	yes	no
+    as99127f rev.2 (type_name = 1299127f)	0x31	0x5ca3	yes	no
+    asb100 "bach" (type_name = as99127f)	0x31	0x0694	yes	no
+    w83781d	7	3	0	3	0x10-1	0x5ca3	yes	yes
+    w83627hf	9	3	2	3	0x21	0x5ca3	yes	yes(LPC)
     w83627thf	9	3	2	3	0x90	0x5ca3	no	yes(LPC)
     w83782d	9	3	2-4	3	0x30	0x5ca3	yes	yes
     w83783s	5-6	3	2	1-2	0x40	0x5ca3	yes	no
@@ -1264,7 +1265,7 @@
 			goto ERROR2;
 		}
 		/* If Winbond SMBus, check address at 0x48.
-		   Asus doesn't support */
+		   Asus doesn't support, except for as99127f rev.2 */
 		if ((!is_isa) && (((!(val1 & 0x80)) && (val2 == 0xa3)) ||
 				  ((val1 & 0x80) && (val2 == 0x5c)))) {
 			if (w83781d_read_value
@@ -1295,18 +1296,17 @@
 			goto ERROR2;
 		}
 
-		/* mask off lower bit, not reliable */
-		val1 =
-		    w83781d_read_value(new_client, W83781D_REG_WCHIPID) & 0xfe;
-		if (val1 == 0x10 && vendid == winbond)
+		val1 = w83781d_read_value(new_client, W83781D_REG_WCHIPID);
+		if ((val1 == 0x10 || val1 == 0x11) && vendid == winbond)
 			kind = w83781d;
 		else if (val1 == 0x30 && vendid == winbond)
 			kind = w83782d;
-		else if (val1 == 0x40 && vendid == winbond && !is_isa)
+		else if (val1 == 0x40 && vendid == winbond && !is_isa
+				&& address == 0x2d)
 			kind = w83783s;
-		else if ((val1 == 0x20 || val1 == 0x90) && vendid == winbond)
+		else if ((val1 == 0x21 || val1 == 0x90) && vendid == winbond)
 			kind = w83627hf;
-		else if (val1 == 0x30 && vendid == asus && !is_isa)
+		else if (val1 == 0x31 && !is_isa && address >= 0x28)
 			kind = as99127f;
 		else if (val1 == 0x60 && vendid == winbond && is_isa)
 			kind = w83697hf;


  reply	other threads:[~2003-12-30 22:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-30 22:02 [BK PATCH] i2c driver fixes for 2.6.0 Greg KH
2003-12-30 22:06 ` [PATCH] " Greg KH
2003-12-30 22:06   ` Greg KH
2003-12-30 22:06     ` Greg KH
2003-12-30 22:06       ` Greg KH
2003-12-30 22:06         ` Greg KH
2003-12-30 22:06           ` Greg KH
2003-12-30 22:06             ` Greg KH
2003-12-30 22:06               ` Greg KH [this message]
2003-12-30 22:06                 ` Greg KH
2003-12-30 22:06                   ` Greg KH
2003-12-30 22:06                     ` Greg KH
2003-12-30 22:06                       ` Greg KH
2003-12-30 22:06                         ` Greg KH
2003-12-30 22:06                           ` Greg KH
2003-12-30 22:06                             ` Greg KH
2003-12-30 22:06                               ` Greg KH
2003-12-30 22:06                                 ` Greg KH
2003-12-30 22:06                                   ` Greg KH
2003-12-30 22:06                                     ` Greg KH
2003-12-30 22:06                                       ` Greg KH
2003-12-30 22:06                                         ` Greg KH
2003-12-30 22:06                                           ` Greg KH
2003-12-30 22:06                                             ` Greg KH

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=10728219701628@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox