usb: ehci-msm: Prevent USB resume during system suspend
MSM USB host controller drivers release wakelocks only after
USB bus gets suspended. This means that at the time of system
suspend, USB devices and controller are already in suspend
state. As there are no additional power savings by disabling
wakeup capability during LPM, hence, mark HCD bus's skip_resume
flag so that USB core doesn't try to resume devices during suspend
to change remote-wakeup flags. This also avoids unnecessarily
resuming USB BUS when coming out of suspend even if there is no
wakeup USB event.
Change-Id: Icf0aa8001cde6bfc5cc5b148a34e344a3015ac58
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
diff --git a/drivers/usb/host/ehci-msm72k.c b/drivers/usb/host/ehci-msm72k.c
index 76cd977..bab330c 100644
--- a/drivers/usb/host/ehci-msm72k.c
+++ b/drivers/usb/host/ehci-msm72k.c
@@ -681,6 +681,8 @@
if (!hcd)
return -ENOMEM;
+ hcd_to_bus(hcd)->skip_resume = true;
+
hcd->irq = platform_get_irq(pdev, 0);
if (hcd->irq < 0) {
usb_put_hcd(hcd);