Merge branch 'ib-gpiod-flags' into devel
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 26 Jan 2017 09:00:31 +0000 (10:00 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 26 Jan 2017 09:00:31 +0000 (10:00 +0100)
1  2 
drivers/gpio/devres.c
drivers/gpio/gpiolib.c

@@@ -135,8 -137,11 +139,10 @@@ EXPORT_SYMBOL(devm_gpiod_get_index)
   */
  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)
  {
 -      static const char * const suffixes[] = { "gpios", "gpio" };
        char prop_name[32]; /* 32 is max size of property name */
        struct gpio_desc **dr;
        struct gpio_desc *desc;
        if (!dr)
                return ERR_PTR(-ENOMEM);
  
 -      for (i = 0; i < ARRAY_SIZE(suffixes); i++) {
 +      for (i = 0; i < ARRAY_SIZE(gpio_suffixes); i++) {
                if (con_id)
                        snprintf(prop_name, sizeof(prop_name), "%s-%s",
 -                                          con_id, suffixes[i]);
 +                                          con_id, gpio_suffixes[i]);
                else
                        snprintf(prop_name, sizeof(prop_name), "%s",
 -                                                             suffixes[i]);
 +                                          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;
        }
Simple merge