aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorMoiz Sonasath <m-sonasath@ti.com>2011-10-18 11:25:17 -0500
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:56:07 +0200
commit81bf5bd6d6182e2df3bf81e2288fc6b8da021475 (patch)
tree8ef48799bdc33f4291aae172bbe84644e1d36b63 /drivers/usb/otg
parent4ddb6f3cccffe6e431ce8aa72e7b77baf666f0a3 (diff)
downloadkernel_samsung_tuna-81bf5bd6d6182e2df3bf81e2288fc6b8da021475.zip
kernel_samsung_tuna-81bf5bd6d6182e2df3bf81e2288fc6b8da021475.tar.gz
kernel_samsung_tuna-81bf5bd6d6182e2df3bf81e2288fc6b8da021475.tar.bz2
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: I848a29c0c691e48ba10bf4b81870ec1d511a30ef Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Diffstat (limited to 'drivers/usb/otg')
-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 622bad7..b0e4025 100644
--- a/drivers/usb/otg/twl6030-usb.c
+++ b/drivers/usb/otg/twl6030-usb.c
@@ -334,6 +334,8 @@ vbus_notify:
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;
@@ -364,6 +366,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
0x1);
}
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_LATCH_CLR, status);
+#endif
return IRQ_HANDLED;
}