1262569Simp/*
2262569Simp * This header provides constants for most GPIO bindings.
3262569Simp *
4262569Simp * Most GPIO bindings include a flags cell as part of the GPIO specifier.
5262569Simp * In most cases, the format of the flags cell uses the standard values
6262569Simp * defined in this header.
7262569Simp */
8262569Simp
9262569Simp#ifndef _DT_BINDINGS_GPIO_GPIO_H
10262569Simp#define _DT_BINDINGS_GPIO_GPIO_H
11262569Simp
12295436Sandrew/* Bit 0 express polarity */
13262569Simp#define GPIO_ACTIVE_HIGH 0
14262569Simp#define GPIO_ACTIVE_LOW 1
15262569Simp
16295436Sandrew/* Bit 1 express single-endedness */
17295436Sandrew#define GPIO_PUSH_PULL 0
18295436Sandrew#define GPIO_SINGLE_ENDED 2
19295436Sandrew
20295436Sandrew/*
21295436Sandrew * Open Drain/Collector is the combination of single-ended active low,
22295436Sandrew * Open Source/Emitter is the combination of single-ended active high.
23295436Sandrew */
24295436Sandrew#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_ACTIVE_LOW)
25295436Sandrew#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_ACTIVE_HIGH)
26295436Sandrew
27262569Simp#endif
28