gpio.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * arch/arm/mach-ks8695/include/mach/gpio.h
  3. *
  4. * Copyright (C) 2006 Andrew Victor
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARCH_GPIO_H_
  11. #define __ASM_ARCH_GPIO_H_
  12. #include <linux/kernel.h>
  13. #define KS8695_GPIO_0 0
  14. #define KS8695_GPIO_1 1
  15. #define KS8695_GPIO_2 2
  16. #define KS8695_GPIO_3 3
  17. #define KS8695_GPIO_4 4
  18. #define KS8695_GPIO_5 5
  19. #define KS8695_GPIO_6 6
  20. #define KS8695_GPIO_7 7
  21. #define KS8695_GPIO_8 8
  22. #define KS8695_GPIO_9 9
  23. #define KS8695_GPIO_10 10
  24. #define KS8695_GPIO_11 11
  25. #define KS8695_GPIO_12 12
  26. #define KS8695_GPIO_13 13
  27. #define KS8695_GPIO_14 14
  28. #define KS8695_GPIO_15 15
  29. /*
  30. * Configure GPIO pin as external interrupt source.
  31. */
  32. extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
  33. /*
  34. * Map IRQ number to GPIO line.
  35. */
  36. extern int irq_to_gpio(unsigned int irq);
  37. #include <asm-generic/gpio.h>
  38. /* If it turns out that we need to optimise GPIO access for the
  39. * Micrel's GPIOs, then these can be changed to check their argument
  40. * directly as static inlines. However for now it's probably not
  41. * worthwhile.
  42. */
  43. #define gpio_get_value __gpio_get_value
  44. #define gpio_set_value __gpio_set_value
  45. #define gpio_to_irq __gpio_to_irq
  46. /* Register the GPIOs */
  47. extern void ks8695_register_gpios(void);
  48. #endif