[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1416921115-10467-11-git-send-email-george.cherian@ti.com>
Date: Tue, 25 Nov 2014 18:41:46 +0530
From: George Cherian <george.cherian@...com>
To: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
<linux-samsung-soc@...r.kernel.org>, <linux-omap@...r.kernel.org>,
<linux-usb@...r.kernel.org>
CC: <peter.chen@...escale.com>, <sojka@...ica.cz>,
<mathias.nyman@...el.com>, <balbi@...com>,
<gregkh@...uxfoundation.org>, <tony@...mide.com>,
<bcousson@...libre.com>, <kgene.kim@...sung.com>,
<ben-linux@...ff.org>, <linux@....linux.org.uk>,
<galak@...eaurora.org>, <ijc+devicetree@...lion.org.uk>,
<mark.rutland@....com>, <pawel.moll@....com>, <robh+dt@...nel.org>,
George Cherian <george.cherian@...com>
Subject: [PATCH 10/19] usb: dwc3: core: Adapt to named interrupts
From: Felipe Balbi <balbi@...com>
Add support to use interrupt names,
Following are the interrupt names
Peripheral Interrupt - peripheral
HOST Interrupt - host
OTG Interrupt - otg
Signed-off-by: Felipe Balbi <balbi@...com>
Signed-off-by: George Cherian <george.cherian@...com>
---
drivers/usb/dwc3/core.c | 12 ++++++++++++
drivers/usb/dwc3/core.h | 7 +++++++
2 files changed, 19 insertions(+)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index fadd767..dbd5589 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -760,6 +760,18 @@ static int dwc3_probe(struct platform_device *pdev)
dwc->xhci_resources[1].flags = res->flags;
dwc->xhci_resources[1].name = res->name;
+ dwc->otg_irq = platform_get_irq_byname(pdev, "otg");
+ if (!dwc->otg_irq)
+ dev_err(dev, "missing OTG IRQ\n");
+
+ dwc->gadget_irq = platform_get_irq_byname(pdev, "peripheral");
+ if (!dwc->gadget_irq)
+ dev_err(dev, "missing peripheral IRQ\n");
+
+ dwc->xhci_irq = platform_get_irq_byname(pdev, "host");
+ if (!dwc->xhci_irq)
+ dev_err(dev, "missing HOST IRQ\n");
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "missing memory resource\n");
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 6b38223..7c5ae37 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -651,6 +651,9 @@ struct dwc3_scratchpad_array {
* @maximum_speed: maximum speed requested (mainly for testing purposes)
* @revision: revision register contents
* @dr_mode: requested mode of operation
+ * @xhci_irq: IRQ number for XHCI IRQs
+ * @gadget_irq: IRQ number for Peripheral IRQs
+ * @otg_irq: IRQ number for OTG IRQs
* @usb2_phy: pointer to USB2 PHY
* @usb3_phy: pointer to USB3 PHY
* @usb2_generic_phy: pointer to USB2 PHY
@@ -747,6 +750,10 @@ struct dwc3 {
enum usb_dr_mode dr_mode;
+ int gadget_irq;
+ int xhci_irq;
+ int otg_irq;
+
/* used for suspend/resume */
u32 dcfg;
u32 gctl;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists