From: Andreas Larsson <andreas@gaisler.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Anton Vorontsov <anton.vorontsov@linaro.org>,
linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, software@gaisler.com
Subject: Re: [PATCH v3] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic
Date: Fri, 08 Mar 2013 10:00:17 +0100 [thread overview]
Message-ID: <1362733217.26956.2.camel@andreas> (raw)
In-Reply-To: <CACRpkdaC9DsNj56_q33Z5N3_90Ffdq9qZeOxrFdrVSoL4wrTbQ@mail.gmail.com>
On Thu, 2013-03-07 at 04:44 +0100, Linus Walleij wrote:
> On Mon, Mar 4, 2013 at 10:46 AM, Andreas Larsson <andreas@gaisler.com> wrote:
> > [Me]
> >>> +struct grgpio_priv {
> >>> + struct bgpio_chip bgc;
> >>> + struct grgpio_regs __iomem *regs;
> >>> +
> >>> + u32 imask; /* irq mask shadow register */
> >>> + s32 *irqmap; /* maps offset to irq or -1 if no irq */
> >>
> >>
> >> irqmap? Argh what is this... I think you want to use irqdomain
> >> for this instead. (Documentation/IRQ-domain.txt)
> >
> >
> > Yeah, that comment is not clear. An entry in the irqmap array (for a gpio
> > line) can be either -1 indicating no irq for that line or an index into the
> > array of irq:s for the of device. Thus it is simply either -1 or a valid
> > second argument to irq_of_parse_and_map.
>
> So just make the mapping function in the irqdomain handle that?
>
> Maybe I'm talking weird, I'm not really familiar with
> irq_of_parse_and_map().
>
> > Given that this is generally running on SPARC, it seems irqdomain is not an
> > option (IRQ_DOMAIN is not selected by SPARC).
>
> That has nothing to do with this. This driver can just select IRQ_DOMAIN
> in *it's* Kconfig entry.
Oh, excellent! I'll look into an irqdomain solution then.
Thanks for the feedback!
Cheers,
Andreas Larsson
prev parent reply other threads:[~2013-03-08 9:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 7:24 [PATCH v3] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic Andreas Larsson
2013-02-13 7:05 ` Anton Vorontsov
2013-02-13 14:13 ` Andreas Larsson
[not found] ` <1360653873-25368-1-git-send-email-andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2013-03-01 0:24 ` Linus Walleij
[not found] ` <CACRpkdaYQSrzm_Yj3ZH9YZLC_zPJN06X-9ZM9jd7=X0OB1shXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-02 20:13 ` Grant Likely
2013-03-04 9:46 ` Andreas Larsson
2013-03-07 3:44 ` Linus Walleij
2013-03-08 9:00 ` Andreas Larsson [this message]
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=1362733217.26956.2.camel@andreas \
--to=andreas@gaisler.com \
--cc=anton.vorontsov@linaro.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=software@gaisler.com \
/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).