diff options
author | Rohith Seelaboyina <rseelaboyina@nvidia.com> | 2013-03-19 12:46:06 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2013-03-20 18:02:19 -0700 |
commit | f0509b097e6c005363c7b542bb45487ad5fd7089 (patch) | |
tree | f86c23f1a48269c1c55aba929c9e4aeb000622a3 /drivers/usb | |
parent | 9c3ccb8afc328cdf2729c0ae692488bdbba5b91e (diff) |
usb: host: tegra: Disable vbus while going to LP0
While going to LP0 disable vbus and enable it while
resuming from LP0, and also disalbe vbus before shutting
down of device.
Bug 1246589
Change-Id: Ie78513997c243c8057f0e9cd1a632a6e8ddde75b
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/207621
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 022c356ce901..fa097574a878 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -295,6 +295,8 @@ static void tegra_ehci_shutdown(struct usb_hcd *hcd) ehci_silence_controller(ehci); spin_unlock_irq(&ehci->lock); } + tegra_usb_phy_power_off(tegra->phy); + usb_phy_shutdown(get_usb_phy(tegra->phy)); mutex_unlock(&tegra->sync_lock); } @@ -596,19 +598,24 @@ fail_io: static int tegra_ehci_resume(struct platform_device *pdev) { struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); - + if (tegra_usb_phy_otg_supported(tegra->phy)) + tegra_usb_enable_vbus(tegra->phy, true); return tegra_usb_phy_power_on(tegra->phy); } static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state) { struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); - + int err; /* bus suspend could have failed because of remote wakeup resume */ if (tegra->bus_suspended_fail) return -EBUSY; - else - return tegra_usb_phy_power_off(tegra->phy); + else { + err = tegra_usb_phy_power_off(tegra->phy); + if (tegra_usb_phy_otg_supported(tegra->phy)) + tegra_usb_enable_vbus(tegra->phy, false); + return err; + } } #endif |