public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Elson Serrao <elson.serrao@oss.qualcomm.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jack.pham@oss.qualcomm.com" <jack.pham@oss.qualcomm.com>,
	"wesley.cheng@oss.qualcomm.com" <wesley.cheng@oss.qualcomm.com>
Subject: Re: [PATCH] usb: dwc3: avoid probe deferral when USB power supply is not available
Date: Thu, 30 Apr 2026 07:43:15 +0000	[thread overview]
Message-ID: <afMGNh3xh8Az4x-S@vbox> (raw)
In-Reply-To: <ed8566ad-2a98-43c1-8d89-d4ddc37e273e@oss.qualcomm.com>

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@oss.qualcomm.com>
> > ---
> >  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

  reply	other threads:[~2026-04-30  9:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 23:24 [PATCH] usb: dwc3: avoid probe deferral when USB power supply is not available Elson Serrao
2026-04-29 17:52 ` Elson Serrao
2026-04-30  7:43   ` Thinh Nguyen [this message]
2026-05-02  0:55 ` Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afMGNh3xh8Az4x-S@vbox \
    --to=thinh.nguyen@synopsys.com \
    --cc=elson.serrao@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack.pham@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=wesley.cheng@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox