All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs
Date: Thu, 27 Oct 2011 14:19:42 +1000	[thread overview]
Message-ID: <4EA8DBDE.9070405@snapgear.com> (raw)
In-Reply-To: <1319615515-3286-1-git-send-email-broonie@opensource.wolfsonmicro.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Greg Ungerer <gerg@snapgear.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	<linux-m68k@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs
Date: Thu, 27 Oct 2011 14:19:42 +1000	[thread overview]
Message-ID: <4EA8DBDE.9070405@snapgear.com> (raw)
In-Reply-To: <1319615515-3286-1-git-send-email-broonie@opensource.wolfsonmicro.com>

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

  reply	other threads:[~2011-10-27  4:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26  7:51 [PATCH] m68k: Fall back to __gpio_to_irq() for non-arch GPIOs Mark Brown
2011-10-26  7:51 ` Mark Brown
2011-10-27  4:19 ` Greg Ungerer [this message]
2011-10-27  4:19   ` Greg Ungerer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EA8DBDE.9070405@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=lucas.demarchi@profusion.mobi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.