aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorPatrice Chotard2022-08-30 14:09:14 +0200
committerTom Rini2022-09-15 09:55:30 -0400
commitf6f681642f0d730887bfe944b029cb6f76a35fb6 (patch)
tree0c2b7993902b2a1ade43b7dce4bcb00b12d8fd02 /include/asm-generic
parent2c38f7c31806c5724a2f9c58a47cf76979fd6f0a (diff)
gpio: sandbox: Add GPIOD_IS_AF for gpio configured in alternate function
This allows to test if a pin's label if displayed using gpio_get_status() when this pin is configured in alternate function. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/gpio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 81f63f06f15..0fcf70983fb 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -127,6 +127,7 @@ struct gpio_desc {
#define GPIOD_OPEN_SOURCE BIT(6) /* GPIO is open source type */
#define GPIOD_PULL_UP BIT(7) /* GPIO has pull-up enabled */
#define GPIOD_PULL_DOWN BIT(8) /* GPIO has pull-down enabled */
+#define GPIOD_IS_AF BIT(9) /* GPIO is an alternate function */
/* Flags for updating the above */
#define GPIOD_MASK_DIR (GPIOD_IS_OUT | GPIOD_IS_IN | \