gpio.h 859 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #include <linux/types.h>
  14. /*
  15. * Orion-specific GPIO API extensions.
  16. */
  17. void orion_gpio_set_unused(unsigned pin);
  18. void orion_gpio_set_blink(unsigned pin, int blink);
  19. #define GPIO_INPUT_OK (1 << 0)
  20. #define GPIO_OUTPUT_OK (1 << 1)
  21. void orion_gpio_set_valid(unsigned pin, int mode);
  22. /* Initialize gpiolib. */
  23. void __init orion_gpio_init(int gpio_base, int ngpio,
  24. u32 base, int mask_offset, int secondary_irq_base);
  25. /*
  26. * GPIO interrupt handling.
  27. */
  28. void orion_gpio_irq_handler(int irqoff);
  29. #endif