From 48609d0789f811014b33e6eefc2c27c99be7fea7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 7 Aug 2021 07:24:12 -0600 Subject: dm: gpio: Add of-platdata support Add support for accessing GPIOs using of-plata. This uses the same mechanism as for clocks, but allows use of the xlate() method so that the driver can interpret the parameters. Update the condition for GPIO_HOG so that it is not built into SPL, since it needs SPL_OF_REAL which is not enabled in sandbox_spl. Signed-off-by: Simon Glass --- include/asm-generic/gpio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index e33cde7abdd..6de13d925eb 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -608,6 +608,11 @@ int gpio_request_list_by_name(struct udevice *dev, const char *list_name, */ int dm_gpio_request(struct gpio_desc *desc, const char *label); +struct phandle_2_arg; +int gpio_request_by_phandle(struct udevice *dev, + const struct phandle_2_arg *cells, + struct gpio_desc *desc, int flags); + /** * gpio_get_list_count() - Returns the number of GPIOs in a list * -- cgit v1.2.3