gpio.h 640 B

123456789101112131415161718192021
  1. #ifndef __ASM_MACH_GENERIC_GPIO_H
  2. #define __ASM_MACH_GENERIC_GPIO_H
  3. #ifdef CONFIG_GPIOLIB
  4. #define gpio_get_value __gpio_get_value
  5. #define gpio_set_value __gpio_set_value
  6. #define gpio_cansleep __gpio_cansleep
  7. #else
  8. int gpio_request(unsigned gpio, const char *label);
  9. void gpio_free(unsigned gpio);
  10. int gpio_direction_input(unsigned gpio);
  11. int gpio_direction_output(unsigned gpio, int value);
  12. int gpio_get_value(unsigned gpio);
  13. void gpio_set_value(unsigned gpio, int value);
  14. #endif
  15. int gpio_to_irq(unsigned gpio);
  16. int irq_to_gpio(unsigned irq);
  17. #include <asm-generic/gpio.h> /* cansleep wrappers */
  18. #endif /* __ASM_MACH_GENERIC_GPIO_H */