From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 10/12] gpio: pxa: add irq base in platform data
Date: Thu, 21 Feb 2013 20:12:30 +0100 [thread overview]
Message-ID: <CACRpkdbgJdmcTm86UTWsMw2yPv005=1c8AmAxfmDSrEoSWk-bg@mail.gmail.com> (raw)
In-Reply-To: <1361164358-5845-11-git-send-email-haojian.zhuang@linaro.org>
On Mon, Feb 18, 2013 at 6:12 AM, Haojian Zhuang
<haojian.zhuang@linaro.org> wrote:
> Macro PXA_GPIO_TO_IRQ() & MMP_GPIO_TO_IRQ() is used in machine driver
> without DT. Although we're allocating irq descriptions dynamically,
> it may break machine drivers without DT. Append pdata->irq_base.
> If irq_base is valid, allocate irq descriptions from irq_base.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
(...)
> - chips[i].irq_base = irq_alloc_descs(-1, 0, gc->ngpio, 0);
> + if (pdata->irq_base)
> + irq_base = pdata->irq_base + gpio;
> + else
> + irq_base = -1;
> + chips[i].irq_base = irq_alloc_descs(irq_base, 0, gc->ngpio, 0);
> if (chips[i].irq_base < 0)
> return -EINVAL;
> if (!irq_domain_add_legacy(pdev->dev.of_node, gc->ngpio,
In this case, when you want to pass a base IRQ, use
irq_domain_add_simple().
The descriptor allocation will still be unnecessary.
Yours,
Linus Walleij
next prev parent reply other threads:[~2013-02-21 19:12 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 [this message]
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
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='CACRpkdbgJdmcTm86UTWsMw2yPv005=1c8AmAxfmDSrEoSWk-bg@mail.gmail.com' \
--to=linus.walleij@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 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).