orion-gpio.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * arch/arm/plat-orion/include/plat/orion-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. #include <linux/irqdomain.h>
  15. /*
  16. * Orion-specific GPIO API extensions.
  17. */
  18. void orion_gpio_set_unused(unsigned pin);
  19. void orion_gpio_set_blink(unsigned pin, int blink);
  20. int orion_gpio_led_blink_set(unsigned gpio, int state,
  21. unsigned long *delay_on, unsigned long *delay_off);
  22. #define GPIO_INPUT_OK (1 << 0)
  23. #define GPIO_OUTPUT_OK (1 << 1)
  24. void orion_gpio_set_valid(unsigned pin, int mode);
  25. /* Initialize gpiolib. */
  26. void __init orion_gpio_init(struct device_node *np,
  27. int gpio_base, int ngpio,
  28. void __iomem *base, int mask_offset,
  29. int secondary_irq_base,
  30. int irq[4]);
  31. void __init orion_gpio_of_init(int irq_gpio_base);
  32. #endif