devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to get the irq flags from the dts file
@ 2012-08-09 10:43 Wei Ni
  2012-08-09 11:48 ` Arnd Bergmann
  2012-08-09 12:09 ` Arend van Spriel
  0 siblings, 2 replies; 6+ messages in thread
From: Wei Ni @ 2012-08-09 10:43 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
	frankyl-dY08KVG/lbpWk0Htik3J/w
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	brcm80211-dev-list-dY08KVG/lbpWk0Htik3J/w,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-10  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09 10:43 How to get the irq flags from the dts file Wei Ni
2012-08-09 11:48 ` Arnd Bergmann
     [not found]   ` <201208091148.42748.arnd-r2nGTMty4D4@public.gmane.org>
2012-08-09 12:05     ` Mark Brown
     [not found]       ` <20120809120530.GC8474-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2012-08-10  9:11         ` Wei Ni
2012-08-09 12:09 ` Arend van Spriel
     [not found]   ` <5023A88F.8040402-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2012-08-10  9:14     ` Wei Ni

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).