Skip to content

Commit ac68ebb

Browse files
committed
of_reset_control_get_exclusive helper
Signed-off-by: Olliver Schinagl <[email protected]>
1 parent 14d6182 commit ac68ebb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

include/linux/reset.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,23 @@ static inline struct reset_control *of_reset_control_get_exclusive(
188188
return __of_reset_control_get(node, id, 0, false, false);
189189
}
190190

191+
/**
192+
* of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
193+
* to an optional reset controller.
194+
* @node: device to be reset by the controller
195+
* @id: reset line name
196+
*
197+
* Returns a struct reset_control, NULL when not found or IS_ERR() condition
198+
* containing errno.
199+
*
200+
* Use of id names is optional.
201+
*/
202+
static inline struct reset_control *of_reset_control_get_optional_exclusive(
203+
struct device_node *node, const char *id)
204+
{
205+
return __of_reset_control_get(node, id, 0, false, true);
206+
}
207+
191208
/**
192209
* of_reset_control_get_shared - Lookup and obtain an shared reference
193210
* to a reset controller.

0 commit comments

Comments
 (0)