Commit 9b4965d7 authored by Artur Petrosyan's avatar Artur Petrosyan Committed by Greg Kroah-Hartman

usb: dwc2: Add exit clock gating from session request interrupt

Added clock gating exit flow from session
request interrupt handler according programming guide.
Signed-off-by: default avatarArtur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210413073638.921E8A0099@mailhost.synopsys.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d240efd
......@@ -316,7 +316,8 @@ static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg)
hsotg->lx_state);
if (dwc2_is_device_mode(hsotg)) {
if (hsotg->lx_state == DWC2_L2 && hsotg->in_ppd) {
if (hsotg->lx_state == DWC2_L2) {
if (hsotg->in_ppd) {
ret = dwc2_exit_partial_power_down(hsotg, 0,
true);
if (ret)
......@@ -324,6 +325,12 @@ static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg)
"exit power_down failed\n");
}
/* Exit gadget mode clock gating. */
if (hsotg->params.power_down ==
DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended)
dwc2_gadget_exit_clock_gating(hsotg, 0);
}
/*
* Report disconnect if there is any previous session
* established
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment