summaryrefslogtreecommitdiffstats
path: root/include/reset_source.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/reset_source.h')
-rw-r--r--include/reset_source.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/include/reset_source.h b/include/reset_source.h
index 3ccd529fdd..3766208b6d 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -1,13 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#ifndef __INCLUDE_RESET_SOURCE_H
@@ -28,16 +24,14 @@ enum reset_src_type {
#ifdef CONFIG_RESET_SOURCE
enum reset_src_type reset_source_get(void);
-const char *reset_source_name(void);
+const char *reset_source_to_string(enum reset_src_type st);
int reset_source_get_instance(void);
-struct device_d *reset_source_get_device(void);
+struct device *reset_source_get_device(void);
-void reset_source_set_device(struct device_d *dev, enum reset_src_type st);
+void reset_source_set_device(struct device *dev, enum reset_src_type st);
void reset_source_set_prinst(enum reset_src_type,
unsigned int priority, int instance);
-unsigned int of_get_reset_source_priority(struct device_node *node);
-
#else
static inline enum reset_src_type reset_source_get(void)
@@ -45,7 +39,7 @@ static inline enum reset_src_type reset_source_get(void)
return RESET_UKWN;
}
-static inline const char *reset_source_name(void)
+static inline const char *reset_source_to_string(enum reset_src_type st)
{
return "unknown";
}
@@ -55,23 +49,23 @@ static inline int reset_source_get_instance(void)
return -1;
}
-static inline struct device_d *reset_source_get_device(void)
+static inline struct device *reset_source_get_device(void)
{
return NULL;
}
-static inline void reset_source_set_prinst(enum reset_src_type type,
- unsigned int priority, int instance)
+static inline void reset_source_set_device(struct device *dev,
+ enum reset_src_type st)
{
}
-static inline void reset_source_set_instance(enum reset_src_type type, int instance)
+static inline void reset_source_set_prinst(enum reset_src_type type,
+ unsigned int priority, int instance)
{
}
-static inline unsigned int of_get_reset_source_priority(struct device_node *node)
+static inline void reset_source_set_instance(enum reset_src_type type, int instance)
{
- return 0;
}
#endif
@@ -88,4 +82,9 @@ static inline void reset_source_set(enum reset_src_type type)
reset_source_set_priority(type, RESET_SOURCE_DEFAULT_PRIORITY);
}
+static inline const char *reset_source_name(void)
+{
+ return reset_source_to_string(reset_source_get());
+}
+
#endif /* __INCLUDE_RESET_SOURCE_H */