Re: [PATCH] usb: dwc3: avoid probe deferral when USB power supply is not available

From: Thinh Nguyen

Date: Thu Apr 30 2026 - 05:21:07 EST


On Wed, Apr 29, 2026, Elson Serrao wrote:
>
>
> On 4/7/2026 4:24 PM, Elson Serrao wrote:
> > The dwc3 driver currently defers probe if the USB power supply is not yet
> > registered. On some platforms, even though charging and power supply
> > functionality is available during normal operation, there may exist
> > minimal booting modes (such as recovery or diagnostic environments) where
> > the relevant USB power supply device is not registered. In such cases,
> > probe deferral prevents USB gadget operation entirely.
> >
> > USB data functionality for basic operation does not inherently depend on
> > the power supply framework, which is only required for enforcing VBUS
> > current control. The configured VBUS current limit is typically enforced
> > through the charger or PMIC power path. When charging functionality is
> > unavailable, applying a current limit has no practical effect, reducing
> > the benefit of strict probe-time enforcement in these environments.
> >
> > Instead of deferring probe, register a power supply notifier when the
> > USB power supply is not yet available. Cache the requested VBUS current
> > limit and apply it once the matching power supply becomes available, as
> > notified through the registered callback.
> >
> > Signed-off-by: Elson Serrao <elson.serrao@xxxxxxxxxxxxxxxx>
> > ---
> > drivers/usb/dwc3/core.c | 82 ++++++++++++++++++++++++++++++++-------
> > drivers/usb/dwc3/core.h | 4 ++
> > drivers/usb/dwc3/gadget.c | 10 ++++-
> > 3 files changed, 80 insertions(+), 16 deletions(-)
> >
>
>
> Hi Thinh,
>
> Just a gentle reminder about this patch.
> Please let me know if any changes are needed.
>

Hi Elson,

Apologies for the delayed response. I've missed this patch.

Based on the patch description, it sounds reasonable. I'll review the
implementation in detail and get back before the week end.

Thanks for the reminder.

BR,
Thinh