diff options
Diffstat (limited to 'drivers/char/watchdog/w83697hf_wdt.c')
-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) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static void | 104 | static void |
105 | w83697hf_select_wdt(void) | ||
106 | { | ||
107 | w83697hf_unlock(); | ||
108 | w83697hf_set_reg(0x07, 0x08); /* Switch to logic device 8 (GPIO2) */ | ||
109 | } | ||
110 | |||
111 | static inline void | ||
112 | w83697hf_deselect_wdt(void) | ||
113 | { | ||
114 | w83697hf_lock(); | ||
115 | } | ||
116 | |||
117 | static void | ||
105 | w83697hf_select_wd_register(void) | 118 | w83697hf_select_wd_register(void) |
106 | { | 119 | { |
107 | w83697hf_unlock(); | 120 | w83697hf_unlock(); |
@@ -142,11 +155,11 @@ wdt_ctrl(int timeout) | |||
142 | { | 155 | { |
143 | spin_lock(&io_lock); | 156 | spin_lock(&io_lock); |
144 | 157 | ||
145 | w83697hf_select_wd_register(); | 158 | w83697hf_select_wdt(); |
146 | 159 | ||
147 | w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */ | 160 | w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */ |
148 | 161 | ||
149 | w83697hf_unselect_wd_register(); | 162 | w83697hf_deselect_wdt(); |
150 | 163 | ||
151 | spin_unlock(&io_lock); | 164 | spin_unlock(&io_lock); |
152 | } | 165 | } |