Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01e7dc89 authored by Russell King's avatar Russell King
Browse files

ARM: gpio: consolidate gpio_to_irq



Many of the gpio_to_irq implementations use the gpiolib version of this
function.  Provide the standard gpiolib gpio_to_irq() for everyone, but
allow platforms to override it if they wish.  Add the neccessary
overrides for those platforms which do not use the standard definition.

Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 22fe6783
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -14,4 +14,13 @@
#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 */
+0 −5
Original line number Diff line number Diff line
@@ -147,11 +147,6 @@ static inline int gpio_cansleep(unsigned gpio)
		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 */
+0 −2
Original line number Diff line number Diff line
@@ -13,8 +13,6 @@
#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 */
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ static inline void gpio_set_value(unsigned gpio, int value)
#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
+0 −2
Original line number Diff line number Diff line
@@ -40,8 +40,6 @@ extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
 */
extern int irq_to_gpio(unsigned int irq);

#define gpio_to_irq __gpio_to_irq

#define __ARM_GPIOLIB_TRIVIAL

/* Register the GPIOs */
Loading