aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorVivek Gautam <gautam.vivek@samsung.com>2012-10-13 09:50:18 -0400
committerFelipe Balbi <balbi@ti.com>2012-10-15 09:25:23 -0400
commit01b8daf71b2fd2f6ece5f063a089abf4b13f1d6e (patch)
treefd12c13855bf1c85cf66b722598d4abbe49f2acb /drivers/usb/dwc3
parent6ff1f3d3bd7c69c62ca5773b1b684bce42eff06a (diff)
usb: dwc3: shutdown usb_phy when removing the device
We call usb_phy_init() from dwc3_core_init() during probe, so adding usb_phy_shutdown() to dwc3_core_exit() while removing the device so we don't keep PHYs turned on, consuming power, unnecessarily. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index b415c0c859d3..c14ebc975ba4 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc)
409{ 409{
410 dwc3_event_buffers_cleanup(dwc); 410 dwc3_event_buffers_cleanup(dwc);
411 dwc3_free_event_buffers(dwc); 411 dwc3_free_event_buffers(dwc);
412
413 usb_phy_shutdown(dwc->usb2_phy);
414 usb_phy_shutdown(dwc->usb3_phy);
415
412} 416}
413 417
414#define DWC3_ALIGN_MASK (16 - 1) 418#define DWC3_ALIGN_MASK (16 - 1)