Home | History | Annotate | Line # | Download | only in gpio
gpio.h revision 1.1.1.1
      1 /*	$NetBSD: gpio.h,v 1.1.1.1 2017/06/15 20:14:23 jmcneill 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 /*
     23  * Open Drain/Collector is the combination of single-ended active low,
     24  * Open Source/Emitter is the combination of single-ended active high.
     25  */
     26 #define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_ACTIVE_LOW)
     27 #define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_ACTIVE_HIGH)
     28 
     29 #endif
     30