tegra: usb: otg: Clear the otg interrupt in suspend
Alok Chauhan [Mon, 6 Feb 2012 08:35:27 +0000 (13:35 +0530)]
Resuming from LP1 is not working if usb device is connected
or disconnected while system in LP1 state.
So clear the otg interrupt in suspend and re-enable it while
resuming.

Bug 906171
Bug 935273

Signed-off-by: Alok Chauhan <alokc@nvidia.com>
Reviewed-on: http://git-master/r/79449
(cherry picked from commit 54935893382a1b49a1a23ec39c6e479d163b910b)

Change-Id: Ia62f6fcd475905e5d3bcc93eae8a1e04c356111e
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82728
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

drivers/usb/otg/tegra-otg.c

index d23356e..c13c9b6 100644 (file)
@@ -439,6 +439,7 @@ static int tegra_otg_suspend(struct device *dev)
        /* store the interupt enable for cable ID and VBUS */
        clk_enable(tegra_otg->clk);
        tegra_otg->intr_reg_data = readl(tegra_otg->regs + USB_PHY_WAKEUP);
+       writel(0, (tegra_otg->regs + USB_PHY_WAKEUP));
        clk_disable(tegra_otg->clk);
 
        if (from == OTG_STATE_B_PERIPHERAL && otg->gadget) {