diff options
author | Moiz Sonasath <m-sonasath@ti.com> | 2011-11-10 16:46:06 -0600 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:56:06 +0200 |
commit | 28e9ce9311c9e93d532b47dee20021cbc43eb5d5 (patch) | |
tree | 1a0a3069330fc1eb8751269c0f9c6313a68496aa /drivers/usb/otg | |
parent | aee8f57a8178f191420529c4f4130f3e086f8cbb (diff) | |
download | kernel_samsung_tuna-28e9ce9311c9e93d532b47dee20021cbc43eb5d5.zip kernel_samsung_tuna-28e9ce9311c9e93d532b47dee20021cbc43eb5d5.tar.gz kernel_samsung_tuna-28e9ce9311c9e93d532b47dee20021cbc43eb5d5.tar.bz2 |
usb: otg: Handle spurious ID GND interrupt
On Blaze tablet boards it is observed that sometimes
in trying to plugin a micro-A type plug it is causing
consecutive ID GND interrupts which imbalances the PM
get_syc() counters. Because of the design of the
front panel/otg port on tablet boards, it is difficult
to attach/detach a cable smoothly.
To avoid this scenario, we ignore the ID GND interrupt
if one has already been served without a detach seen.
Change-Id: I1b034a6692f4e381d1a89b729cc942b763265396
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r-- | drivers/usb/otg/twl6030-usb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index e3bedec..454cd96 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c @@ -342,6 +342,9 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) if (hw_state & STS_USB_ID) { + if (twl->otg.state == OTG_STATE_A_IDLE) + return IRQ_HANDLED; + regulator_enable(twl->usb3v3); twl->asleep = 1; twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, 0x1); @@ -507,6 +510,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) twl->otg.shutdown = twl6030_phy_shutdown; twl->otg.set_suspend = twl6030_phy_suspend; twl->otg.start_srp = twl6030_start_srp; + twl->otg.state = OTG_STATE_UNDEFINED; /* init spinlock for workqueue */ spin_lock_init(&twl->lock); |