aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-02-21 08:19:45 -0500
committerLinus Walleij <linus.walleij@linaro.org>2017-02-21 08:19:45 -0500
commit3498d8694d41af701c51289e7caf3ffefc7bfb6b (patch)
tree44266e6d29dc0ef19c9f07c652677006390145eb
parentdeab2b0524aa1d7d081a1b17d283a76f11c45b1b (diff)
gpio: reintroduce devm_get_gpiod_from_child()
We need to keep this API around for the merge window to avoid nasty build problems in the merges. Cc: Lee Jones <lee.jones@linaro.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--include/linux/gpio/consumer.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index ea9b01d40017..2484b2fcc6eb 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -143,6 +143,16 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev,
143 struct fwnode_handle *child, 143 struct fwnode_handle *child,
144 enum gpiod_flags flags, 144 enum gpiod_flags flags,
145 const char *label); 145 const char *label);
146/* FIXME: delete this helper when users are switched over */
147static inline struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
148 const char *con_id, struct fwnode_handle *child)
149{
150 return devm_fwnode_get_index_gpiod_from_child(dev, con_id,
151 0, child,
152 GPIOD_ASIS,
153 "?");
154}
155
146#else /* CONFIG_GPIOLIB */ 156#else /* CONFIG_GPIOLIB */
147 157
148static inline int gpiod_count(struct device *dev, const char *con_id) 158static inline int gpiod_count(struct device *dev, const char *con_id)
@@ -434,6 +444,13 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev,
434 return ERR_PTR(-ENOSYS); 444 return ERR_PTR(-ENOSYS);
435} 445}
436 446
447/* FIXME: delete this when all users are switched over */
448static inline struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
449 const char *con_id, struct fwnode_handle *child)
450{
451 return ERR_PTR(-ENOSYS);
452}
453
437#endif /* CONFIG_GPIOLIB */ 454#endif /* CONFIG_GPIOLIB */
438 455
439static inline 456static inline