* [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs
@ 2011-10-26 7:51 Mark Brown
2011-10-27 4:19 ` Greg Ungerer
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-10-26 7:51 UTC (permalink / raw)
To: Geert Uytterhoeven, Lucas De Marchi; +Cc: linux-m68k, linux-kernel, Mark Brown
gpiolib provides __gpio_to_irq() to map gpiolib gpios to interrupts - hook
that up on m68k.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/m68k/include/asm/gpio.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h
index b204683..00d0071 100644
--- a/arch/m68k/include/asm/gpio.h
+++ b/arch/m68k/include/asm/gpio.h
@@ -225,7 +225,8 @@ static inline void gpio_set_value(unsigned gpio, int value)
static inline int gpio_to_irq(unsigned gpio)
{
- return (gpio < MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE : -EINVAL;
+ return (gpio < MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE
+ : __gpio_to_irq(gpio);
}
static inline int irq_to_gpio(unsigned irq)
--
1.7.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs
2011-10-26 7:51 [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs Mark Brown
@ 2011-10-27 4:19 ` Greg Ungerer
0 siblings, 0 replies; 2+ messages in thread
From: Greg Ungerer @ 2011-10-27 4:19 UTC (permalink / raw)
To: Mark Brown; +Cc: Geert Uytterhoeven, Lucas De Marchi, linux-m68k, linux-kernel
Hi Mark,
On 26/10/11 17:51, Mark Brown wrote:
> gpiolib provides __gpio_to_irq() to map gpiolib gpios to interrupts - hook
> that up on m68k.
>
> Signed-off-by: Mark Brown<broonie@opensource.wolfsonmicro.com>
I'll take this through the m68knommu git tree, since it is only used
by the ColdFire CPU parts.
Thanks
Greg
> arch/m68k/include/asm/gpio.h | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h
> index b204683..00d0071 100644
> --- a/arch/m68k/include/asm/gpio.h
> +++ b/arch/m68k/include/asm/gpio.h
> @@ -225,7 +225,8 @@ static inline void gpio_set_value(unsigned gpio, int value)
>
> static inline int gpio_to_irq(unsigned gpio)
> {
> - return (gpio< MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE : -EINVAL;
> + return (gpio< MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE
> + : __gpio_to_irq(gpio);
> }
>
> static inline int irq_to_gpio(unsigned irq)
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-27 4:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 7:51 [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs Mark Brown
2011-10-27 4:19 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).