[PATCH v4 2/3] usb: dwc3: add needs_full_reinit flag

Randy Dunlap rdunlap at infradead.org
Fri Feb 27 09:58:02 PST 2026


Hi--

On 2/12/26 12:35 AM, Xu Yang wrote:
> The current design assumes that the controller remains powered when wakeup
> is enabled. However, some SoCs provide wakeup capability even when the
> controller itself is powered down, using separate dedicated wakeup logic.
> This allows additional power savings, but requires the controller to be
> fully re‑initialized after system resume.
> 
> To support these SoCs, introduce a flag needs_full_reinit for the purpose.
> And the glue layer needs to indicate if the controller needs this behavior
> by setting a same flag needs_full_reinit in dwc3_properties.
> 
> Reviewed-by: Frank Li <Frank.Li at nxp.com>
> Signed-off-by: Xu Yang <xu.yang_2 at nxp.com>
> ---
> Changes in v4:
>  - also rename core_may_lose_power to needs_full_reinit
>  - add R-b tag
> Changes in v3:
>  - no changes
> Changes in v2:
>  - put core_may_lose_power into dwc3_properties and check it in
>    dwc3_get_software_properties()
>  - rename may_lose_power to needs_full_reinit
> ---
>  drivers/usb/dwc3/core.c | 9 +++++++--
>  drivers/usb/dwc3/core.h | 3 +++
>  drivers/usb/dwc3/glue.h | 3 +++
>  3 files changed, 13 insertions(+), 2 deletions(-)
> 

> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index a35b3db1f9f3..67bcc8dccc89 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -1119,6 +1119,8 @@ struct dwc3_glue_ops {
>   * @usb3_lpm_capable: set if hadrware supports Link Power Management
>   * @usb2_lpm_disable: set to disable usb2 lpm for host
>   * @usb2_gadget_lpm_disable: set to disable usb2 lpm for gadget
> + * @needs_full_reinit: set to indicate the core may lose power and need full
> +			initialization during system pm

The line above should begin with
 *

Please correct it so that kernel-doc doesn't complain:

WARNING: drivers/usb/dwc3/core.h:1122 bad line:                         initialization during system pm

Thanks.

>   * @disable_scramble_quirk: set if we enable the disable scramble quirk
>   * @u2exit_lfps_quirk: set if we enable u2exit lfps quirk
>   * @u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk





More information about the linux-arm-kernel mailing list