]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 2 Feb 2017 13:53:11 +0000 (14:53 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 4 Feb 2017 20:28:51 +0000 (21:28 +0100)
commit537b94dafce29af6a3e923d216472cfc2f3659af
tree358e78fe44033fb00490111fea7b873ef16ce0f5
parent4b0947974e593d52aace18ca5c7e2746fdebae60
gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper

devm_fwnode_get_gpiod_from_child() currently allows GPIO users to
request a GPIO that is defined in a child fwnode instead of directly in
the device fwnode.
Extend this API by adding the devm_fwnode_get_index_gpiod_from_child()
helper which does the same except you can also specify an index in case
the 'xx-gpios' property describe several GPIOs.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/devres.c
drivers/gpio/gpiolib.c
include/linux/gpio/consumer.h