linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: How to create IRQ mappings in a GPIO driver that doesn't control its IRQ domain ?
Date: Thu, 25 Jul 2013 11:20:54 +0200	[thread overview]
Message-ID: <CACRpkdazPX3EbVbLvXQZh0oRBpHoWPK+EkFO75v9zfAXSPCkHA@mail.gmail.com> (raw)
In-Reply-To: <1624911.6TtmtVmU1T@avalon>

On Wed, Jul 24, 2013 at 1:21 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:

> Has anyone run into a similar issue ? My gut feeling is that the architecture
> isn't right somewhere, but I can't really pinpoint where.

We had a similar situation with the MFDs, where Mark, Lee and Sam
came up with the solution to include an irqdomain in the MFD cell
spawn function:

extern int mfd_add_devices(struct device *parent, int id,
                           struct mfd_cell *cells, int n_devs,
                           struct resource *mem_base,
                           int irq_base, struct irq_domain *irq_domain);

When each cell (i.e. a platform device) is created, the irq for that
cell will be translated with irq_create_mapping() so the cell/platform
device just get a Linux IRQ it can use and do not need to worry
about translating it.

Prior to this we had all sorts of exported translator functions
for the IRQs exported from each hub driver ---what a mess.

Can you think about a parent/child relationship making it possible
to pass the irqs readily translated in this case?

Yours,
Linus Walleij

  parent reply	other threads:[~2013-07-25  9:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 23:21 How to create IRQ mappings in a GPIO driver that doesn't control its IRQ domain ? Laurent Pinchart
2013-07-24 20:24 ` Grant Likely
2013-07-25  9:42   ` Laurent Pinchart
2013-07-25  9:20 ` Linus Walleij [this message]
2013-07-25  9:45   ` Laurent Pinchart
2013-07-25 13:15     ` Mark Brown
2013-07-25 13:21       ` Linus Walleij
2013-07-25 13:53         ` Mark Brown
2013-07-25 13:22       ` Laurent Pinchart
2013-07-25 13:55         ` Mark Brown
2013-07-28  5:00         ` Grant Likely
2013-07-31 11:14           ` Laurent Pinchart
2013-07-25 13:19     ` Linus Walleij
2013-07-28 10:07 ` Tomasz Figa
2013-07-31 11:11   ` Laurent Pinchart
2013-07-31 11:29     ` Tomasz Figa

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=CACRpkdazPX3EbVbLvXQZh0oRBpHoWPK+EkFO75v9zfAXSPCkHA@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).