orion-gpio.h 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. struct gpio_desc;
  16. /*
  17. * Orion-specific GPIO API extensions.
  18. */
  19. void orion_gpio_set_unused(unsigned pin);
  20. void orion_gpio_set_blink(unsigned pin, int blink);
  21. int orion_gpio_led_blink_set(struct gpio_desc *desc, int state,
  22. unsigned long *delay_on, unsigned long *delay_off);
  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(struct device_node *np,
  28. int gpio_base, int ngpio,
  29. void __iomem *base, int mask_offset,
  30. int secondary_irq_base,
  31. int irq[4]);
  32. #endif