summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorKrishna Yarlagadda <kyarlagadda@nvidia.com>2012-08-08 17:01:10 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-08-10 12:43:33 +0530
commit86e595d240217586812e3cae2e36f3bf37087c8f (patch)
treecb6475da782a59db1bc1af257f46289d10d93e4f /drivers/usb
parenta2a5e835c2873d941562fea69230b3eded4598c8 (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>
Diffstat (limited to 'drivers/usb')
-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 a2c6477cdbc9..e9905504115f 100644
--- a/drivers/usb/otg/tegra-otg.c
+++ b/drivers/usb/otg/tegra-otg.c
@@ -529,7 +529,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 usb_otg *otg = tegra->phy.otg;
int val;
unsigned long flags;
@@ -545,10 +544,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->phy->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)
@@ -558,7 +553,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);