mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
gpio: Export gpiod_get_from_of_node()
This function already exist inside gpiolib, we were just reluctant to make it available to the kernel at large as the devm_* seemed to be enough for anyone. However we found out that regulators need to do their own lifecycle/refcounting on GPIO descriptors and explicitly call gpiod_put() when done with a descriptor, so export this function so we can hand the refcounting over to the regulator core for these descriptors after retrieveal. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Marek Szyprowski <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
894077d5c8
commit
fe6c473e3e
2 changed files with 13 additions and 6 deletions
|
|
@ -201,12 +201,6 @@ int gpiod_set_array_value_complex(bool raw, bool can_sleep,
|
|||
struct gpio_array *array_info,
|
||||
unsigned long *value_bitmap);
|
||||
|
||||
/* This is just passed between gpiolib and devres */
|
||||
struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
|
||||
const char *propname, int index,
|
||||
enum gpiod_flags dflags,
|
||||
const char *label);
|
||||
|
||||
extern struct spinlock gpio_lock;
|
||||
extern struct list_head gpio_devices;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue