Skip to content

Commit 34146c6

Browse files
Dinh Nguyengregkh
authored andcommitted
usb: dwc2: do not gate off the hardware if it does not support clock gating
We should not be clearing the HCD_FLAG_HW_ACCESSIBLE bit if the hardware does not support clock gating. Fixes: 50fb0c1 ("usb: dwc2: Add clock gating entering flow by system suspend") Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220104135922.734776-1-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b52fe2d commit 34146c6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/usb/dwc2/hcd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4399,11 +4399,12 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
43994399
* If not hibernation nor partial power down are supported,
44004400
* clock gating is used to save power.
44014401
*/
4402-
if (!hsotg->params.no_clock_gating)
4402+
if (!hsotg->params.no_clock_gating) {
44034403
dwc2_host_enter_clock_gating(hsotg);
44044404

4405-
/* After entering suspend, hardware is not accessible */
4406-
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
4405+
/* After entering suspend, hardware is not accessible */
4406+
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
4407+
}
44074408
break;
44084409
default:
44094410
goto skip_power_saving;

0 commit comments

Comments
 (0)