diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2006-09-07 05:57:00 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-10-04 16:45:30 -0400 |
commit | d46ab596e251e35a7e27c95e4e4d01921f3e579e (patch) | |
tree | 6c759b1fa13d6c8cf9fc63cd9481c7ba72923cbd /drivers/char/watchdog | |
parent | a7933e05d46f49385841d09028ee07fae2b383f2 (diff) |
[WATCHDOG] w83697hf/hg WDT driver - patch 12
This is patch 12 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_write_timeout() to set the
watchdog's timeout value.
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 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c index b12f8b800762..b3dcc81abbbc 100644 --- a/drivers/char/watchdog/w83697hf_wdt.c +++ b/drivers/char/watchdog/w83697hf_wdt.c | |||
@@ -83,8 +83,8 @@ w83697hf_lock(void) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * The two functions w83697hf_get_reg() and w83697hf_set_reg() | 86 | * The three functions w83697hf_get_reg(), w83697hf_set_reg() and |
87 | * must be called with the device unlocked. | 87 | * w83697hf_write_timeout() must be called with the device unlocked. |
88 | */ | 88 | */ |
89 | 89 | ||
90 | static unsigned char | 90 | static unsigned char |
@@ -102,6 +102,12 @@ w83697hf_set_reg(unsigned char reg, unsigned char data) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static void | 104 | static void |
105 | w83697hf_write_timeout(int timeout) | ||
106 | { | ||
107 | w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */ | ||
108 | } | ||
109 | |||
110 | static void | ||
105 | w83697hf_select_wdt(void) | 111 | w83697hf_select_wdt(void) |
106 | { | 112 | { |
107 | w83697hf_unlock(); | 113 | w83697hf_unlock(); |
@@ -157,7 +163,7 @@ wdt_ctrl(int timeout) | |||
157 | 163 | ||
158 | w83697hf_select_wdt(); | 164 | w83697hf_select_wdt(); |
159 | 165 | ||
160 | w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */ | 166 | w83697hf_write_timeout(timeout); |
161 | 167 | ||
162 | w83697hf_deselect_wdt(); | 168 | w83697hf_deselect_wdt(); |
163 | 169 | ||