usb: dwc2: Add clock gating entering flow by system suspend
If not hibernation nor partial power down are supported, clock gating is used to save power. Adds a new flow of entering clock gating when PC is suspended. Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com> Link: https://lore.kernel.org/r/20210413073716.30C13A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
16c729f90b
commit
50fb0c128b
@ -4372,6 +4372,15 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
|
|||||||
break;
|
break;
|
||||||
case DWC2_POWER_DOWN_PARAM_HIBERNATION:
|
case DWC2_POWER_DOWN_PARAM_HIBERNATION:
|
||||||
case DWC2_POWER_DOWN_PARAM_NONE:
|
case DWC2_POWER_DOWN_PARAM_NONE:
|
||||||
|
/*
|
||||||
|
* If not hibernation nor partial power down are supported,
|
||||||
|
* clock gating is used to save power.
|
||||||
|
*/
|
||||||
|
dwc2_host_enter_clock_gating(hsotg);
|
||||||
|
|
||||||
|
/* After entering suspend, hardware is not accessible */
|
||||||
|
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
goto skip_power_saving;
|
goto skip_power_saving;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user