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 10/12] gpio: pxa: add irq base in platform data
Date: Fri, 22 Feb 2013 09:34:11 +0800	[thread overview]
Message-ID: <CAD6h2NSoUeEmPujuFZcnET7RAaQK9sE6HK1pROfrHnmSNfS65Q@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdbgJdmcTm86UTWsMw2yPv005=1c8AmAxfmDSrEoSWk-bg@mail.gmail.com>

On 22 February 2013 03:12, Linus Walleij <linus.walleij@linaro.org> wrote:
> 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

Yes, thank you. Let me clean the irq usage after this patch series.

Regards
Haojian

  reply	other threads:[~2013-02-22  1:34 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 [this message]
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=CAD6h2NSoUeEmPujuFZcnET7RAaQK9sE6HK1pROfrHnmSNfS65Q@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.