All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC
@ 2005-10-12  5:22 Mark M. Hoffman
  2005-10-12 11:01 ` [lm-sensors] " Jean Delvare
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mark M. Hoffman @ 2005-10-12  5:22 UTC (permalink / raw)
  To: lm-sensors


This patch adds a new ID to the SMSC LPC47B397-NC hardware
monitoring driver - for a chip that is claimed to be 100%
compatible otherwise.

Signed-off-by: Bryan Young (Utilitek Systems, Inc.)
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

---

Hi Jean: I should have sent this some time ago.  Please queue it
up for 2.6.15.

--- linux-2.6.14-rc2-mm2.orig/drivers/hwmon/smsc47b397.c
+++ linux-2.6.14-rc2-mm2/drivers/hwmon/smsc47b397.c
@@ -299,7 +299,7 @@ static int __init smsc47b397_find(unsign
 	superio_enter();
 	id = superio_inb(SUPERIO_REG_DEVID);
 
-	if (id != 0x6f) {
+	if ((id != 0x6f) && (id != 0x81)) {
 		superio_exit();
 		return -ENODEV;
 	}
@@ -310,8 +310,16 @@ static int __init smsc47b397_find(unsign
 	*addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8)
 		 |  superio_inb(SUPERIO_REG_BASE_LSB);
 
-	printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
-		"(base address 0x%04x, revision %u)\n", *addr, rev);
+	switch (id) {
+	case 0x6f:
+		printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
+			"(base address 0x%04x, revision %u)\n", *addr, rev);
+		break;
+	case 0x81:
+		printk(KERN_INFO "smsc47b397: found SMSC SCH5307-NS"
+			"(base address 0x%04x, revision %u)\n", *addr, rev);
+		break;
+	}
 
 	superio_exit();
 	return 0;
-- 
Mark M. Hoffman
mhoffman@lightlink.com


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

* [lm-sensors] Re: [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC
  2005-10-12  5:22 [lm-sensors] [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC Mark M. Hoffman
@ 2005-10-12 11:01 ` Jean Delvare
  2005-10-12 17:36 ` Craig Kelley
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2005-10-12 11:01 UTC (permalink / raw)
  To: lm-sensors


Hi Mark,

On 2005-10-12, Mark M. Hoffman wrote:
> This patch adds a new ID to the SMSC LPC47B397-NC hardware
> monitoring driver - for a chip that is claimed to be 100%
> compatible otherwise.
> (...)
> -	printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
> -		"(base address 0x%04x, revision %u)\n", *addr, rev);
> +	switch (id) {
> +	case 0x6f:
> +		printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
> +			"(base address 0x%04x, revision %u)\n", *addr, rev);
> +		break;
> +	case 0x81:
> +		printk(KERN_INFO "smsc47b397: found SMSC SCH5307-NS"
> +			"(base address 0x%04x, revision %u)\n", *addr, rev);
> +		break;
> +	}

This adds some redundancy. What about the following?

printk(KERN_INFO "smsc47b397: found %s "
       "(base address 0x%04x, revision %u)\n",
       id = 0x81 ? "SMSC SCH5307-NS" : "SMSC LPC47B397-NC",
       *addr, rev);

I would also appreciate an update to Documentation/hwmon/smsc47b397.

Thanks,
--
Jean Delvare

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

* [lm-sensors] Re: [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC
  2005-10-12  5:22 [lm-sensors] [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC Mark M. Hoffman
  2005-10-12 11:01 ` [lm-sensors] " Jean Delvare
