Lines Matching full:watchdog
12 * by all the watchdog timer drivers.
15 * misc device: /dev/watchdog.
43 #include <linux/watchdog.h> /* For watchdog specific items */
50 * struct watchdog_core_data - watchdog core internal data
51 * @dev: The watchdog's internal device
52 * @cdev: The watchdog's Character device.
53 * @wdd: Pointer to watchdog device.
54 * @lock: Lock for watchdog core.
55 * @status: Watchdog core internal status bits.
73 /* the dev_t structure to store the dynamically allocated watchdog devices */
75 /* Reference to watchdog device behind /dev/watchdog */
105 * - Userspace activated the watchdog. in watchdog_need_worker()
111 * Alternatively, if userspace has not opened the watchdog in watchdog_need_worker()
112 * device, we take care of feeding the watchdog if it is in watchdog_need_worker()
138 * To ensure that the watchdog times out wdd->timeout seconds in watchdog_next_keepalive()
184 err = wdd->ops->ping(wdd); /* ping the watchdog */ in __watchdog_ping()
186 err = wdd->ops->start(wdd); /* restart watchdog */ in __watchdog_ping()
194 * watchdog_ping: ping the watchdog.
195 * @wdd: the watchdog device to ping
199 * If the watchdog has no own ping operation then it needs to be
202 * We only ping when the watchdog device is running.
254 * watchdog_start: wrapper to start the watchdog.
255 * @wdd: the watchdog device to start
259 * Start the watchdog if it is not active and mark it active.
294 * watchdog_stop: wrapper to stop the watchdog.
295 * @wdd: the watchdog device to stop
299 * Stop the watchdog if it is still active and unmark it active.
302 * If the 'nowayout' feature was set, the watchdog cannot be stopped.
313 pr_info("watchdog%d: nowayout prevents watchdog being stopped!\n", in watchdog_stop()
334 * watchdog_get_status: wrapper to get the watchdog status
335 * @wdd: the watchdog device to get the status from
339 * Get the watchdog's status flags.
368 * watchdog_set_timeout: set the watchdog timer timeout
369 * @wdd: the watchdog device to set the timeout for
401 * watchdog_set_pretimeout: set the watchdog timer pretimeout
402 * @wdd: the watchdog device to set the timeout for
427 * @wdd: the watchdog device to get the remaining time from
432 * Get the time before a watchdog will reboot (if not pinged).
632 * watchdog_ioctl_op: call the watchdog drivers ioctl op if defined
633 * @wdd: the watchdog device to do the ioctl on
634 * @cmd: watchdog command
650 * watchdog_write: writes to the watchdog.
656 * A write to a watchdog device is defined as a keepalive ping.
658 * off the watchdog (if 'nowayout' is not set).
687 /* someone wrote to us, so we send the watchdog a keepalive ping */ in watchdog_write()
703 * watchdog_ioctl: handle the different ioctl's for the watchdog device.
705 * @cmd: watchdog command
708 * The watchdog API defines a common set of functions for all watchdogs
774 /* If the watchdog is active then we send a keepalive ping in watchdog_ioctl()
775 * to make sure that the watchdog keep's running (and if in watchdog_ioctl()
816 * watchdog_open: open the /dev/watchdog* devices.
820 * When the /dev/watchdog* device gets opened, we start the watchdog.
821 * Watch out: the /dev/watchdog device is single open, so we make sure
832 /* Get the corresponding watchdog device */ in watchdog_open()
839 /* the watchdog is single open! */ in watchdog_open()
846 * If the /dev/watchdog device is open, we don't want the module in watchdog_open()
867 * will take care of an always-running hardware watchdog in in watchdog_open()
873 /* dev/watchdog is a virtual (and thus non-seekable) filesystem */ in watchdog_open()
893 * watchdog_release: release the watchdog device.
897 * This is the code for when /dev/watchdog gets closed. We will only
898 * stop the watchdog when we have received the magic char (and nowayout
899 * was not set), else the watchdog will keep running.
916 * We only stop the watchdog if we received the magic character in watchdog_release()
926 /* If the watchdog was not stopped, send a keepalive ping */ in watchdog_release()
928 pr_crit("watchdog%d: watchdog did not stop!\n", wdd->id); in watchdog_release()
934 /* make sure that /dev/watchdog can be re-opened */ in watchdog_release()
941 * Allow the owner module to be unloaded again unless the watchdog in watchdog_release()
942 * is still running. If the watchdog is still running, it can not in watchdog_release()
963 .name = "watchdog",
968 .name = "watchdog",
974 * watchdog_cdev_register: register watchdog character device
975 * @wdd: watchdog device
977 * Register a watchdog character device including handling the legacy
978 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
1007 dev_set_name(&wd_data->dev, "watchdog%d", wdd->id); in watchdog_cdev_register()
1021 pr_err("%s: a legacy watchdog module is probably present.\n", in watchdog_cdev_register()
1035 pr_err("watchdog%d unable to add device %d:%d\n", in watchdog_cdev_register()
1052 * If the watchdog is running, prevent its driver from being unloaded, in watchdog_cdev_register()
1062 pr_info("watchdog%d running and kernel based pre-userspace handler disabled\n", in watchdog_cdev_register()
1070 * watchdog_cdev_unregister: unregister watchdog character device
1071 * @watchdog: watchdog device
1073 * Unregister watchdog character device and if needed the legacy
1074 * /dev/watchdog device.
1104 * watchdog_dev_register: register a watchdog device
1105 * @wdd: watchdog device
1107 * Register a watchdog device including handling the legacy
1108 * /dev/watchdog node. /dev/watchdog is actually a miscdevice and
1128 * watchdog_dev_unregister: unregister a watchdog device
1129 * @watchdog: watchdog device
1131 * Unregister watchdog device and if needed the legacy
1132 * /dev/watchdog device.
1142 * watchdog_set_last_hw_keepalive: set last HW keepalive time for watchdog
1143 * @wdd: watchdog device
1146 * Adjusts the last known HW keepalive time for a watchdog timer.
1147 * This is needed if the watchdog is already running when the probe
1149 * function must be called immediately after watchdog registration,
1172 * watchdog_dev_init: init dev part of watchdog core
1174 * Allocate a range of chardev nodes to use for watchdog devices
1183 pr_err("Failed to create watchdog kworker\n"); in watchdog_dev_init()
1194 err = alloc_chrdev_region(&watchdog_devt, 0, MAX_DOGS, "watchdog"); in watchdog_dev_init()
1196 pr_err("watchdog: unable to allocate char dev region\n"); in watchdog_dev_init()
1210 * watchdog_dev_exit: exit dev part of watchdog core
1212 * Release the range of chardev nodes used for watchdog devices
1224 "Watchdog core auto-updates boot enabled watchdogs before userspace takes over (default="
1229 …"Maximum time (in seconds, 0 means infinity) for userspace to take over a running watchdog (defaul…