gpio.h 766 B

123456789101112131415161718192021222324252627
  1. /*
  2. * This header provides constants for most GPIO bindings.
  3. *
  4. * Most GPIO bindings include a flags cell as part of the GPIO specifier.
  5. * In most cases, the format of the flags cell uses the standard values
  6. * defined in this header.
  7. */
  8. #ifndef _DT_BINDINGS_GPIO_GPIO_H
  9. #define _DT_BINDINGS_GPIO_GPIO_H
  10. /* Bit 0 express polarity */
  11. #define GPIO_ACTIVE_HIGH 0
  12. #define GPIO_ACTIVE_LOW 1
  13. /* Bit 1 express single-endedness */
  14. #define GPIO_PUSH_PULL 0
  15. #define GPIO_SINGLE_ENDED 2
  16. /*
  17. * Open Drain/Collector is the combination of single-ended active low,
  18. * Open Source/Emitter is the combination of single-ended active high.
  19. */
  20. #define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_ACTIVE_LOW)
  21. #define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_ACTIVE_HIGH)
  22. #endif