From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/5] pinctrl: meson: enable GPIO IRQs
Date: Tue, 24 Nov 2015 08:28:01 +0000 [thread overview]
Message-ID: <20151124082801.09139a93@arm.com> (raw)
In-Reply-To: <1448273816-11290-4-git-send-email-carlo@caione.org>
On Mon, 23 Nov 2015 11:16:54 +0100
Carlo Caione <carlo@caione.org> wrote:
> From: Carlo Caione <carlo@endlessm.com>
>
> On Meson8 and Meson8b SoCs there are 8 independent filtered GPIO
> interrupt modules that can be programmed to use any of the GPIOs in the
> chip as an interrupt source.
>
> For each GPIO IRQ we have:
>
> GPIOs --> [mux]--> [polarity]--> [filter]--> [edge select]--> GIC
>
> The eight GPIO interrupts respond to mask/unmask/clear/etc.. just like
> any other interrupt in the chip. The difference for the GPIO interrupts
> is that they can be filtered and conditioned.
>
> This patch adds support for the external GPIOs interrupts and enables
> them for Meson8 and Meson8b SoCs.
>
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
>
> ---
[...]
> + for (i = 0; i < pc->num_gic_irqs; i++) {
> + struct of_phandle_args oirq;
> +
> + of_irq_parse_one(node, i, &oirq);
> + irq_of_phandle_args_to_fwspec(&oirq, &pc->gic_irqs[i]);
> +
> + pc->irq_map[i] = IRQ_FREE;
> + }
The whole thing feels weird. Why do you need to keep a set of fwspecs?
All you need is a range of interrupts that would be conveniently
represented by a bitmap (assuming your interrupts space is a mostly
contiguous range).
Overall, this patch is quite hard to review. Can you please split the
GPIO management from the irqchip side?
Thanks,
M.
--
Jazz is not dead. It just smells funny.
next prev parent reply other threads:[~2015-11-24 8:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 10:16 [PATCH v2 0/5] pinctrl: meson: enable support for external GPIO interrupts Carlo Caione
2015-11-23 10:16 ` [PATCH v2 1/5] of/irq: export of_irq_find_parent again Carlo Caione
2015-11-30 13:47 ` Linus Walleij
2015-11-23 10:16 ` [PATCH v2 2/5] irqdomain: introduce irq_of_phandle_args_to_fwspec Carlo Caione
2015-11-26 17:25 ` Marc Zyngier
2015-11-23 10:16 ` [PATCH v2 3/5] pinctrl: meson: enable GPIO IRQs Carlo Caione
2015-11-24 8:28 ` Marc Zyngier [this message]
2015-11-24 9:04 ` [linux-meson] " Carlo Caione
2015-11-26 16:09 ` Carlo Caione
2015-11-26 16:27 ` Marc Zyngier
2015-11-26 17:56 ` Carlo Caione
2015-11-23 10:16 ` [PATCH v2 4/5] pinctrl: dt-binding: Extend meson documentation with GPIO IRQs support Carlo Caione
2015-11-23 23:47 ` Rob Herring
2015-12-01 16:02 ` [linux-meson] " Carlo Caione
2015-11-23 10:16 ` [PATCH v2 5/5] ARM: meson: DTS: Enable GPIO IRQs Carlo Caione
2015-11-30 13:53 ` [PATCH v2 0/5] pinctrl: meson: enable support for external GPIO interrupts Linus Walleij
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=20151124082801.09139a93@arm.com \
--to=marc.zyngier@arm.com \
--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).