Merge remote-tracking branch 'spi/fix/atmel' into spi-linus
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / include / asm / gpio.h
CommitLineData
4c20386c
DB
1#ifndef _ARCH_ARM_GPIO_H
2#define _ARCH_ARM_GPIO_H
3
44986ab0 4#if CONFIG_ARCH_NR_GPIO > 0
ca95023e 5#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
44986ab0
PDSN
6#endif
7
4c20386c 8/* not all ARM platforms necessarily support this API ... */
01464226 9#ifdef CONFIG_NEED_MACH_GPIO_H
a09e64fb 10#include <mach/gpio.h>
01464226 11#endif
4c20386c 12
8f3c4537 13#ifndef __ARM_GPIOLIB_COMPLEX
22fe6783
RK
14/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
15#include <asm-generic/gpio.h>
16
17/* The trivial gpiolib dispatchers */
18#define gpio_get_value __gpio_get_value
19#define gpio_set_value __gpio_set_value
20#define gpio_cansleep __gpio_cansleep
21#endif
22
01e7dc89
RK
23/*
24 * Provide a default gpio_to_irq() which should satisfy every case.
25 * However, some platforms want to do this differently, so allow them
26 * to override it.
27 */
28#ifndef gpio_to_irq
29#define gpio_to_irq __gpio_to_irq
30#endif
31
4c20386c 32#endif /* _ARCH_ARM_GPIO_H */