summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/reset_source.c6
-rw-r--r--include/reset_source.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/common/reset_source.c b/common/reset_source.c
index 6a6c4f5daf..338d7b9acb 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)
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