From: wni@nvidia.com (Wei Ni)
To: linux-arm-kernel@lists.infradead.org
Subject: How to get the irq flags from the dts file
Date: Thu, 9 Aug 2012 18:43:26 +0800 [thread overview]
Message-ID: <1344509006.2295.148.camel@tegra-chromium-2> (raw)
Hi, all
I'm working on tegra wlan upstream issue.
The tegra board use the Broadcom 4329 as wlan device, and the driver is
the brcmfmac.
This wlan driver support out-band-interrupt (OOB), I want to add DT
support to use this OOB.
I can add following lines in the dts file to create platform device and
pass the interrupt resource to the driver.
wlan {
compatible = "broadcome, brcmf_sdio_pd";
interrupt-parten = <&gpio>;
interrupts = <144, 0x04>; /* IRQF_TRIGGER_HIGH */
};
In the wlan driver, it will use platform_get_resource() to get the
res->irq, res->flags, the irq number is right, but the flags will be
IORESOURCE_IRQ, not the 0x04 (IRQF_TRIGGER_HIGH).
The wlan driver wish this flags include the IRQF_TRGGER_* information,
and it will use this flags to configure other hw settings. If it is
wrong, the wlan can't work.
I checked drivers/of/irq.c, in function of_irq_to_resource(), it will
set r->flags = IORESOURCE_IRQ directly, not read the flags from the dtb
file. And I didn't find any of_xx api to get this flags.
How can I get this flags, does anyone has suggestion?
Thanks.
Wei.
next reply other threads:[~2012-08-09 10:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 10:43 Wei Ni [this message]
2012-08-09 11:48 ` How to get the irq flags from the dts file Arnd Bergmann
2012-08-09 12:05 ` Mark Brown
2012-08-10 9:11 ` Wei Ni
2012-08-09 12:09 ` Arend van Spriel
2012-08-10 9:14 ` Wei Ni
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=1344509006.2295.148.camel@tegra-chromium-2 \
--to=wni@nvidia.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).