summaryrefslogtreecommitdiffstats
path: root/include/linux/reset.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/reset.h')
-rw-r--r--include/linux/reset.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 29af6d6b2f4b..c1901b61ca30 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -32,6 +32,8 @@ struct reset_control *devm_reset_control_array_get(struct device *dev,
32struct reset_control *of_reset_control_array_get(struct device_node *np, 32struct reset_control *of_reset_control_array_get(struct device_node *np,
33 bool shared, bool optional); 33 bool shared, bool optional);
34 34
35int reset_control_get_count(struct device *dev);
36
35#else 37#else
36 38
37static inline int reset_control_reset(struct reset_control *rstc) 39static inline int reset_control_reset(struct reset_control *rstc)
@@ -97,6 +99,11 @@ of_reset_control_array_get(struct device_node *np, bool shared, bool optional)
97 return optional ? NULL : ERR_PTR(-ENOTSUPP); 99 return optional ? NULL : ERR_PTR(-ENOTSUPP);
98} 100}
99 101
102static inline int reset_control_get_count(struct device *dev)
103{
104 return -ENOENT;
105}
106
100#endif /* CONFIG_RESET_CONTROLLER */ 107#endif /* CONFIG_RESET_CONTROLLER */
101 108
102static inline int __must_check device_reset(struct device *dev) 109static inline int __must_check device_reset(struct device *dev)
@@ -138,7 +145,7 @@ __must_check reset_control_get_exclusive(struct device *dev, const char *id)
138 * 145 *
139 * Returns a struct reset_control or IS_ERR() condition containing errno. 146 * Returns a struct reset_control or IS_ERR() condition containing errno.
140 * This function is intended for use with reset-controls which are shared 147 * This function is intended for use with reset-controls which are shared
141 * between hardware-blocks. 148 * between hardware blocks.
142 * 149 *
143 * When a reset-control is shared, the behavior of reset_control_assert / 150 * When a reset-control is shared, the behavior of reset_control_assert /
144 * deassert is changed, the reset-core will keep track of a deassert_count 151 * deassert is changed, the reset-core will keep track of a deassert_count
@@ -187,7 +194,7 @@ static inline struct reset_control *of_reset_control_get_exclusive(
187} 194}
188 195
189/** 196/**
190 * of_reset_control_get_shared - Lookup and obtain an shared reference 197 * of_reset_control_get_shared - Lookup and obtain a shared reference
191 * to a reset controller. 198 * to a reset controller.
192 * @node: device to be reset by the controller 199 * @node: device to be reset by the controller
193 * @id: reset line name 200 * @id: reset line name
@@ -229,7 +236,7 @@ static inline struct reset_control *of_reset_control_get_exclusive_by_index(
229} 236}
230 237
231/** 238/**
232 * of_reset_control_get_shared_by_index - Lookup and obtain an shared 239 * of_reset_control_get_shared_by_index - Lookup and obtain a shared
233 * reference to a reset controller 240 * reference to a reset controller
234 * by index. 241 * by index.
235 * @node: device to be reset by the controller 242 * @node: device to be reset by the controller
@@ -322,7 +329,7 @@ devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
322 329
323/** 330/**
324 * devm_reset_control_get_shared_by_index - resource managed 331 * devm_reset_control_get_shared_by_index - resource managed
325 * reset_control_get_shared 332 * reset_control_get_shared
326 * @dev: device to be reset by the controller 333 * @dev: device to be reset by the controller
327 * @index: index of the reset controller 334 * @index: index of the reset controller
328 * 335 *