aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoiz Sonasath <m-sonasath@ti.com>2011-04-20 13:54:15 -0500
committerDan Murphy <dmurphy@ti.com>2011-04-25 14:45:10 -0500
commit5e8b56a9d391027fc4f7899b82f2be689ca7062d (patch)
treea88c2a54fd2b166d1b3f0dc9a3aea8ed92e95935
parent4aae45e62f759b88f81d952259429d32423af28c (diff)
downloadpandroid-5e8b56a9d391027fc4f7899b82f2be689ca7062d.tar.gz
USB: TWL: Ignore ID-GND interrupts for Peripheral-only mode
During the USB Back Voltage testing in Peripheral-only mode, on blaze boards it was observed that when you connect the usb cable to the test fixture, it was generating spurious ID GND interrupts and hence as the USB OTG SW stack works on cable- based switching, it was causing the OTG controller to switch its role of HOST and supply VBUS, causing the tests to fail. With this patch we ignore any ID GND interrupts if we are operating in PERIPHERAL-only mode. Change-Id: I35454abcbbd3c890f69b5f4fa8a783b9b77ece9c Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
-rw-r--r--drivers/usb/otg/twl6030-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c
index 5316505c4fc..8a8a59273f1 100644
--- a/drivers/usb/otg/twl6030-usb.c
+++ b/drivers/usb/otg/twl6030-usb.c
@@ -266,6 +266,8 @@ static irqreturn_t twl6030_usb_irq(int irq, void *_twl)
static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
{
+
+#ifndef CONFIG_USB_MUSB_PERIPHERAL
struct twl6030_usb *twl = _twl;
int status = USB_EVENT_NONE;
u8 hw_state;
@@ -290,6 +292,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
}
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_LATCH_CLR, status);
twl->linkstat = status;
+#endif
return IRQ_HANDLED;
}