X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=include%2Flinux%2Freset.h;h=8a21b5756c3efba8e1b788cdc5e9ff65e774d341;hb=f6f02040e0ca7cb2e82d8aeb8f7daf5d89acc04c;hp=db0e6115a2f6ad639fd5f73d912e64c0e3a036a7;hpb=8f4ef88ebadefcf16b7f616f8af940465c44bea2;p=linux-2.6-microblaze.git diff --git a/include/linux/reset.h b/include/linux/reset.h index db0e6115a2f6..8a21b5756c3e 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -454,6 +454,26 @@ static inline struct reset_control *of_reset_control_get_exclusive( return __of_reset_control_get(node, id, 0, false, false, true); } +/** + * of_reset_control_get_optional_exclusive - Lookup and obtain an optional exclusive + * reference to a reset controller. + * @node: device to be reset by the controller + * @id: reset line name + * + * Optional variant of of_reset_control_get_exclusive(). If the requested reset + * is not specified in the device tree, this function returns NULL instead of + * an error. + * + * Returns a struct reset_control or IS_ERR() condition containing errno. + * + * Use of id names is optional. + */ +static inline struct reset_control *of_reset_control_get_optional_exclusive( + struct device_node *node, const char *id) +{ + return __of_reset_control_get(node, id, 0, false, true, true); +} + /** * of_reset_control_get_shared - Lookup and obtain a shared reference * to a reset controller.