Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v3.16 32 lines 814 B view raw
1#ifndef _ARCH_ARM_GPIO_H 2#define _ARCH_ARM_GPIO_H 3 4#if CONFIG_ARCH_NR_GPIO > 0 5#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO 6#endif 7 8/* not all ARM platforms necessarily support this API ... */ 9#ifdef CONFIG_NEED_MACH_GPIO_H 10#include <mach/gpio.h> 11#endif 12 13#ifndef __ARM_GPIOLIB_COMPLEX 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 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 32#endif /* _ARCH_ARM_GPIO_H */