Skip to contentSkip to conversation

usb: dwc2: Add default param to control power optimization.

PATCH Greg Kroah-Hartman 1 participant 1 message Mar 26, 2021 1 message not in the archive USB

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#1 lore raw
In reply to a message not in the archive
Quoted 21 lines · Artur Petrosyan

There are 3 power saving options supported in dwc2 core
1. Hibernation
2. Partial Power Down
3. Clock gating

To enable or disable the power saving features earlier users had to set "power_down" param to "0". However, "power_down" parameter is meant to and used for distinguishing between the power saving options.

So, if Hibernation is enabled then
"power_down = 2"
if Partial Power Down is enabled then
"power_down = 1"
if not Hibernation nor Partial Power Down are enabled then "power_down = 0".

Setting the "power_down" to "0" for disabling power saving options is not right because it is used to differentiate power saving options.

Quoted 8 lines

Therefor added a new parameter named "power_saving" which will be used only for enabling or disabling power saving modes.

NOTE: If Hibernation or Partial Power Down modes are disabled then by default Clock gating mode is used.

- Added a default param "power_saving" to enable or disable hibernation or partial power down features.

But nothing changes this option? So why does it matter?

Quoted 3 lines

- Printed hibernation param in hw_params_show and
power_saving param in params_show.

Please make this a separate patch for the hibernation option, as it has nothing to do with this patch at all.

thanks,

greg k-h