/arch/arm/mach-ns9xxx/include/mach/gpio.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase · C++ Header · 47 lines · 20 code · 12 blank · 15 comment · 0 complexity · a08c376e636133c00a3b6ff09970426c MD5 · raw file

  1. /*
  2. * arch/arm/mach-ns9xxx/include/mach/gpio.h
  3. *
  4. * Copyright (C) 2007 by Digi International Inc.
  5. * All rights reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License version 2 as published by
  9. * the Free Software Foundation.
  10. */
  11. #ifndef __ASM_ARCH_GPIO_H
  12. #define __ASM_ARCH_GPIO_H
  13. #include <asm/errno.h>
  14. int gpio_request(unsigned gpio, const char *label);
  15. void gpio_free(unsigned gpio);
  16. int ns9xxx_gpio_configure(unsigned gpio, int inv, int func);
  17. int gpio_direction_input(unsigned gpio);
  18. int gpio_direction_output(unsigned gpio, int value);
  19. int gpio_get_value(unsigned gpio);
  20. void gpio_set_value(unsigned gpio, int value);
  21. /*
  22. * ns9xxx can use gpio pins to trigger an irq, but it's not generic
  23. * enough to be supported by the gpio_to_irq/irq_to_gpio interface
  24. */
  25. static inline int gpio_to_irq(unsigned gpio)
  26. {
  27. return -EINVAL;
  28. }
  29. static inline int irq_to_gpio(unsigned irq)
  30. {
  31. return -EINVAL;
  32. }
  33. /* get the cansleep() stubs */
  34. #include <asm-generic/gpio.h>
  35. #endif /* ifndef __ASM_ARCH_GPIO_H */