mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 03:11:46 +00:00
8f3c4537bb
Rather than marking the mach/gpio.h header files which want to use the trivial GPIOLIB implementation, mark those which do not want to use it instead. This means that by default, you get the trivial implementation and only have to do something extra if you need to. This should encourage the use of the trivial default implementation. As an additional bonus, several gpio.h header files become empty. Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Tested-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
27 lines
698 B
C
27 lines
698 B
C
#ifndef _ARCH_ARM_GPIO_H
|
|
#define _ARCH_ARM_GPIO_H
|
|
|
|
/* not all ARM platforms necessarily support this API ... */
|
|
#include <mach/gpio.h>
|
|
|
|
#ifndef __ARM_GPIOLIB_COMPLEX
|
|
/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
|
|
#include <asm-generic/gpio.h>
|
|
|
|
/* The trivial gpiolib dispatchers */
|
|
#define gpio_get_value __gpio_get_value
|
|
#define gpio_set_value __gpio_set_value
|
|
#define gpio_cansleep __gpio_cansleep
|
|
#endif
|
|
|
|
/*
|
|
* Provide a default gpio_to_irq() which should satisfy every case.
|
|
* However, some platforms want to do this differently, so allow them
|
|
* to override it.
|
|
*/
|
|
#ifndef gpio_to_irq
|
|
#define gpio_to_irq __gpio_to_irq
|
|
#endif
|
|
|
|
#endif /* _ARCH_ARM_GPIO_H */
|