Lines Matching full:watchdog
11 * by all the watchdog timer drivers.
14 * misc device: /dev/watchdog.
40 #include <linux/watchdog.h> /* For watchdog specific items */
45 /* make sure we only register one /dev/watchdog device */
47 /* the watchdog device behind /dev/watchdog */
51 * watchdog_ping: ping the watchdog.
52 * @wddev: the watchdog device to ping
54 * If the watchdog has no own ping operation then it needs to be
57 * We only ping when the watchdog device is running.
64 return wddev->ops->ping(wddev); /* ping the watchdog */ in watchdog_ping()
66 return wddev->ops->start(wddev); /* restart watchdog */ in watchdog_ping()
72 * watchdog_start: wrapper to start the watchdog.
73 * @wddev: the watchdog device to start
75 * Start the watchdog if it is not active and mark it active.
95 * watchdog_stop: wrapper to stop the watchdog.
96 * @wddev: the watchdog device to stop
98 * Stop the watchdog if it is still active and unmark it active.
101 * If the 'nowayout' feature was set, the watchdog cannot be stopped.
109 pr_info("%s: nowayout prevents watchdog to be stopped!\n", in watchdog_stop()
125 * watchdog_write: writes to the watchdog.
131 * A write to a watchdog device is defined as a keepalive ping.
133 * off the watchdog (if 'nowayout' is not set).
159 /* someone wrote to us, so we send the watchdog a keepalive ping */ in watchdog_write()
166 * watchdog_ioctl: handle the different ioctl's for the watchdog device.
168 * @cmd: watchdog command
171 * The watchdog API defines a common set of functions for all watchdogs
230 /* If the watchdog is active then we send a keepalive ping in watchdog_ioctl()
231 * to make sure that the watchdog keep's running (and if in watchdog_ioctl()
246 * watchdog_open: open the /dev/watchdog device.
250 * When the /dev/watchdog device gets opened, we start the watchdog.
251 * Watch out: the /dev/watchdog device is single open, so we make sure
259 /* the watchdog is single open! */ in watchdog_open()
264 * If the /dev/watchdog device is open, we don't want the module in watchdog_open()
274 /* dev/watchdog is a virtual (and thus non-seekable) filesystem */ in watchdog_open()
285 * watchdog_release: release the /dev/watchdog device.
289 * This is the code for when /dev/watchdog gets closed. We will only
290 * stop the watchdog when we have received the magic char (and nowayout
291 * was not set), else the watchdog will keep running.
299 * We only stop the watchdog if we received the magic character in watchdog_release()
307 /* If the watchdog was not stopped, send a keepalive ping */ in watchdog_release()
309 pr_crit("%s: watchdog did not stop!\n", wdd->info->identity); in watchdog_release()
316 /* make sure that /dev/watchdog can be re-opened */ in watchdog_release()
332 .name = "watchdog",
338 * @watchdog: watchdog device
340 * Register a watchdog device as /dev/watchdog. /dev/watchdog
344 int watchdog_dev_register(struct watchdog_device *watchdog) in watchdog_dev_register() argument
348 /* Only one device can register for /dev/watchdog */ in watchdog_dev_register()
350 pr_err("only one watchdog can use /dev/watchdog.\n"); in watchdog_dev_register()
354 wdd = watchdog; in watchdog_dev_register()
359 watchdog->info->identity, WATCHDOG_MINOR, err); in watchdog_dev_register()
373 * @watchdog: watchdog device
375 * Deregister the /dev/watchdog device.
378 int watchdog_dev_unregister(struct watchdog_device *watchdog) in watchdog_dev_unregister() argument
380 /* Check that a watchdog device was registered in the past */ in watchdog_dev_unregister()
384 /* We can only unregister the watchdog device that was registered */ in watchdog_dev_unregister()
385 if (watchdog != wdd) { in watchdog_dev_unregister()
386 pr_err("%s: watchdog was not registered as /dev/watchdog.\n", in watchdog_dev_unregister()
387 watchdog->info->identity); in watchdog_dev_unregister()