diff options
author | Suresh Mangipudi <smangipudi@nvidia.com> | 2011-08-04 17:58:00 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:03 -0800 |
commit | 23a996ee2c38a8b0d0adf155e5847b7438b667b1 (patch) | |
tree | 25f39a5a9b6bdb997b273516228c89ee9d5fd7de /drivers/usb/otg | |
parent | 17e357dfdacb17ab03c54d9966e24b3426a187b5 (diff) |
tegra: otg: State update during suspend
Update the state of OTG when the device is entering suspend mode with
the device cable connected.
Bug 858490
Original-Change-Id: I7c8fb029f6e47418295d4f665cedf1774dd05e51
Reviewed-on: http://git-master/r/45006
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Tested-by: Suresh Mangipudi <smangipudi@nvidia.com>
Tested-by: Bala Murali Krishna <balam@nvidia.com>
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Rebase-Id: R1bad22e4207e558065f307f942907659c1d110d4
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r-- | drivers/usb/otg/tegra-otg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c index e24d5775fbc1..f895c4a91e7f 100644 --- a/drivers/usb/otg/tegra-otg.c +++ b/drivers/usb/otg/tegra-otg.c @@ -389,9 +389,10 @@ static int tegra_otg_suspend(struct device *dev) tegra_otg->intr_reg_data = readl(tegra_otg->regs + USB_PHY_WAKEUP); clk_disable(tegra_otg->clk); - if (from == OTG_STATE_B_PERIPHERAL && otg->gadget) + if (from == OTG_STATE_B_PERIPHERAL && otg->gadget) { usb_gadget_vbus_disconnect(otg->gadget); - + otg->state = OTG_STATE_A_SUSPEND; + } tegra_otg_disable_clk(); return 0; } |