linux/include/dt-bindings/gpio/gpio.h

/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
/*
 * This header provides constants for most GPIO bindings.
 *
 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
 * In most cases, the format of the flags cell uses the standard values
 * defined in this header.
 */

#ifndef _DT_BINDINGS_GPIO_GPIO_H
#define _DT_BINDINGS_GPIO_GPIO_H

/* Bit 0 express polarity */
#define GPIO_ACTIVE_HIGH
#define GPIO_ACTIVE_LOW

/* Bit 1 express single-endedness */
#define GPIO_PUSH_PULL
#define GPIO_SINGLE_ENDED

/* Bit 2 express Open drain or open source */
#define GPIO_LINE_OPEN_SOURCE
#define GPIO_LINE_OPEN_DRAIN

/*
 * Open Drain/Collector is the combination of single-ended open drain interface.
 * Open Source/Emitter is the combination of single-ended open source interface.
 */
#define GPIO_OPEN_DRAIN
#define GPIO_OPEN_SOURCE

/* Bit 3 express GPIO suspend/resume and reset persistence */
#define GPIO_PERSISTENT
#define GPIO_TRANSITORY

/* Bit 4 express pull up */
#define GPIO_PULL_UP

/* Bit 5 express pull down */
#define GPIO_PULL_DOWN

/* Bit 6 express pull disable */
#define GPIO_PULL_DISABLE

#endif