aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio/consumer.h
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2017-01-12 11:39:24 -0500
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 03:59:52 -0500
commitb2987d7438e0ca949d81774ca8b43d370a1f9947 (patch)
tree21fb2c0cfb36fed138bc1660e0de75cb017c9b13 /include/linux/gpio/consumer.h
parenta264d10ff45c688293d9112fddd8d29c819e0853 (diff)
gpio: Pass GPIO label down to gpiod_request
Currently all users of fwnode_get_named_gpiod() have no way to specify a label for the GPIO. So GPIOs listed in debugfs are shown with label "?". With this change a proper label is used. Also adjust all users so they can pass a label, properly retrieved from device tree properties. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio/consumer.h')
-rw-r--r--include/linux/gpio/consumer.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 930d10049d8d..80bad7ebde04 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -136,11 +136,13 @@ struct fwnode_handle;
136 136
137struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, 137struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode,
138 const char *propname, 138 const char *propname,
139 enum gpiod_flags dflags); 139 enum gpiod_flags dflags,
140 const char *label);
140struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, 141struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
141 const char *con_id, 142 const char *con_id,
142 struct fwnode_handle *child, 143 struct fwnode_handle *child,
143 enum gpiod_flags flags); 144 enum gpiod_flags flags,
145 const char *label);
144#else /* CONFIG_GPIOLIB */ 146#else /* CONFIG_GPIOLIB */
145 147
146static inline int gpiod_count(struct device *dev, const char *con_id) 148static inline int gpiod_count(struct device *dev, const char *con_id)
@@ -416,7 +418,8 @@ struct fwnode_handle;
416static inline 418static inline
417struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, 419struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode,
418 const char *propname, 420 const char *propname,
419 enum gpiod_flags dflags) 421 enum gpiod_flags dflags,
422 const char *label)
420{ 423{
421 return ERR_PTR(-ENOSYS); 424 return ERR_PTR(-ENOSYS);
422} 425}
@@ -425,7 +428,8 @@ static inline
425struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, 428struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
426 const char *con_id, 429 const char *con_id,
427 struct fwnode_handle *child, 430 struct fwnode_handle *child,
428 enum gpiod_flags flags) 431 enum gpiod_flags flags,
432 const char *label)
429{ 433{
430 return ERR_PTR(-ENOSYS); 434 return ERR_PTR(-ENOSYS);
431} 435}