path: root/include/reset_source.h
diff options
authorUwe Kleine-König <>2019-08-25 17:58:40 +0200
committerSascha Hauer <>2019-08-28 13:33:42 +0200
commit935446094311ccbc6888dc2dbe238b764a8e073e (patch)
tree325c999d1d692de382b6b6803daec0e8ed0b6f8c /include/reset_source.h
parent06a912b046aa0661f6eae29ea26bc883d5d6041b (diff)
reset_source: drop reset_source_set_instance()
The semantic of reset_source_set_instance() required a separate call to reset_source_set() (or reset_source_set_priority()) and checked right usage only using the type. Make the set of functions a bit easier to use by dropping reset_source_set_instance() and instead introduce a function that can set all relevant parameters (source, priority and instance) in one go. Signed-off-by: Uwe Kleine-König <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'include/reset_source.h')
1 files changed, 10 insertions, 4 deletions
diff --git a/include/reset_source.h b/include/reset_source.h
index 85329c8cea..22c51a0ea6 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -31,8 +31,8 @@ enum reset_src_type reset_source_get(void);
const char *reset_source_name(void);
int reset_source_get_instance(void);
-void reset_source_set_priority(enum reset_src_type, unsigned int priority);
-void reset_source_set_instance(enum reset_src_type type, int instance);
+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);
@@ -53,8 +53,8 @@ static inline int reset_source_get_instance(void)
return -1;
-static inline void reset_source_set_priority(enum reset_src_type type,
- unsigned int priority)
+static inline void reset_source_set_prinst(enum reset_src_type type,
+ unsigned int priority, int instance)
@@ -70,6 +70,12 @@ static inline unsigned int of_get_reset_source_priority(struct device_node *node
+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);