summaryrefslogtreecommitdiffstats
path: root/include/reset_source.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-04-20 18:05:33 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-05-08 08:04:19 +0200
commit307da7d4ffabd1ab514742259744ad09f0bdeddd (patch)
tree29b5ea2b85dfcab5511bbb218d8777b80b2a7d99 /include/reset_source.h
parentccdc6ba32216c1ffa5a5d86778b505141e973a31 (diff)
downloadbarebox-307da7d4ffabd1ab514742259744ad09f0bdeddd.tar.gz
barebox-307da7d4ffabd1ab514742259744ad09f0bdeddd.tar.xz
common: reset_source: Introduce reset_source_name()
Introduce reset_source_name() to get string representation of current reset source. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/reset_source.h')
-rw-r--r--include/reset_source.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/reset_source.h b/include/reset_source.h
index c9911c008c..86e415abcf 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -30,6 +30,7 @@ enum reset_src_type reset_source_get(void);
void reset_source_set_instance(enum reset_src_type type, int instance);
int reset_source_get_instance(void);
unsigned int of_get_reset_source_priority(struct device_node *node);
+const char *reset_source_name(void);
#else
static inline void reset_source_set_priority(enum reset_src_type type,
unsigned int priority)
@@ -54,6 +55,11 @@ static inline unsigned int of_get_reset_source_priority(struct device_node *node
{
return 0;
}
+
+static inline const char *reset_source_name(void)
+{
+ return "unknown";
+}
#endif
#define RESET_SOURCE_DEFAULT_PRIORITY 100