#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 */
return __gpio_cansleep(gpio);
}
-static inline int gpio_to_irq(unsigned gpio)
-{
- return __gpio_to_irq(gpio);
-}
-
static inline int irq_to_gpio(unsigned irq)
{
/* don't support the reverse mapping */
#ifndef __ASM_ARCH_GPIO_H
#define __ASM_ARCH_GPIO_H __FILE__
-#define gpio_to_irq __gpio_to_irq
-
/* Practically, GPIO banks up to GPZ are the configurable gpio banks */
/* GPIO bank sizes */
#include <asm-generic/gpio.h> /* cansleep wrappers */
extern int gpio_to_irq(int gpio);
+#define gpio_to_irq gpio_to_irq
extern int irq_to_gpio(unsigned int irq);
#endif
*/
extern int irq_to_gpio(unsigned int irq);
-#define gpio_to_irq __gpio_to_irq
-
#define __ARM_GPIOLIB_TRIVIAL
/* Register the GPIOs */
#define __ARM_GPIOLIB_TRIVIAL
-static inline int gpio_to_irq(unsigned gpio)
-{
- return __gpio_to_irq(gpio);
-}
-
#endif
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
-
#endif /* __ASM_ARCH_MSM_GPIO_H */
/* use gpiolib dispatchers */
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
*/
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
/* some boards require extra gpio capacity to support external
* devices that need GPIO.
*/
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
/* GPIO bank sizes */
#define S3C64XX_GPIO_A_NR (8)
#define __ASM_ARCH_GPIO_H __FILE__
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
/* GPIO bank sizes */
#define __ASM_ARCH_GPIO_H __FILE__
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
/* GPIO bank sizes */
#define S5PC100_GPIO_A0_NR (8)
#define __ASM_ARCH_GPIO_H __FILE__
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
/* Practically, GPIO banks up to MP03 are the configurable gpio banks */
#define __ARM_GPIOLIB_TRIVIAL
-static inline int gpio_to_irq(unsigned gpio)
-{
- return __gpio_to_irq(gpio);
-}
-
static inline int irq_to_gpio(unsigned int irq)
{
return -ENOSYS;
return INT_GPIO_BASE + gpio;
return -EINVAL;
}
+#define gpio_to_irq gpio_to_irq
static inline int irq_to_gpio(unsigned int irq)
{
{
return PIN_TO_PORT(gpio) + IRQ_U300_GPIO_PORT0;
}
+#define gpio_to_irq gpio_to_irq
static inline unsigned irq_to_gpio(unsigned irq)
{
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
{
return gpio;
}
+#define gpio_to_irq gpio_to_irq
static inline int irq_to_gpio(unsigned irq)
{
#include <linux/kernel.h>
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
/*
* "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
#define __ARM_GPIOLIB_TRIVIAL
-static inline int gpio_to_irq(unsigned gpio)
-{
- return __gpio_to_irq(gpio);
-}
-
static inline int irq_to_gpio(unsigned irq)
{
int tmp;
#define __ARM_GPIOLIB_TRIVIAL
/*
- * GENERIC_GPIO primitives.
- */
-#define gpio_to_irq __gpio_to_irq
-
-/*
* Orion-specific GPIO API extensions.
*/
void orion_gpio_set_unused(unsigned pin);
#define __PLAT_GPIO_H
#define __ARM_GPIOLIB_TRIVIAL
-#define gpio_to_irq __gpio_to_irq
#endif /* __PLAT_GPIO_H */