mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
gpio: mvebu_gpio: Add .request and .rfree methods for Armada 38x
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 <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
a1de1035b2
commit
7d8bb89d56
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <dm/pinctrl.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <asm/io.h>
|
||||
#include <errno.h>
|
||||
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue