gpio.h 967 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. int orion_gpio_led_blink_set(unsigned gpio, int state,
  20. unsigned long *delay_on, unsigned long *delay_off);
  21. #define GPIO_INPUT_OK (1 << 0)
  22. #define GPIO_OUTPUT_OK (1 << 1)
  23. void orion_gpio_set_valid(unsigned pin, int mode);
  24. /* Initialize gpiolib. */
  25. void __init orion_gpio_init(int gpio_base, int ngpio,
  26. u32 base, int mask_offset, int secondary_irq_base);
  27. /*
  28. * GPIO interrupt handling.
  29. */
  30. void orion_gpio_irq_handler(int irqoff);
  31. #endif