From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Jon Hunter <jon-hunter@ti.com>,
Stephen Warren <swarren@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Kevin Hilman <khilman@deeprootsystems.com>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
Grant Likely <grant.likely@secretlab.ca>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: omap: IORESOURCE_IRQ flags not set when defining a GPIO-IRQ from DT
Date: Fri, 1 Mar 2013 17:30:01 +0000 [thread overview]
Message-ID: <20130301173001.GC30923@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAAwP0s3ZzGf+_diZiQ7DSfWj74Sh=E9F+j=4UGnw8meHDR2AZQ@mail.gmail.com>
On Fri, Mar 01, 2013 at 05:17:57PM +0100, Javier Martinez Canillas wrote:
> >> unsigned long irq_flags = SMC_IRQ_FLAGS;
> >> ...
> >> if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK)
> >> irq_flags = ires->flags & IRQF_TRIGGER_MASK;
> >>
> >> while smsc911x driver's probe function uses the flags from the
> >> resource unconditionally:
> >>
> >> irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
> >>
> >> So, at the end both will set irq_flags to whatever is on the
> >> IORESOURCE_IRQ struct resource flags member.
> >
> > Actually, that's not the case for smc91x. By default SMC_IRQ_FLAGS != -1
> > (for omap) and so it will not set irq_flags to ires->flags &
> > IRQF_TRIGGER_MASK. However, if I force irq_flags to be -1, then I see
> > that irq_flags are to 0.
smc91x is complicated by the fact that it started off life before there
was any possibility to pass IRQ flags through resources. So we ended
up with smc91x.h containing _lots_ of platform specific data, and the
driver could only be built for one platform.
I fixed that by sorting out this IRQ passing method, and changing smc91x
to support both the fixed configuration, and the dynamic-through-IRQflags
method.
There is no reason for any other driver to support the fixed method; that
would be a completely backwards step.
next prev parent reply other threads:[~2013-03-01 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-01 16:17 omap: IORESOURCE_IRQ flags not set when defining a GPIO-IRQ from DT Javier Martinez Canillas
2013-03-01 17:30 ` Russell King - ARM Linux [this message]
2013-03-01 22:41 ` Jon Hunter
2013-03-02 0:00 ` Russell King - ARM Linux
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=20130301173001.GC30923@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=jon-hunter@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=martinez.javier@gmail.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.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).