summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkat Moganty <vmoganty@nvidia.com>2010-05-08 00:50:18 +0530
committerGary King <gking@nvidia.com>2010-05-07 14:23:24 -0700
commita22928471875feb95532b42b8ad3718cdd43e1bf (patch)
tree0548478e32f036b83ea714a79336c55756cfe735
parent8d622a4b0297b554df0fb0447baf1d4baba25fce (diff)
ehci tegra: Power down phy during auto suspend.
During auto suspend, USB phy is not powered down. Due to this there is increase in the power numbers. Fixed by powering down/up the phy during auto suspend/resume. Bug 682727 Tested on Harmony/eclair. Change-Id: I9c5500308bdaa3cb9f17b7f0745bd12969a29aae Reviewed-on: http://git-master/r/1317 Tested-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Tested-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rwxr-xr-xdrivers/usb/host/ehci-tegra.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 53301cb4342e..e57abd0c6a3d 100755
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -358,6 +358,7 @@ static int tegra_ehci_bus_suspend(struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct tegra_hcd_platform_data *pdata;
+ int error_status = 0;
/* initialize the platform data pointer */
pdata = hcd->self.controller->platform_data;
@@ -384,7 +385,13 @@ static int tegra_ehci_bus_suspend(struct usb_hcd *hcd)
}
}
- return ehci_bus_suspend(hcd);
+ if (ehci->host_resumed) {
+ error_status = ehci_bus_suspend(hcd);
+ if (!error_status)
+ tegra_ehci_power_down(hcd);
+ }
+
+ return error_status;
}
static int tegra_ehci_bus_resume(struct usb_hcd *hcd)
@@ -417,6 +424,10 @@ static int tegra_ehci_bus_resume(struct usb_hcd *hcd)
}
}
+ if (!ehci->host_resumed) {
+ tegra_ehci_power_up(hcd);
+ }
+
return ehci_bus_resume(hcd);
}