1 /* $NetBSD: gpio.h,v 1.1.1.2.2.2 2017/08/28 17:53:02 skrll Exp $ */ 2 3 /* 4 * This header provides constants for most GPIO bindings. 5 * 6 * Most GPIO bindings include a flags cell as part of the GPIO specifier. 7 * In most cases, the format of the flags cell uses the standard values 8 * defined in this header. 9 */ 10 11 #ifndef _DT_BINDINGS_GPIO_GPIO_H 12 #define _DT_BINDINGS_GPIO_GPIO_H 13 14 /* Bit 0 express polarity */ 15 #define GPIO_ACTIVE_HIGH 0 16 #define GPIO_ACTIVE_LOW 1 17 18 /* Bit 1 express single-endedness */ 19 #define GPIO_PUSH_PULL 0 20 #define GPIO_SINGLE_ENDED 2 21 22 /* Bit 2 express Open drain or open source */ 23 #define GPIO_LINE_OPEN_SOURCE 0 24 #define GPIO_LINE_OPEN_DRAIN 4 25 26 /* 27 * Open Drain/Collector is the combination of single-ended open drain interface. 28 * Open Source/Emitter is the combination of single-ended open source interface. 29 */ 30 #define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN) 31 #define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE) 32 33 #endif 34