summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2018-03-19 11:37:31 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-03-26 09:16:29 +0200
commit098e703b4590d7f54fde60ae0309604947998c6e (patch)
tree4d86fb1f8bd2663eb940124f1d65dc2dc691b423 /include
parent10e3166076f7de31126761aa0e271415d9b9a023 (diff)
downloadbarebox-098e703b4590d7f54fde60ae0309604947998c6e.tar.gz
barebox-098e703b4590d7f54fde60ae0309604947998c6e.tar.xz
watchdog: add watchdog poller
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>
Diffstat (limited to 'include')
-rw-r--r--include/watchdog.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/watchdog.h b/include/watchdog.h
index 2f1874c196..0db4263a31 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -13,6 +13,8 @@
#ifndef INCLUDE_WATCHDOG_H
# define INCLUDE_WATCHDOG_H
+#include <poller.h>
+
struct watchdog {
int (*set_timeout)(struct watchdog *, unsigned);
const char *name;
@@ -21,6 +23,8 @@ struct watchdog {
unsigned int priority;
unsigned int timeout_max;
unsigned int timeout_cur;
+ unsigned int poller_enable;
+ struct poller_async poller;
struct list_head list;
};