From: hkallweit1@gmail.com (Heiner Kallweit)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 1/5] pintrl: meson: add interrupts to pinctrl data
Date: Fri, 12 May 2017 19:23:52 +0200 [thread overview]
Message-ID: <b2db3015-2816-1489-547d-e3f9c6f3ed3a@gmail.com> (raw)
In-Reply-To: <CACRpkdajRQNTEYntY+NuG+3vNenzN9ZOw3ukWtS-=5zgDh5wCA@mail.gmail.com>
Am 12.05.2017 um 11:51 schrieb Linus Walleij:
> On Fri, May 12, 2017 at 8:08 AM, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
>> Following Jerome's suggestion I prepared a version making the irq multiplexer
>> an own device. Nice here is that with this approach basically only one line of
>> code needs to be changed in the existing pinctrl driver.
>>
>> As discussion basis I add it here w/o submitting a v2 of patch 5.
>
> I think this is the right way to go, but would ideally like some feedback from
> the irqchip maintainers.
>
> Have you looked at drivers/irqchip/irq-crossbar.c for inspiration?
> Also read
> Documentation/devicetree/bindings/arm/omap/crossbar.txt
>
> It uses an hierarchical domain for a similar cross-connection
> usecase.
>
When looking at the crassbar driver it seems to be quite similar to Jerome's
Meson GPIO IRQ driver version. Therefore I think we'd face the same challenges.
What is special about the Meson GPIO IRQ hw:
- We have only 8 parent IRQs for 100+ GPIO's.
- If a GPIO requests IRQ_TYPE_EDGE_BOTH (concrete example: mmc sd detection)
then we have to use two parent IRQs, one for each edge.
- We must be able to dynamically map a GPIO to a parent IRQ, e.g. if a driver
uses gpiod_to_irq().
These specifics are the reason why I do the mapping magic in the irq_set_type
callback of the irq_chip. Only in this callback I have all the info needed to
do the mapping.
> Under any circumstances I think decoupling the IRQ multiplexer
> and dealing with it in separate is easier for maintainance and
> also for the irq maintainers to review.
>
Then I'll submit the latest version with the separated device as v2 and we'll
see which further review comments and suggestions for alternative approaches
come in.
Rgds, Heiner
> Yours,
> Linus Walleij
>
next prev parent reply other threads:[~2017-05-12 17:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 16:19 [PATCH 0/5 RfC] pintrl: meson: add support for GPIO IRQs Heiner Kallweit
2017-05-07 16:34 ` [PATCH 1/5] pintrl: meson: add interrupts to pinctrl data Heiner Kallweit
2017-05-11 14:50 ` Linus Walleij
2017-05-11 16:08 ` Jerome Brunet
2017-05-11 19:33 ` Heiner Kallweit
2017-05-12 6:08 ` Heiner Kallweit
2017-05-12 9:51 ` Linus Walleij
2017-05-12 17:23 ` Heiner Kallweit [this message]
2017-05-07 16:34 ` [PATCH 2/5] pintrl: meson: document GPIO IRQ DT binding Heiner Kallweit
2017-05-12 19:38 ` Rob Herring
2017-05-12 21:41 ` Heiner Kallweit
2017-05-16 0:31 ` Rob Herring
2017-05-07 16:34 ` [PATCH 3/5] pintrl: meson: add DT node for GPIO IRQ on Meson GX Heiner Kallweit
2017-05-07 16:34 ` [PATCH 4/5] pintrl: meson: add DT node for GPIO IRQ on Meson 8 / 8b Heiner Kallweit
2017-05-07 16:34 ` [PATCH 5/5] pintrl: meson: add support for GPIO interrupts Heiner Kallweit
2017-05-11 15:10 ` Linus Walleij
2017-05-11 14:34 ` [PATCH 0/5 RfC] pintrl: meson: add support for GPIO IRQs Linus Walleij
2017-05-11 20:52 ` Martin Blumenstingl
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=b2db3015-2816-1489-547d-e3f9c6f3ed3a@gmail.com \
--to=hkallweit1@gmail.com \
--cc=linus-amlogic@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
all inboxes | Powered by JetHome®