diff options
author | Artur Petrosyan <Arthur.Petrosyan@synopsys.com> | 2021-04-13 10:36:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-13 13:25:12 +0300 |
commit | 9b4965d77e115b550a5612dce3987a4ca69f86bc (patch) | |
tree | 7d57e50288e52e7871bbce46e20f45ff0db96298 /drivers/usb/dwc2 | |
parent | 5d240efddc7f02e1454ed2fd8caf57b891e23b55 (diff) | |
download | linux-9b4965d77e115b550a5612dce3987a4ca69f86bc.tar.xz |
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: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210413073638.921E8A0099@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/core_intr.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index c764407e7633..550c52c1a0c7 100644 --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -316,12 +316,19 @@ 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) { - ret = dwc2_exit_partial_power_down(hsotg, 0, - true); - if (ret) - dev_err(hsotg->dev, - "exit power_down failed\n"); + if (hsotg->lx_state == DWC2_L2) { + if (hsotg->in_ppd) { + ret = dwc2_exit_partial_power_down(hsotg, 0, + true); + if (ret) + dev_err(hsotg->dev, + "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); } /* |