gpio.h 933 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * arch/arm/plat-orion/include/plat/gpio.h
  3. *
  4. * Marvell Orion SoC GPIO handling.
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __PLAT_GPIO_H
  11. #define __PLAT_GPIO_H
  12. /*
  13. * GENERIC_GPIO primitives.
  14. */
  15. #define gpio_get_value __gpio_get_value
  16. #define gpio_set_value __gpio_set_value
  17. #define gpio_cansleep __gpio_cansleep
  18. /*
  19. * Orion-specific GPIO API extensions.
  20. */
  21. void orion_gpio_set_unused(unsigned pin);
  22. void orion_gpio_set_blink(unsigned pin, int blink);
  23. #define GPIO_INPUT_OK (1 << 0)
  24. #define GPIO_OUTPUT_OK (1 << 1)
  25. void orion_gpio_set_valid(unsigned pin, int mode);
  26. /* Initialize gpiolib. */
  27. void __init orion_gpio_init(void);
  28. /*
  29. * GPIO interrupt handling.
  30. */
  31. extern struct irq_chip orion_gpio_irq_chip;
  32. void orion_gpio_irq_handler(int irqoff);
  33. #endif