diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2006-09-07 11:57:00 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-10-04 22:45:21 +0200 |
commit | a7933e05d46f49385841d09028ee07fae2b383f2 (patch) | |
tree | 57e72c5167643a5501de03b644eb4a6e5400b14b /drivers/char/watchdog | |
parent | c81b2996253a94278057f83a24dfa9053f0dee7a (diff) | |
download | linux-a7933e05d46f49385841d09028ee07fae2b383f2.tar.bz2 |
[WATCHDOG] w83697hf/hg WDT driver - patch 11
This is patch 11 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.
This patch contains following changes:
- Add w83697hf_select_wdt() and w83697hf_deselect_wdt()
so that the start/stop/ping code can directly talk to
the watchdog.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r-- | drivers/char/watchdog/w83697hf_wdt.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c index 4e0bd4e714e3..b12f8b800762 100644 --- a/drivers/char/watchdog/w83697hf_wdt.c +++ b/drivers/char/watchdog/w83697hf_wdt.c @@ -102,6 +102,19 @@ w83697hf_set_reg(unsigned char reg, unsigned char data) } static void +w83697hf_select_wdt(void) +{ + w83697hf_unlock(); + w83697hf_set_reg(0x07, 0x08); /* Switch to logic device 8 (GPIO2) */ +} + +static inline void +w83697hf_deselect_wdt(void) +{ + w83697hf_lock(); +} + +static void w83697hf_select_wd_register(void) { w83697hf_unlock(); @@ -142,11 +155,11 @@ wdt_ctrl(int timeout) { spin_lock(&io_lock); - w83697hf_select_wd_register(); + w83697hf_select_wdt(); w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */ - w83697hf_unselect_wd_register(); + w83697hf_deselect_wdt(); spin_unlock(&io_lock); } |