2013-02-13 08:22:36 +08:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
2015-09-25 06:05:45 +08:00
|
|
|
/* Bit 0 express polarity */
|
2013-02-13 08:22:36 +08:00
|
|
|
#define GPIO_ACTIVE_HIGH 0
|
|
|
|
#define GPIO_ACTIVE_LOW 1
|
|
|
|
|
2015-09-25 06:05:45 +08:00
|
|
|
/* Bit 1 express single-endedness */
|
|
|
|
#define GPIO_PUSH_PULL 0
|
|
|
|
#define GPIO_SINGLE_ENDED 2
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Open Drain/Collector is the combination of single-ended active low,
|
|
|
|
* Open Source/Emitter is the combination of single-ended active high.
|
|
|
|
*/
|
|
|
|
#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_ACTIVE_LOW)
|
|
|
|
#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_ACTIVE_HIGH)
|
|
|
|
|
2013-02-13 08:22:36 +08:00
|
|
|
#endif
|