summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/core_intr.c
diff options
context:
space:
mode:
authorGrigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>2018-01-24 17:43:58 +0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-03-13 10:47:49 +0200
commitc655557c12ded72a41a8d04e868a10b74d957f22 (patch)
tree0ef1c6895caf3aa14917b7f1478115307ef2ad32 /drivers/usb/dwc2/core_intr.c
parent21b0340580f14d6e657439f7b7ce8cb98842dcaa (diff)
downloadlinux-c655557c12ded72a41a8d04e868a10b74d957f22.tar.bz2
usb: dwc2: Add call_gadget() function call
Added call_gadget() function call when entering to L1 state to inform gadget that core is in L1 state. Did the same thing when exiting from L1 state to inform gadget that core is in L0 state. Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/core_intr.c')
-rw-r--r--drivers/usb/dwc2/core_intr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index a8e43948f807..46b32ec7d343 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -381,6 +381,9 @@ static void dwc2_wakeup_from_lpm_l1(struct dwc2_hsotg *hsotg)
/* Change to L0 state */
hsotg->lx_state = DWC2_L0;
+
+ /* Inform gadget to exit from L1 */
+ call_gadget(hsotg, resume);
}
/*
@@ -589,6 +592,9 @@ static void dwc2_handle_lpm_intr(struct dwc2_hsotg *hsotg)
hsotg->lx_state = DWC2_L1;
dev_dbg(hsotg->dev,
"Core is in L1 sleep glpmcfg=%08x\n", glpmcfg);
+
+ /* Inform gadget that we are in L1 state */
+ call_gadget(hsotg, suspend);
}
}
}