aboutsummaryrefslogtreecommitdiff
path: root/include/dt-bindings/gpio/gpio.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-06-17 09:09:40 -0400
committerTom Rini <trini@konsulko.com>2018-06-17 09:09:40 -0400
commit103c45fb0daab924308046454b4aaad4a09237c4 (patch)
treedced5f70fb2e8dc9163f9884b518a4cf7c146441 /include/dt-bindings/gpio/gpio.h
parenta715415bb5948c84cc44c601b193188990f7238b (diff)
parent891bf67611e93df3f3a6c451d945a7810435ed13 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-sh
Diffstat (limited to 'include/dt-bindings/gpio/gpio.h')
-rw-r--r--include/dt-bindings/gpio/gpio.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/dt-bindings/gpio/gpio.h b/include/dt-bindings/gpio/gpio.h
index e6b1e0a808..2cc10ae4bb 100644
--- a/include/dt-bindings/gpio/gpio.h
+++ b/include/dt-bindings/gpio/gpio.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants for most GPIO bindings.
*
@@ -9,7 +10,27 @@
#ifndef _DT_BINDINGS_GPIO_GPIO_H
#define _DT_BINDINGS_GPIO_GPIO_H
+/* Bit 0 express polarity */
#define GPIO_ACTIVE_HIGH 0
#define GPIO_ACTIVE_LOW 1
+/* Bit 1 express single-endedness */
+#define GPIO_PUSH_PULL 0
+#define GPIO_SINGLE_ENDED 2
+
+/* Bit 2 express Open drain or open source */
+#define GPIO_LINE_OPEN_SOURCE 0
+#define GPIO_LINE_OPEN_DRAIN 4
+
+/*
+ * 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 (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
+#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
+
+/* Bit 3 express GPIO suspend/resume and reset persistence */
+#define GPIO_PERSISTENT 0
+#define GPIO_TRANSITORY 8
+
#endif