From 7d8bb89d569b18899011c44f8129a6b95a1424a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Mon, 25 Jul 2022 13:56:12 +0200 Subject: [PATCH] gpio: mvebu_gpio: Add .request and .rfree methods for Armada 38x MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To use particular pin GPIO, it needs to be first switched to GPIO by pinctrl. Use pinctrl_gpio_request() and pinctrl_gpio_free() for this purpose. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- drivers/gpio/mvebu_gpio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c index 4c1c68ee19..888ccfe4d1 100644 --- a/drivers/gpio/mvebu_gpio.c +++ b/drivers/gpio/mvebu_gpio.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -99,6 +100,10 @@ static int mvebu_gpio_probe(struct udevice *dev) } static const struct dm_gpio_ops mvebu_gpio_ops = { +#if CONFIG_IS_ENABLED(PINCTRL_ARMADA_38X) + .request = pinctrl_gpio_request, + .rfree = pinctrl_gpio_free, +#endif .direction_input = mvebu_gpio_direction_input, .direction_output = mvebu_gpio_direction_output, .get_function = mvebu_gpio_get_function, -- 2.39.5