summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Yarlagadda <kyarlagadda@nvidia.com>2012-08-08 17:01:10 +0530
committerSimone Willett <swillett@nvidia.com>2012-08-09 18:05:56 -0700
commitdf73b460996b2f6e2c0b0d93b3679d6dca9d4615 (patch)
treead2f3d93f30ebe78604b6c97de22d6936be61244
parentbbdf4403412df9151864bd633519f828ea27c8c6 (diff)
USB: otg: delay device disconnect
Device disconnect during resume might fail if notification clients for this device removal are not ready. Disconnecting device after the resume is complete. Bug 1024496 Change-Id: Ia806e177d2dd2b1b43d3fea7a4af45f0d4a93cd4 Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-on: http://git-master/r/122079 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
-rw-r--r--drivers/usb/otg/tegra-otg.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c
index 1d7cc769fdb8..6b55d5d5c6fb 100644
--- a/drivers/usb/otg/tegra-otg.c
+++ b/drivers/usb/otg/tegra-otg.c
@@ -533,7 +533,6 @@ static void tegra_otg_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct tegra_otg_data *tegra = platform_get_drvdata(pdev);
- struct otg_transceiver *otg = &tegra->otg;
int val;
unsigned long flags;
DBG("%s(%d) BEGIN\n", __func__, __LINE__);
@@ -548,10 +547,6 @@ static void tegra_otg_resume(struct device *dev)
DBG("%s(%d) PHY WAKEUP register : 0x%x\n", __func__, __LINE__, val);
clk_disable(tegra->clk);
- /* Handle if host cable is replaced with device during suspend state */
- if (otg->state == OTG_STATE_A_HOST && (val & USB_ID_STATUS))
- tegra_change_otg_state(tegra, OTG_STATE_A_SUSPEND);
-
/* Enable interrupt and call work to set to appropriate state */
spin_lock_irqsave(&tegra->lock, flags);
if (tegra->builtin_host)
@@ -561,7 +556,7 @@ static void tegra_otg_resume(struct device *dev)
USB_ID_PIN_WAKEUP_EN;
spin_unlock_irqrestore(&tegra->lock, flags);
- irq_work(&tegra->work);
+ schedule_work(&tegra->work);
enable_interrupt(tegra, true);