]> git.dujemihanovic.xyz Git - u-boot.git/commit
drivers: gpio: Add a managed API to get a GPIO from the device-tree
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 11 Sep 2020 08:13:34 +0000 (13:43 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 15:55:22 +0000 (11:55 -0400)
commitd4b722e3a85f3a5704501f3a71faa43db1979209
tree389ed8fcd0289e2bbc85b36d0870e9084c0d7074
parentbad2433151021315e04bcbb72c6c5bd2b938656b
drivers: gpio: Add a managed API to get a GPIO from the device-tree

Add managed functions to get a gpio from the devce-tree, based on a
property name (minus the '-gpios' suffix) and optionally an index.

When the device is unbound, the GPIO is automatically released and the
data structure is freed.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
drivers/gpio/gpio-uclass.c
include/asm-generic/gpio.h