summaryrefslogtreecommitdiff
path: root/drivers/gpio/devres.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-01-26 12:00:31 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 12:00:31 +0300
commit8c541b11483b099b8ce49211e766c6df77dce11b (patch)
tree3b784d41e19dbfe9429e430c94508caafb032590 /drivers/gpio/devres.c
parent49cec4d8326b27e64779f888c680466d7863558f (diff)
parentb2987d7438e0ca949d81774ca8b43d370a1f9947 (diff)
downloadlinux-8c541b11483b099b8ce49211e766c6df77dce11b.tar.xz
Merge branch 'ib-gpiod-flags' into devel
Diffstat (limited to 'drivers/gpio/devres.c')
-rw-r--r--drivers/gpio/devres.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
index 2c49a8bc9e3f..d196be7ac352 100644
--- a/drivers/gpio/devres.c
+++ b/drivers/gpio/devres.c
@@ -129,13 +129,19 @@ EXPORT_SYMBOL(devm_gpiod_get_index);
* @dev: GPIO consumer
* @con_id: function within the GPIO consumer
* @child: firmware node (child of @dev)
+ * @flags: GPIO initialization flags
*
* GPIO descriptors returned from this function are automatically disposed on
* driver detach.
+ *
+ * On successfull request the GPIO pin is configured in accordance with
+ * provided @flags.
*/
struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
const char *con_id,
- struct fwnode_handle *child)
+ struct fwnode_handle *child,
+ enum gpiod_flags flags,
+ const char *label)
{
char prop_name[32]; /* 32 is max size of property name */
struct gpio_desc **dr;
@@ -155,7 +161,7 @@ struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
snprintf(prop_name, sizeof(prop_name), "%s",
gpio_suffixes[i]);
- desc = fwnode_get_named_gpiod(child, prop_name);
+ desc = fwnode_get_named_gpiod(child, prop_name, flags, label);
if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
break;
}