[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#597820: linux-image-2.6.32-5-amd64: 2.6.32 doesn't support the f71889fg sensor chip



On Sun, Oct 03, 2010 at 01:14:24AM +0200, Giel van Schijndel wrote:
> On Sat, Oct 02, 2010 at 08:42:19PM +0100, Ben Hutchings wrote:
>> On Tue, 2010-09-28 at 10:36 +0200, Mike Hommey wrote:
>>> I would also be interested in the watchdog support for the same chip,
> 
> That patch does *not* add watchdog support for the Fintek F71889FG chip,
> it *only* adds support for the F71808E and the F71882FG.  Additionally a
> patch for the F71862FG is currently pending review and inclusion.
> 
> That being said, this driver should be fairly easy to expand to include
> support for the F71889FG chip (AFAIK only pin-configuration should be
> added, which probably is just a datasheet-reading exercise).  Adding
> support however would be something I'd suggest doing across the LKML
> *first*, then (optionally) backport it later.

Heck I gave it a try and attached you'll find a patch to add F71889FG
support to the current f71808e_wdt watchdog driver.  The reason I
haven't send this to the LKML before however, is that I don't have any
system with that chip to test it, so please do test it and tell me the
results.

-- 
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
--
"It would seem that perfection is attained not when no more can be
 added, but when no more can be removed."
  -- Antoine de Saint Exupéry
From 842fb8626d06a1aa4fc8565f2040b3d8e99e8a9d Mon Sep 17 00:00:00 2001
From: Giel van Schijndel <me@mortis.eu>
Date: Sun, 3 Oct 2010 01:29:17 +0200
Subject: [PATCH] watchdog: f71808e_wdt: add support for the F71889FG
---
 drivers/watchdog/f71808e_wdt.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c
index 7e5c266..2753eee 100644
--- a/drivers/watchdog/f71808e_wdt.c
+++ b/drivers/watchdog/f71808e_wdt.c
@@ -308,6 +308,11 @@ static int watchdog_start(void)
 		superio_set_bit(watchdog.sioaddr, 0x29, 1);
 		break;
 
+	case f71889fg:
+		/* set pin 40 to WDTRST# */
+		superio_outb(watchdog.sioaddr, 0x2b,
+				superio_inb(watchdog.sioaddr, 0x2b) & 0xcf);
+
 	default:
 		/*
 		 * 'default' label to shut up the compiler and catch
@@ -708,8 +713,10 @@ static int __init f71808e_find(int sioaddr)
 	case SIO_F71882_ID:
 		watchdog.type = f71882fg;
 		break;
-	case SIO_F71862_ID:
 	case SIO_F71889_ID:
+		watchdog.type = f71889fg;
+		break;
+	case SIO_F71862_ID:
 		/* These have a watchdog, though it isn't implemented (yet). */
 		err = -ENOSYS;
 		goto exit;
-- 
1.6.4.4

Attachment: signature.asc
Description: Digital signature


Reply to: