LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 1/1] hwmon: add 0x8c id for smsc47b397 driver
@ 2008-02-29 17:24 Craig Kelley
  2008-03-02 19:45 ` Mark M. Hoffman
  0 siblings, 1 reply; 2+ messages in thread
From: Craig Kelley @ 2008-02-29 17:24 UTC (permalink / raw)
  To: mhoffman; +Cc: lm-sensors, linux-kernel

From: Craig Kelley <namonai@gmail.com>

Added a new ID (0x8c) for the smsc47b397 hardware monitor driver.
This ID is used by HP in, at least, their dc7700 line.

Signed-off-by: Craig Kelley <namonai@gmail.com>
---

--- drivers/hwmon/smsc47b397.c-orig     2008-02-29 07:54:18.000000000 -0800
+++ drivers/hwmon/smsc47b397.c  2008-02-29 07:53:00.000000000 -0800
@@ -331,11 +331,23 @@ exit:
 static int __init smsc47b397_find(unsigned short *addr)
 {
        u8 id, rev;
+       char *name;

        superio_enter();
        id = superio_inb(SUPERIO_REG_DEVID);

-       if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) {
+       switch(id) {
+       case 0x81:
+               name = "SCH5307-NS";
+               break;
+       case 0x6f:
+               name = "LPC47B397-NC";
+               break;
+       case 0x85:
+       case 0x8c:
+               name = "SCH5317";
+               break;
+       default:
                superio_exit();
                return -ENODEV;
        }
@@ -348,8 +360,7 @@ static int __init smsc47b397_find(unsign

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

        superio_exit();
        return 0;

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

end of thread, other threads:[~2008-03-02 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 17:24 [patch 1/1] hwmon: add 0x8c id for smsc47b397 driver Craig Kelley
2008-03-02 19:45 ` Mark M. Hoffman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).