All of lore.kernel.org
 help / color / mirror / Atom feed
* [09/11] usb: dwc2: Add call_gadget() function call
@ 2018-01-24 13:43 Grigor Tovmasyan
  0 siblings, 0 replies; only message in thread
From: Grigor Tovmasyan @ 2018-01-24 13:43 UTC (permalink / raw)
  To: John Youn, Felipe Balbi, Greg Kroah-Hartman, linux-usb; +Cc: Grigor Tovmasyan

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>
---
 drivers/usb/dwc2/core_intr.c | 6 ++++++
 1 file changed, 6 insertions(+)

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);
 		}
 	}
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-24 13:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 13:43 [09/11] usb: dwc2: Add call_gadget() function call Grigor Tovmasyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.