Lines Matching full:watchdog

13  *	by all the watchdog timer drivers.
16 * misc device: /dev/watchdog.
44 #include <linux/watchdog.h> /* For watchdog specific items */
50 /* the dev_t structure to store the dynamically allocated watchdog devices */
52 /* Reference to watchdog device behind /dev/watchdog */
82 * - Userspace activated the watchdog. in watchdog_need_worker()
88 * Alternatively, if userspace has not opened the watchdog in watchdog_need_worker()
89 * device, we take care of feeding the watchdog if it is in watchdog_need_worker()
115 * To ensure that the watchdog times out wdd->timeout seconds in watchdog_next_keepalive()
161 err = wdd->ops->ping(wdd); /* ping the watchdog */ in __watchdog_ping()
163 err = wdd->ops->start(wdd); /* restart watchdog */ in __watchdog_ping()
174 * watchdog_ping: ping the watchdog.
175 * @wdd: the watchdog device to ping
179 * If the watchdog has no own ping operation then it needs to be
182 * We only ping when the watchdog device is running.
234 * watchdog_start: wrapper to start the watchdog.
235 * @wdd: the watchdog device to start
239 * Start the watchdog if it is not active and mark it active.
277 * watchdog_stop: wrapper to stop the watchdog.
278 * @wdd: the watchdog device to stop
282 * Stop the watchdog if it is still active and unmark it active.
285 * If the 'nowayout' feature was set, the watchdog cannot be stopped.
296 pr_info("watchdog%d: nowayout prevents watchdog being stopped!\n", in watchdog_stop()
318 * watchdog_get_status: wrapper to get the watchdog status
319 * @wdd: the watchdog device to get the status from
323 * Get the watchdog's status flags.
355 * watchdog_set_timeout: set the watchdog timer timeout
356 * @wdd: the watchdog device to set the timeout for
388 * watchdog_set_pretimeout: set the watchdog timer pretimeout
389 * @wdd: the watchdog device to set the timeout for
414 * @wdd: the watchdog device to get the remaining time from
419 * Get the time before a watchdog will reboot (if not pinged).
638 * watchdog_ioctl_op: call the watchdog drivers ioctl op if defined
639 * @wdd: the watchdog device to do the ioctl on
640 * @cmd: watchdog command
656 * watchdog_write: writes to the watchdog.
662 * A write to a watchdog device is defined as a keepalive ping.
664 * off the watchdog (if 'nowayout' is not set).
693 /* someone wrote to us, so we send the watchdog a keepalive ping */ in watchdog_write()
709 * watchdog_ioctl: handle the different ioctl's for the watchdog device.
711 * @cmd: watchdog command
714 * The watchdog API defines a common set of functions for all watchdogs
780 /* If the watchdog is active then we send a keepalive ping in watchdog_ioctl()
781 * to make sure that the watchdog keep's running (and if in watchdog_ioctl()
822 * watchdog_open: open the /dev/watchdog* devices.
826 * When the /dev/watchdog* device gets opened, we start the watchdog.
827 * Watch out: the /dev/watchdog device is single open, so we make sure
838 /* Get the corresponding watchdog device */ in watchdog_open()
845 /* the watchdog is single open! */ in watchdog_open()
852 * If the /dev/watchdog device is open, we don't want the module in watchdog_open()
873 * will take care of an always-running hardware watchdog in in watchdog_open()
879 /* dev/watchdog is a virtual (and thus non-seekable) filesystem */ in watchdog_open()
899 * watchdog_release: release the watchdog device.
903 * This is the code for when /dev/watchdog gets closed. We will only
904 * stop the watchdog when we have received the magic char (and nowayout
905 * was not set), else the watchdog will keep running.
922 * We only stop the watchdog if we received the magic character in watchdog_release()
932 /* If the watchdog was not stopped, send a keepalive ping */ in watchdog_release()
934 pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id); in watchdog_release()
940 /* make sure that /dev/watchdog can be re-opened */ in watchdog_release()
947 * Allow the owner module to be unloaded again unless the watchdog in watchdog_release()
948 * is still running. If the watchdog is still running, it can not in watchdog_release()
969 .name = "watchdog",
974 .name = "watchdog",
980 * watchdog_cdev_register: register watchdog character device
981 * @wdd: watchdog device
983 * Register a watchdog character device including handling the legacy
984 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
1013 dev_set_name(&wd_data->dev, "watchdog%d", wdd->id); in watchdog_cdev_register()
1028 pr_err("%s: a legacy watchdog module is probably present.\n", in watchdog_cdev_register()
1042 pr_err("watchdog%d unable to add device %d:%d\n", in watchdog_cdev_register()
1059 * If the watchdog is running, prevent its driver from being unloaded, in watchdog_cdev_register()
1069 pr_info("watchdog%d running and kernel based pre-userspace handler disabled\n", in watchdog_cdev_register()
1077 * watchdog_cdev_unregister: unregister watchdog character device
1078 * @watchdog: watchdog device
1080 * Unregister watchdog character device and if needed the legacy
1081 * /dev/watchdog device.
1113 * watchdog_dev_register: register a watchdog device
1114 * @wdd: watchdog device
1116 * Register a watchdog device including handling the legacy
1117 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
1137 * watchdog_dev_unregister: unregister a watchdog device
1138 * @watchdog: watchdog device
1140 * Unregister watchdog device and if needed the legacy
1141 * /dev/watchdog device.
1151 * watchdog_set_last_hw_keepalive: set last HW keepalive time for watchdog
1152 * @wdd: watchdog device
1155 * Adjusts the last known HW keepalive time for a watchdog timer.
1156 * This is needed if the watchdog is already running when the probe
1158 * function must be called immediately after watchdog registration,
1184 * watchdog_dev_init: init dev part of watchdog core
1186 * Allocate a range of chardev nodes to use for watchdog devices
1195 pr_err("Failed to create watchdog kworker\n"); in watchdog_dev_init()
1206 err = alloc_chrdev_region(&watchdog_devt, 0, MAX_DOGS, "watchdog"); in watchdog_dev_init()
1208 pr_err("watchdog: unable to allocate char dev region\n"); in watchdog_dev_init()
1222 * watchdog_dev_exit: exit dev part of watchdog core
1224 * Release the range of chardev nodes used for watchdog devices
1252 * make sure that watchdog worker will not kick in when the wdog is in watchdog_dev_suspend()
1283 "Watchdog core auto-updates boot enabled watchdogs before userspace takes over (default="
1288 …"Maximum time (in seconds, 0 means infinity) for userspace to take over a running watchdog (defaul…