From: grinberg@compulab.co.il (Igor Grinberg)
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 12:10:04 +0200 [thread overview]
Message-ID: <5121FDFC.2010107@compulab.co.il> (raw)
In-Reply-To: <1361164358-5845-12-git-send-email-haojian.zhuang@linaro.org>
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.
next prev parent reply other threads:[~2013-02-18 10: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 [this message]
2013-02-18 12:10 ` Haojian Zhuang
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=5121FDFC.2010107@compulab.co.il \
--to=grinberg@compulab.co.il \
--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).