]> git.baikalelectronics.ru Git - uboot.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)
commitf5e5b82f4e1fc177786067d05441cb692044a812
tree389ed8fcd0289e2bbc85b36d0870e9084c0d7074
parent16753c984b1534889a3e197b2f0de0596dba27a4
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