@ 2005-10-12 17:36 ` Craig Kelley
  2005-10-12 18:46 ` Mark M. Hoffman
  2005-10-12 20:17 ` Jean Delvare
  3 siblings, 0 replies; 5+ messages in thread
From: Craig Kelley @ 2005-10-12 17:36 UTC (permalink / raw)
  To: lm-sensors

Thanks again Mark;

  -Craig

Mark M. Hoffman wrote:

>This patch adds a new ID to the SMSC LPC47B397-NC hardware
>monitoring driver - for a chip that is claimed to be 100%
>compatible otherwise.
>
>Signed-off-by: Bryan Young (Utilitek Systems, Inc.)
>Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
>
>---
>
>Hi Jean: I should have sent this some time ago.  Please queue it
>up for 2.6.15.
>
>--- linux-2.6.14-rc2-mm2.orig/drivers/hwmon/smsc47b397.c
>+++ linux-2.6.14-rc2-mm2/drivers/hwmon/smsc47b397.c
>@@ -299,7 +299,7 @@ static int __init smsc47b397_find(unsign
> 	superio_enter();
> 	id = superio_inb(SUPERIO_REG_DEVID);
> 
>-	if (id != 0x6f) {
>+	if ((id != 0x6f) && (id != 0x81)) {
> 		superio_exit();
> 		return -ENODEV;
> 	}
>@@ -310,8 +310,16 @@ static int __init smsc47b397_find(unsign
> 	*addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8)
> 		 |  superio_inb(SUPERIO_REG_BASE_LSB);
> 
>-	printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
>-		"(base address 0x%04x, revision %u)\n", *addr, rev);
>+	switch (id) {
>+	case 0x6f:
>+		printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
>+			"(base address 0x%04x, revision %u)\n", *addr, rev);
>+		break;
>+	case 0x81:
>+		printk(KERN_INFO "smsc47b397: found SMSC SCH5307-NS"
>+			"(base address 0x%04x, revision %u)\n", *addr, rev);
>+		break;
>+	}
> 
> 	superio_exit();
> 	return 0;
>  
>


-- 
Craig Kelley
In-Store Broadcasting Network
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20051012/f95f4419/attachment.html

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

* [lm-sensors] Re: [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC
  2005-10-12  5:22 [lm-sensors] [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC Mark M. Hoffman
  2005-10-12 11:01 ` [lm-sensors] " Jean Delvare
  2005-10-12 17:36 ` Craig Kelley
@ 2005-10-12 18:46 ` Mark M. Hoffman
  2005-10-12 20:17 ` Jean Delvare
  3 siblings, 0 replies; 5+ messages in thread
From: Mark M. Hoffman @ 2005-10-12 18:46 UTC (permalink / raw)
  To: lm-sensors

This patch adds a new ID to the SMSC LPC47B397-NC hardware
monitoring driver - for a chip that is claimed to be 100%
compatible otherwise.

Signed-off-by: Bryan Young (Utilitek Systems, Inc.)
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

---

Hi Jean:
This is updated to address your comments.  Please queue for 2.6.15.

--- linux-2.6.14-rc2-mm2.orig/drivers/hwmon/smsc47b397.c
+++ linux-2.6.14-rc2-mm2/drivers/hwmon/smsc47b397.c
@@ -299,7 +299,7 @@ static int __init smsc47b397_find(unsign
 	superio_enter();
 	id = superio_inb(SUPERIO_REG_DEVID);
 
-	if (id != 0x6f) {
+	if ((id != 0x6f) && (id != 0x81)) {
 		superio_exit();
 		return -ENODEV;
 	}
@@ -310,8 +310,9 @@ static int __init smsc47b397_find(unsign
 	*addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8)
 		 |  superio_inb(SUPERIO_REG_BASE_LSB);
 
-	printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC "
-		"(base address 0x%04x, revision %u)\n", *addr, rev);
+	printk(KERN_INFO "smsc47b397: found SMSC %s "
+		"(base address 0x%04x, revision %u)\n",
+		id = 0x81 ? "SCH5307-NS" : "LPC47B397-NC", *addr, rev);
 
 	superio_exit();
 	return 0;
--- linux-2.6.14-rc2-mm2.orig/Documentation/hwmon/smsc47b397
+++ linux-2.6.14-rc2-mm2/Documentation/hwmon/smsc47b397
@@ -3,6 +3,7 @@ Kernel driver smsc47b397
 
 Supported chips:
   * SMSC LPC47B397-NC
+  * SMSC SCH5307-NS
     Prefix: 'smsc47b397'
     Addresses scanned: none, address read from Super I/O config space
     Datasheet: In this file
@@ -12,11 +13,14 @@ Authors: Mark M. Hoffman <mhoffman@light
 
 November 23, 2004
 
-The following specification describes the SMSC LPC47B397-NC sensor chip
+The following specification describes the SMSC LPC47B397-NC[1] sensor chip
 (for which there is no public datasheet available). This document was
 provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
 by Mark M. Hoffman <mhoffman@lightlink.com>.
 
+[1] And SMSC SCH5307-NS, which has a different device ID but is otherwise
+compatible.
+
 * * * * *
 
 Methods for detecting the HP SIO and reading the thermal data on a dc7100.
@@ -127,7 +131,7 @@ OUT	DX,AL
 The registers of interest for identifying the SIO on the dc7100 are Device ID
 (0x20) and Device Rev  (0x21).
 
-The Device ID will read 0X6F
+The Device ID will read 0x6F (for SCH5307-NS, 0x81)
 The Device Rev currently reads 0x01
 
 Obtaining the HWM Base Address.
-- 
Mark M. Hoffman
mhoffman@lightlink.com


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

* [lm-sensors] Re: [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC
  2005-10-12  5:22 [lm-sensors] [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC Mark M. Hoffman
                   ` (2 preceding siblings ...)
  2005-10-12 18:46 ` Mark M. Hoffman
@ 2005-10-12 20:17 ` Jean Delvare
  3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2005-10-12 20:17 UTC (permalink / raw)
  To: lm-sensors

Hi Mark,

> This patch adds a new ID to the SMSC LPC47B397-NC hardware
> monitoring driver - for a chip that is claimed to be 100%
> compatible otherwise.
> (...)
> This is updated to address your comments.  Please queue for 2.6.15.

Applied, thanks. Will send to Greg in the next batch (probably next
Sunday.)

-- 
Jean Delvare

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

end of thread, other threads:[~2005-10-12 20:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-12  5:22 [lm-sensors] [PATCH 2.6.14-rc2-mm2] hwmon: add a new ID to SMSC Mark M. Hoffman
2005-10-12 11:01 ` [lm-sensors] " Jean Delvare
2005-10-12 17:36 ` Craig Kelley
2005-10-12 18:46 ` Mark M. Hoffman
2005-10-12 20:17 ` Jean Delvare

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.