]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: Export gpiod_get_from_of_node()
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 6 Dec 2018 12:43:42 +0000 (13:43 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 11 Dec 2018 01:04:04 +0000 (01:04 +0000)
commit2a6b1913b99b0b894bbb390dea146ed2ad82020d
tree856ff4dd4f4b8cf119d6b39102135310726205fb
parentbf77eac5e7d8ef204201ef8ab629a741caece2e0
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 <linus.walleij@linaro.org>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/gpio/gpiolib.h
include/linux/gpio/consumer.h