From: Gregory Herrero <gregory.herr...@intel.com>

If hibernation is supported, resume of devices will be handled in
bus_resume callback.

Signed-off-by: Gregory Herrero <gregory.herr...@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kau...@intel.com>
Tested-by: Robert Baldyga <r.bald...@samsung.com>
---
 drivers/usb/dwc2/core_intr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index 8c7c911..8f126f2 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -355,6 +355,10 @@ static void dwc2_handle_wakeup_detected_intr(struct 
dwc2_hsotg *hsotg)
                /* Change to L0 state */
                hsotg->lx_state = DWC2_L0;
        } else {
+               if (hsotg->core_params->hibernation) {
+                       writel(GINTSTS_WKUPINT, hsotg->regs + GINTSTS);
+                       return;
+               }
                if (hsotg->lx_state != DWC2_L1) {
                        u32 pcgcctl = readl(hsotg->regs + PCGCTL);
 
-- 
2.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to