summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wd_core.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-1/+1
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: core: check hwdev before use itAndreas Schmidt2018-04-251-2/+4
| | | | | | | | Avoid null pointer access, if hwdev was not set before call watchdog_register. Signed-off-by: Andreas Schmidt <mail@schmidt-andreas.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: add watchdog pollerOleksij Rempel2018-03-261-6/+71
| | | | | | | | | | In some cases it is practical to supervise as much as possible of the barebox execution with a watchdog (or multiple watchdogs). This patch provides an async poller for watchdog core framework which can be enabled by the user and stores this configuration to nv. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: provide timeout_cur valueOleksij Rempel2018-03-231-0/+18
| | | | | | | | | | timeout_cur will be used for watchdog poller. Provided values should be good enough for most users and still can be changed for separate projects and fit to needed requirements. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: set some reasonable timeout_max value if no other is availableOleksij Rempel2018-03-231-1/+7
| | | | | | | | Some drivers do not provide timeout_max value. Using some value is probably better then setting timeout_max to 0. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: move max timeout test in to wd_coreOleksij Rempel2018-03-231-0/+6
| | | | | | | this also will be needed for watchdog poller as well Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: register watchdog virtual device with short name wdogOleksij Rempel2018-03-231-0/+24
| | | | | | | | | | | | the watchdog hwdev is usually named with devicetree schema which is not practical for CLI. On device registration "wdog" will be extended with some index number extracted from devicetree (if awailable) or automatically assigned first available number. End result will be "wdog0" .. etc. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: rename dev to hwdevSascha Hauer2018-03-221-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: Give watchdogs a nameSascha Hauer2015-08-271-1/+14
| | | | | | | This adds a dev and name member to struct watchdog which helps distinguishing between different watchdogs. Also add some debugging aids. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: Allow multiple watchdogsSascha Hauer2015-08-271-12/+45
| | | | | | | | | Put watchdogs on a list to allow multiple watchdogs. Add a priority field to be able to pick the highest priority watchdog. This patch also provides a of_get_watchdog_priority() function to allow configuring the watchdog priority from the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add a simple watchdog frameworkJuergen Beisert2012-06-291-0/+57
This patch adds a simple wd command which can setup, trigger and stop a watchdog on the platform. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>