summaryrefslogtreecommitdiffstats
path: root/common/reset_source.c
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 /common/reset_source.c
parentccdc6ba32216c1ffa5a5d86778b505141e973a31 (diff)
downloadbarebox-307da7d4ffabd1ab514742259744ad09f0bdeddd.tar.gz
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 'common/reset_source.c')
-rw-r--r--common/reset_source.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/reset_source.c b/common/reset_source.c
index 6a6c4f5..338d7b9 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -60,6 +60,12 @@ void reset_source_set_priority(enum reset_src_type st, unsigned int priority)
}
EXPORT_SYMBOL(reset_source_set_priority);
+const char *reset_source_name(void)
+{
+ return reset_src_names[reset_source];
+}
+EXPORT_SYMBOL(reset_source_name);
+
void reset_source_set_instance(enum reset_src_type type, int instance)
{
if (reset_source == type)