Skip to content

Commit 3498d86

Browse files
author
Linus Walleij
committed
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>
1 parent deab2b0 commit 3498d86

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎include/linux/gpio/consumer.h‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,16 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev,
143143
struct fwnode_handle *child,
144144
enum gpiod_flags flags,
145145
const char *label);
146+
/* FIXME: delete this helper when users are switched over */
147+
static 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+
146156
#else /* CONFIG_GPIOLIB */
147157

148158
static 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,
434444
return ERR_PTR(-ENOSYS);
435445
}
436446

447+
/* FIXME: delete this when all users are switched over */
448+
static 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+
437454
#endif /* CONFIG_GPIOLIB */
438455

439456
static inline

0 commit comments

Comments
 (0)