gpio.h 814 B

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