gpio.h 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <linux/init.h>
  13. /*
  14. * GENERIC_GPIO primitives.
  15. */
  16. #define gpio_get_value __gpio_get_value
  17. #define gpio_set_value __gpio_set_value
  18. #define gpio_cansleep __gpio_cansleep
  19. /*
  20. * Orion-specific GPIO API extensions.
  21. */
  22. void orion_gpio_set_unused(unsigned pin);
  23. void orion_gpio_set_blink(unsigned pin, int blink);
  24. #define GPIO_INPUT_OK (1 << 0)
  25. #define GPIO_OUTPUT_OK (1 << 1)
  26. void orion_gpio_set_valid(unsigned pin, int mode);
  27. /* Initialize gpiolib. */
  28. void __init orion_gpio_init(void);
  29. /*
  30. * GPIO interrupt handling.
  31. */
  32. extern struct irq_chip orion_gpio_irq_chip;
  33. void orion_gpio_irq_handler(int irqoff);
  34. #endif