gpio.h 698 B

1234567891011121314151617181920212223242526
  1. #ifndef _ARCH_ARM_GPIO_H
  2. #define _ARCH_ARM_GPIO_H
  3. /* not all ARM platforms necessarily support this API ... */
  4. #include <mach/gpio.h>
  5. #ifndef __ARM_GPIOLIB_COMPLEX
  6. /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
  7. #include <asm-generic/gpio.h>
  8. /* The trivial gpiolib dispatchers */
  9. #define gpio_get_value __gpio_get_value
  10. #define gpio_set_value __gpio_set_value
  11. #define gpio_cansleep __gpio_cansleep
  12. #endif
  13. /*
  14. * Provide a default gpio_to_irq() which should satisfy every case.
  15. * However, some platforms want to do this differently, so allow them
  16. * to override it.
  17. */
  18. #ifndef gpio_to_irq
  19. #define gpio_to_irq __gpio_to_irq
  20. #endif
  21. #endif /* _ARCH_ARM_GPIO_H */