All of lore.kernel.org
 help / color / mirror / Atom feed
From: haojian.zhuang@linaro.org (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 11/12] gpio: pxa: discard irq base in pxa_gpio_chip
Date: Mon, 18 Feb 2013 20:10:10 +0800	[thread overview]
Message-ID: <CAD6h2NT+Qq-uD9ctXWj9LK0pZFb6NsoA0-ZT611DthhMYy4NKg@mail.gmail.com> (raw)
In-Reply-To: <5121FDFC.2010107@compulab.co.il>

On 18 February 2013 18:10, Igor Grinberg <grinberg@compulab.co.il> wrote:
> On 02/18/13 07:12, Haojian Zhuang wrote:
>> Discard irq_base in struct pxa_gpio_chip. Use irq_domain instead.
>>
>> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
>> ---
>>  drivers/gpio/gpio-pxa.c |   91 +++++++++++++++++++++++------------------------
>>  1 file changed, 44 insertions(+), 47 deletions(-)
>
> [...]
>
>>
>> diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
>> index 35cdb23..d45cb57 100644
>> --- a/drivers/gpio/gpio-pxa.c
>> +++ b/drivers/gpio/gpio-pxa.c
>> @@ -66,8 +66,8 @@ int pxa_last_gpio;
>>
>>  struct pxa_gpio_chip {
>>       struct gpio_chip chip;
>> +     struct irq_domain *domain;
>>       void __iomem    *regbase;
>> -     unsigned int    irq_base;
>>       bool            inverted;
>>       bool            gafr;
>>       char label[10];
>> @@ -147,17 +147,7 @@ static int pxa_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
>>       struct pxa_gpio_chip *chip = NULL;
>>
>>       chip = container_of(gc, struct pxa_gpio_chip, chip);
>> -     return chip->irq_base + offset;
>> -}
>> -
>> -int pxa_irq_to_gpio(struct irq_data *d)
>> -{
>> -     struct pxa_gpio_chip *chip;
>> -     int gpio;
>> -
>> -     chip = (struct pxa_gpio_chip *)d->domain->host_data;
>> -     gpio = d->irq - chip->irq_base + chip->chip.base;
>> -     return gpio;
>> +     return irq_create_mapping(chip->domain, offset);
>>  }
>
> You remove the pxa_irq_to_gpio() function here, but we still have:
> $ grep -nr pxa_irq_to_gpio *
> arch/arm/mach-pxa/pxa27x.c:368: int gpio = pxa_irq_to_gpio(d);
> arch/arm/mach-pxa/pxa25x.c:292: int gpio = pxa_irq_to_gpio(d);
> include/linux/gpio-pxa.h:16:extern int pxa_irq_to_gpio(struct irq_data *d);
>
> And this in turn breaks the compilation for example with error:
> arch/arm/mach-pxa/built-in.o: In function `pxa27x_set_wake':
> em-x270.c:(.text+0x1298): undefined reference to `pxa_irq_to_gpio'
> make[1]: *** [vmlinux] Error 1
> make: *** [sub-make] Error 2
>
>
> --
> Regards,
> Igor.

Thank you.

Please drop this patch (11/12) for your test. Whatever it's DT or non-DT mode,
gpio driver should work without this patch.

Regards
Haojian

  reply	other threads:[~2013-02-18 12:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18  5:12 [PATCH v3 00/12] enhance DT support on gpio pxa Haojian Zhuang
2013-02-18  5:12 ` [PATCH v3 01/12] gpio: pxa: identify ed mask reg with platform data Haojian Zhuang
2013-02-21 18:37   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 02/12] gpio: pxa: avoid to use global irq base Haojian Zhuang
2013-02-21 18:50   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 03/12] gpio: pxa: use platform data for gpio inverted Haojian Zhuang
2013-02-21 18:56   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 04/12] gpio: pxa: remove gpio_type Haojian Zhuang
2013-02-21 18:58   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 05/12] gpio: pxa: define nr gpios in platform data Haojian Zhuang
2013-02-21 19:01   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 06/12] gpio: pxa: clean code for compatible name Haojian Zhuang
2013-02-21 19:03   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 07/12] gpio: pxa: remove arch related macro Haojian Zhuang
2013-02-21 19:05   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 08/12] gpio: pxa: move gpio properties into child node Haojian Zhuang
2013-02-21 19:09   ` Linus Walleij
2013-02-22  1:32     ` Haojian Zhuang
2013-02-18  5:12 ` [PATCH v3 09/12] gpio: pxa: bind to pinctrl by request Haojian Zhuang
2013-02-21 19:10   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 10/12] gpio: pxa: add irq base in platform data Haojian Zhuang
2013-02-21 19:12   ` Linus Walleij
2013-02-22  1:34     ` Haojian Zhuang
2013-02-18  5:12 ` [PATCH v3 11/12] gpio: pxa: discard irq base in pxa_gpio_chip Haojian Zhuang
2013-02-18 10:10   ` Igor Grinberg
2013-02-18 12:10     ` Haojian Zhuang [this message]
2013-02-18 13:39       ` Igor Grinberg
2013-02-18 14:49         ` Haojian Zhuang
2013-02-21 19:15   ` Linus Walleij
2013-02-18  5:12 ` [PATCH v3 12/12] ARM: dts: support pinmux in pxa910 Haojian Zhuang
2013-02-21 19:16   ` Linus Walleij
2013-02-22  1:35     ` 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=CAD6h2NT+Qq-uD9ctXWj9LK0pZFb6NsoA0-ZT611DthhMYy4NKg@mail.gmail.com \
    --to=haojian.zhuang@linaro.org \
    --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 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.