From: Dinh Nguyen <dingu...@opensource.altera.com>

Update the dwc2 wakeup and suspend interrupt functions to use call_gadget
when the IP is in peripheral mode.

Signed-off-by: Dinh Nguyen <dingu...@opensource.altera.com>
Acked-by: Paul Zimmerman <pa...@synopsys.com>
---
 drivers/usb/dwc2/core_intr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index 24d4c0d..651785d 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -337,6 +337,7 @@ static void dwc2_handle_wakeup_detected_intr(struct 
dwc2_hsotg *hsotg)
                }
                /* Change to L0 state */
                hsotg->lx_state = DWC2_L0;
+               call_gadget(hsotg, resume);
        } else {
                if (hsotg->lx_state != DWC2_L1) {
                        u32 pcgcctl = readl(hsotg->regs + PCGCTL);
@@ -397,6 +398,7 @@ static void dwc2_handle_usb_suspend_intr(struct dwc2_hsotg 
*hsotg)
                        "DSTS.Suspend Status=%d HWCFG4.Power Optimize=%d\n",
                        !!(dsts & DSTS_SUSPSTS),
                        hsotg->hw_params.power_optimized);
+               call_gadget(hsotg, suspend);
        } else {
                if (hsotg->op_state == OTG_STATE_A_PERIPHERAL) {
                        dev_dbg(hsotg->dev, "a_peripheral->a_host\n");
-- 
2.0.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