u-boot/include/dt-bindings/gpio/sandbox-gpio.h
Patrice Chotard f6f681642f 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>
2022-09-15 09:55:30 -04:00

27 lines
615 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants for binding sandbox,gpio
*
*/
#ifndef _DT_BINDINGS_GPIO_SANDBOX_GPIO_H
#define _DT_BINDINGS_GPIO_SANDBOX_GPIO_H
/*
* Add a specific binding for sandbox gpio.
* The value need to be after the generic defines of
* dt-bindings/gpio/gpio.h
*/
/* Bit 16 express GPIO input mode */
#define GPIO_IN 0x10000
/* Bit 17 express GPIO output mode */
#define GPIO_OUT 0x20000
/* Bit 18 express GPIO output is active */
#define GPIO_OUT_ACTIVE 0x40000
/* Bit 19 express GPIO set as alternate function */
#define GPIO_AF 0x80000
#endif