aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/sandbox.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-15 09:59:47 -0400
committerTom Rini <trini@konsulko.com>2022-09-15 09:59:47 -0400
commitd9e85eeebabd5fc0c95be96bd70fa7362eb89f33 (patch)
treef3f4c2a9d5d19e8b548ce6ed98fbd5610d30bdd7 /drivers/gpio/sandbox.c
parent1520af3f8450bb58168fe1cc827a56d435e9f74c (diff)
parent0cd933bb4bd74084d942c42098ebf9e07d9e0f63 (diff)
Merge branch '2022-09-15-general-improvements' into next
- Add uncompressed kernel image support to falcon mode, TEE improvements, make xyz-modem timeout configurable, gpio updates and other assorted improvements.
Diffstat (limited to 'drivers/gpio/sandbox.c')
-rw-r--r--drivers/gpio/sandbox.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 106b2a7b27..305f9a6ff6 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -196,6 +196,8 @@ static int sb_gpio_get_function(struct udevice *dev, unsigned offset)
return GPIOF_OUTPUT;
if (get_gpio_flag(dev, offset, GPIOD_IS_IN))
return GPIOF_INPUT;
+ if (get_gpio_flag(dev, offset, GPIOD_IS_AF))
+ return GPIOF_FUNC;
return GPIOF_INPUT; /*GPIO is not configurated */
}
@@ -219,6 +221,9 @@ static int sb_gpio_xlate(struct udevice *dev, struct gpio_desc *desc,
if (args->args[1] & GPIO_OUT_ACTIVE)
desc->flags |= GPIOD_IS_OUT_ACTIVE;
+ if (args->args[1] & GPIO_AF)
+ desc->flags |= GPIOD_IS_AF;
+
return 0;
}