Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757884Ab2HIKnr (ORCPT ); Thu, 9 Aug 2012 06:43:47 -0400 Received: from hqemgate04.nvidia.com ([216.228.121.35]:18689 "EHLO hqemgate04.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757360Ab2HIKnp (ORCPT ); Thu, 9 Aug 2012 06:43:45 -0400 X-PGP-Universal: processed; by hqnvupgp05.nvidia.com on Thu, 09 Aug 2012 03:43:37 -0700 Subject: How to get the irq flags from the dts file From: Wei Ni To: "grant.likely@secretlab.ca" , "rob.herring@calxeda.com" , CC: , , , , , Date: Thu, 9 Aug 2012 18:43:26 +0800 Message-ID: <1344509006.2295.148.camel@tegra-chromium-2> MIME-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 37 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/