gpio.h 791 B

123456789101112131415161718192021222324252627
  1. /*
  2. * include/asm-arm/arch-orion/gpio.h
  3. *
  4. * This file is licensed under the terms of the GNU General Public
  5. * License version 2. This program is licensed "as is" without any
  6. * warranty of any kind, whether express or implied.
  7. */
  8. extern int gpio_request(unsigned pin, const char *label);
  9. extern void gpio_free(unsigned pin);
  10. extern int gpio_direction_input(unsigned pin);
  11. extern int gpio_direction_output(unsigned pin, int value);
  12. extern int gpio_get_value(unsigned pin);
  13. extern void gpio_set_value(unsigned pin, int value);
  14. extern void gpio_display(void); /* debug */
  15. static inline int gpio_to_irq(int pin)
  16. {
  17. return pin + IRQ_ORION_GPIO_START;
  18. }
  19. static inline int irq_to_gpio(int irq)
  20. {
  21. return irq - IRQ_ORION_GPIO_START;
  22. }
  23. #include <asm-generic/gpio.h> /* cansleep wrappers */