linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 03/11] ARM: pxa: rename gpio_to_irq and irq_to_gpio
Date: Mon, 7 Nov 2011 08:49:31 +0000	[thread overview]
Message-ID: <20111107084931.GL12913@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAN1soZwTU6aJy2OP8Skj_pbLFXcWBEa7yyzrMpgcR+FfHAdx8Q@mail.gmail.com>

On Mon, Nov 07, 2011 at 03:14:36PM +0800, Haojian Zhuang wrote:
> On Thu, Oct 27, 2011 at 5:17 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Mon, Oct 17, 2011 at 09:35:09PM +0800, Haojian Zhuang wrote:
> >> diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h
> >> index 6812623..32b684a 100644
> >> --- a/arch/arm/mach-mmp/include/mach/gpio.h
> >> +++ b/arch/arm/mach-mmp/include/mach/gpio.h
> >> @@ -3,9 +3,6 @@
> >>
> >> ?#include <asm-generic/gpio.h>
> >>
> >> -#define gpio_to_irq(gpio) ? ?(IRQ_GPIO_START + (gpio))
> >> -#define irq_to_gpio(irq) ? ? ((irq) - IRQ_GPIO_START)
> >> -
> >
> > Doesn't this leave MMP without any definition for gpio_to_irq() ? ?This
> > is part of the gpiolib API and really should be implemented. ?If you're
> > not providing your own special version, it should be defined to
> > __gpio_to_irq() instead. ?(Same comment for PXA.)
> >
> Excuse me for response so late.
> 
> gpio_to_irq() was provided to share between arch-pxa and arch-mmp.
> Now it became the obstacle of building arch-pxa and arch-mmp together.
> 
> __gpio_to_irq() is defined in drivers/gpio/gpiolib.c. It makes use of
> gpio_chip->to_irq(). So I prefer to use __gpio_to_irq() as common interface.
> 
> Since some macro may use gpio_to_irq() in legacy pxa code, I define
> PXA_GPIO_TO_IRQ() and MMP_GPIO_TO_IRQ() to handle this.

__gpio_to_irq() is the gpiolib implementation.  gpio_to_irq() is the
interface which should be used to this function.

  reply	other threads:[~2011-11-07  8:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 13:35 [PATCH v5 00/11] change gpio as platform driver Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 01/11] ARM: pxa: rename IRQ_GPIO to PXA_GPIO_TO_IRQ Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 02/11] ARM: pxa: use chained interrupt for GPIO0 and GPIO1 Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 03/11] ARM: pxa: rename gpio_to_irq and irq_to_gpio Haojian Zhuang
2011-10-27  9:17   ` Russell King - ARM Linux
2011-11-07  7:14     ` Haojian Zhuang
2011-11-07  8:49       ` Russell King - ARM Linux [this message]
2011-10-17 13:35 ` [PATCH v5 04/11] ARM: pxa: recognize gpio number and type Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 05/11] ARM: pxa: rename NR_BUILTIN_GPIO Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 06/11] ARM: pxa: remove head file in plat-pxa Haojian Zhuang
2011-10-27  9:20   ` Russell King - ARM Linux
2011-10-17 13:35 ` [PATCH v5 07/11] ARM: pxa: use little endian read write in gpio driver Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 08/11] ARM: pxa: use generic gpio operation instead of gpio register Haojian Zhuang
2011-10-27  9:23   ` Russell King - ARM Linux
2011-10-17 13:35 ` [PATCH v5 09/11] ARM: pxa: change gpio to platform device Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 10/11] ARM: mmp: clear gpio edge detect Haojian Zhuang
2011-10-17 13:35 ` [PATCH v5 11/11] ARM: pxa: add clk support in gpio driver Haojian Zhuang
2011-10-27  9:25   ` Russell King - ARM Linux
2011-10-25  7:13 ` [PATCH v5 00/11] change gpio as platform driver Haojian Zhuang

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=20111107084931.GL12913@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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).