summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:18 +0200
commite5fc57847e7a68ad4a662e9799afb103211e4073 (patch)
treefba7865660b3acf477eac3998affeeca83e57638 /include
parentd11999163ba62a239022d7ba98bc524730575db8 (diff)
parente208e049f98de40157eb3d8f8f7cbb61147a5040 (diff)
downloadbarebox-e5fc57847e7a68ad4a662e9799afb103211e4073.tar.gz
barebox-e5fc57847e7a68ad4a662e9799afb103211e4073.tar.xz
Merge branch 'for-next/reset-source'
Diffstat (limited to 'include')
-rw-r--r--include/reset_source.h46
1 files changed, 32 insertions, 14 deletions
diff --git a/include/reset_source.h b/include/reset_source.h
index 13bc3bcfde..3ccd529fdd 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -26,45 +26,63 @@ enum reset_src_type {
};
#ifdef CONFIG_RESET_SOURCE
-void reset_source_set_priority(enum reset_src_type, unsigned int priority);
+
enum reset_src_type reset_source_get(void);
-void reset_source_set_instance(enum reset_src_type type, int instance);
+const char *reset_source_name(void);
int reset_source_get_instance(void);
+struct device_d *reset_source_get_device(void);
+
+void reset_source_set_device(struct device_d *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);
-const char *reset_source_name(void);
+
#else
-static inline void reset_source_set_priority(enum reset_src_type type,
- unsigned int priority)
+
+static inline enum reset_src_type reset_source_get(void)
{
+ return RESET_UKWN;
}
-static inline void reset_source_set_instance(enum reset_src_type type, int instance)
+static inline const char *reset_source_name(void)
{
+ return "unknown";
}
-static inline enum reset_src_type reset_source_get(void)
+static inline int reset_source_get_instance(void)
{
- return RESET_UKWN;
+ return -1;
}
-static inline int reset_source_get_instance(void)
+static inline struct device_d *reset_source_get_device(void)
{
- return 0;
+ return NULL;
}
-static inline unsigned int of_get_reset_source_priority(struct device_node *node)
+static inline void reset_source_set_prinst(enum reset_src_type type,
+ unsigned int priority, int instance)
{
- return 0;
}
-static inline const char *reset_source_name(void)
+static inline void reset_source_set_instance(enum reset_src_type type, int instance)
{
- return "unknown";
+}
+
+static inline unsigned int of_get_reset_source_priority(struct device_node *node)
+{
+ return 0;
}
#endif
#define RESET_SOURCE_DEFAULT_PRIORITY 100
+static inline void reset_source_set_priority(enum reset_src_type type,
+ unsigned int priority)
+{
+ reset_source_set_prinst(type, priority, -1);
+}
+
static inline void reset_source_set(enum reset_src_type type)
{
reset_source_set_priority(type, RESET_SOURCE_DEFAULT_PRIORITY);