diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-11-07 14:26:42 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-11-07 14:26:42 +0100 |
commit | 047d617c6449da6b17a3b844802bb5e127fef7c3 (patch) | |
tree | 6d28caf8a4f7c155b3406d71a0b5f7c38f844eac /include | |
parent | cd8a909bb3e7af6d905e4b554b10a3bf9718f5c5 (diff) | |
parent | cbfdbf38c190bc9197f85c9633f103cdc15de571 (diff) | |
download | barebox-047d617c6449da6b17a3b844802bb5e127fef7c3.tar.gz barebox-047d617c6449da6b17a3b844802bb5e127fef7c3.tar.xz |
Merge branch 'for-next/watchdog'
Diffstat (limited to 'include')
-rw-r--r-- | include/watchdog.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/watchdog.h b/include/watchdog.h index 0db4263a31..184a218916 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -14,6 +14,7 @@ # define INCLUDE_WATCHDOG_H #include <poller.h> +#include <driver.h> struct watchdog { int (*set_timeout)(struct watchdog *, unsigned); @@ -22,7 +23,7 @@ struct watchdog { struct device_d dev; unsigned int priority; unsigned int timeout_max; - unsigned int timeout_cur; + unsigned int poller_timeout_cur; unsigned int poller_enable; struct poller_async poller; struct list_head list; @@ -31,7 +32,9 @@ struct watchdog { #ifdef CONFIG_WATCHDOG int watchdog_register(struct watchdog *); int watchdog_deregister(struct watchdog *); -int watchdog_set_timeout(unsigned); +struct watchdog *watchdog_get_default(void); +struct watchdog *watchdog_get_by_name(const char *name); +int watchdog_set_timeout(struct watchdog*, unsigned); unsigned int of_get_watchdog_priority(struct device_node *node); #else static inline int watchdog_register(struct watchdog *w) @@ -44,11 +47,22 @@ static inline int watchdog_deregister(struct watchdog *w) return 0; } -static inline int watchdog_set_timeout(unsigned t) +static inline struct watchdog *watchdog_get_default(void) +{ + return NULL; +} + +static inline struct watchdog *watchdog_get_by_name(const char *name) +{ + return NULL; +} + +static inline int watchdog_set_timeout(struct watchdog*w, unsigned t) { return 0; } + static inline unsigned int of_get_watchdog_priority(struct device_node *node) { return 0; |