Lines Matching +full:timer +full:- +full:watchdog
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * W83877F Computer Watchdog Timer driver
9 * any of this software. This material is provided "AS-IS" in
14 * 4/19 - 2001 [Initial revision]
15 * 9/27 - 2001 Added spinlocking
16 * 4/12 - 2002 [rob@osinvestor.com] Eliminate extra comments
27 * 09/8 - 2003 [wim@iguana.be] cleanup of trailing spaces
35 * drivers in that the driver will ping the watchdog by itself,
46 #include <linux/timer.h>
49 #include <linux/watchdog.h>
70 * EMACS PC-104 board I'm using). If we reset the watchdog every
78 * char to /dev/watchdog every 30 seconds.
86 "Watchdog timeout in seconds. (1<=timeout<=3600, default="
93 "Watchdog cannot be stopped once started (default="
97 static DEFINE_TIMER(timer, wdt_timer_ping);
119 /* Re-set the timer interval */ in wdt_timer_ping()
120 mod_timer(&timer, jiffies + WDT_INTERVAL); in wdt_timer_ping()
125 pr_warn("Heartbeat lost! Will not ping the watchdog\n"); in wdt_timer_ping()
144 /* enable watchdog */ in wdt_change()
158 /* Start the timer */ in wdt_startup()
159 mod_timer(&timer, jiffies + WDT_INTERVAL); in wdt_startup()
163 pr_info("Watchdog timer is now enabled\n"); in wdt_startup()
168 /* Stop the timer */ in wdt_turnoff()
169 del_timer_sync(&timer); in wdt_turnoff()
173 pr_info("Watchdog timer is now disabled...\n"); in wdt_turnoff()
183 * /dev/watchdog handling
189 /* See if we got the magic character 'V' and reload the timer */ in fop_write()
203 return -EFAULT; in fop_write()
209 /* someone wrote to us, we should restart timer */ in fop_write()
219 return -EBUSY; in fop_open()
231 del_timer(&timer); in fop_close()
252 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; in fop_ioctl()
258 int new_options, retval = -EINVAL; in fop_ioctl()
261 return -EFAULT; in fop_ioctl()
283 return -EFAULT; in fop_ioctl()
287 return -EINVAL; in fop_ioctl()
296 return -ENOTTY; in fop_ioctl()
311 .name = "watchdog",
350 int rc = -EBUSY; in w83877f_wdt_init()
361 rc = -EIO; in w83877f_wdt_init()
367 rc = -EIO; in w83877f_wdt_init()
403 MODULE_DESCRIPTION("Driver for watchdog timer in w83877f chip");