Lines Matching full:watchdog

13  *	by all the watchdog timer drivers.
16 * misc device: /dev/watchdog.
45 #include <linux/watchdog.h> /* For watchdog specific items */
51 #include <trace/events/watchdog.h>
53 /* the dev_t structure to store the dynamically allocated watchdog devices */
55 /* Reference to watchdog device behind /dev/watchdog */
85 * - Userspace activated the watchdog. in watchdog_need_worker()
91 * Alternatively, if userspace has not opened the watchdog in watchdog_need_worker()
92 * device, we take care of feeding the watchdog if it is in watchdog_need_worker()
118 * To ensure that the watchdog times out wdd->timeout seconds in watchdog_next_keepalive()
164 err = wdd->ops->ping(wdd); /* ping the watchdog */ in __watchdog_ping()
167 err = wdd->ops->start(wdd); /* restart watchdog */ in __watchdog_ping()
180 * watchdog_ping - ping the watchdog
181 * @wdd: The watchdog device to ping
183 * If the watchdog has no own ping operation then it needs to be
186 * We only ping when the watchdog device is running.
240 * watchdog_start - wrapper to start the watchdog
241 * @wdd: The watchdog device to start
243 * Start the watchdog if it is not active and mark it active.
283 * watchdog_stop - wrapper to stop the watchdog
284 * @wdd: The watchdog device to stop
286 * Stop the watchdog if it is still active and unmark it active.
287 * If the 'nowayout' feature was set, the watchdog cannot be stopped.
300 pr_info("watchdog%d: nowayout prevents watchdog being stopped!\n", in watchdog_stop()
323 * watchdog_get_status - wrapper to get the watchdog status
324 * @wdd: The watchdog device to get the status from
326 * Get the watchdog's status flags.
329 * Return: watchdog's status flags.
360 * watchdog_set_timeout - set the watchdog timer timeout
361 * @wdd: The watchdog device to set the timeout for
395 * watchdog_set_pretimeout - set the watchdog timer pretimeout
396 * @wdd: The watchdog device to set the timeout for
422 * @wdd: The watchdog device to get the remaining time from
425 * Get the time before a watchdog will reboot (if not pinged).
666 * watchdog_ioctl_op - call the watchdog drivers ioctl op if defined
667 * @wdd: The watchdog device to do the ioctl on
668 * @cmd: Watchdog command
685 * watchdog_write - writes to the watchdog
691 * A write to a watchdog device is defined as a keepalive ping.
693 * off the watchdog (if 'nowayout' is not set).
723 /* someone wrote to us, so we send the watchdog a keepalive ping */ in watchdog_write()
739 * watchdog_ioctl - handle the different ioctl's for the watchdog device
741 * @cmd: Watchdog command
744 * The watchdog API defines a common set of functions for all watchdogs
812 /* If the watchdog is active then we send a keepalive ping in watchdog_ioctl()
813 * to make sure that the watchdog keep's running (and if in watchdog_ioctl()
854 * watchdog_open - open the /dev/watchdog* devices
858 * When the /dev/watchdog* device gets opened, we start the watchdog.
859 * Watch out: the /dev/watchdog device is single open, so we make sure
871 /* Get the corresponding watchdog device */ in watchdog_open()
878 /* the watchdog is single open! */ in watchdog_open()
885 * If the /dev/watchdog device is open, we don't want the module in watchdog_open()
906 * will take care of an always-running hardware watchdog in in watchdog_open()
912 /* dev/watchdog is a virtual (and thus non-seekable) filesystem */ in watchdog_open()
932 * watchdog_release - release the watchdog device
936 * This is the code for when /dev/watchdog gets closed. We will only
937 * stop the watchdog when we have received the magic char (and nowayout
938 * was not set), else the watchdog will keep running.
956 * We only stop the watchdog if we received the magic character in watchdog_release()
966 /* If the watchdog was not stopped, send a keepalive ping */ in watchdog_release()
968 pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id); in watchdog_release()
974 /* make sure that /dev/watchdog can be re-opened */ in watchdog_release()
981 * Allow the owner module to be unloaded again unless the watchdog in watchdog_release()
982 * is still running. If the watchdog is still running, it can not in watchdog_release()
1003 .name = "watchdog",
1008 .name = "watchdog",
1013 * watchdog_cdev_register - register watchdog character device
1014 * @wdd: Watchdog device
1016 * Register a watchdog character device including handling the legacy
1017 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
1047 err = dev_set_name(&wd_data->dev, "watchdog%d", wdd->id); in watchdog_cdev_register()
1066 pr_err("%s: a legacy watchdog module is probably present.\n", in watchdog_cdev_register()
1081 pr_err("watchdog%d unable to add device %d:%d\n", in watchdog_cdev_register()
1096 * If the watchdog is running, prevent its driver from being unloaded, in watchdog_cdev_register()
1106 pr_info("watchdog%d running and kernel based pre-userspace handler disabled\n", in watchdog_cdev_register()
1114 * watchdog_cdev_unregister - unregister watchdog character device
1115 * @wdd: Watchdog device
1117 * Unregister watchdog character device and if needed the legacy
1118 * /dev/watchdog device.
1149 * watchdog_dev_register - register a watchdog device
1150 * @wdd: Watchdog device
1152 * Register a watchdog device including handling the legacy
1153 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
1174 * watchdog_dev_unregister - unregister a watchdog device
1175 * @wdd: watchdog device
1177 * Unregister watchdog device and if needed the legacy
1178 * /dev/watchdog device.
1187 * watchdog_set_last_hw_keepalive - set last HW keepalive time for watchdog
1188 * @wdd: Watchdog device
1191 * Adjusts the last known HW keepalive time for a watchdog timer.
1192 * This is needed if the watchdog is already running when the probe
1194 * function must be called immediately after watchdog registration,
1222 * watchdog_dev_init - init dev part of watchdog core
1224 * Allocate a range of chardev nodes to use for watchdog devices.
1234 pr_err("Failed to create watchdog kworker\n"); in watchdog_dev_init()
1245 err = alloc_chrdev_region(&watchdog_devt, 0, MAX_DOGS, "watchdog"); in watchdog_dev_init()
1247 pr_err("watchdog: unable to allocate char dev region\n"); in watchdog_dev_init()
1261 * watchdog_dev_exit - exit dev part of watchdog core
1263 * Release the range of chardev nodes used for watchdog devices.
1290 * make sure that watchdog worker will not kick in when the wdog is in watchdog_dev_suspend()
1321 "Watchdog core auto-updates boot enabled watchdogs before userspace takes over (default="
1326 …"Maximum time (in seconds, 0 means infinity) for userspace to take over a running watchdog (defaul…