]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: host: tegra: disable pmc before going to LP0
authorRohith Seelaboyina <rseelaboyina@nvidia.com>
Thu, 16 May 2013 06:43:49 +0000 (12:13 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:15:34 +0000 (13:15 -0700)
disable pmc before going to LP0

Bug 1279228
Bug 1279501

Change-Id: Ib59cff3f164262a80aa35a6ab58af792783cc5fb
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/228905
(cherry picked from commit 51b894f7889e24772eec4b51189635953b3349eb)
Reviewed-on: http://git-master/r/232941
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/usb/host/ehci-tegra.c

index 7bc064cc4b312d2bbbc6ecb115606b9dd60aa9ae..ed0e6e02bad01170078bacf32d5e9ba7cd40f094 100644 (file)
@@ -646,15 +646,19 @@ static int tegra_ehci_resume(struct platform_device *pdev)
 static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
-       int err;
        struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
+       int err;
+
        /* bus suspend could have failed because of remote wakeup resume */
        if (tegra->bus_suspended_fail)
                return -EBUSY;
        else {
                err = usb_phy_set_suspend(get_usb_phy(tegra->phy), 1);
-               if (pdata->u_data.host.turn_off_vbus_on_lp0 && pdata->port_otg)
+               if (pdata->u_data.host.turn_off_vbus_on_lp0 &&
+                       pdata->port_otg) {
                        tegra_usb_enable_vbus(tegra->phy, false);
+                       tegra_usb_phy_pmc_disable(tegra->phy);
+               }
                return err;
        }
 }