Re: [PATCH 0/1] usb: dwc3: qcom: Keep wakeup option default off
From: Thinh Nguyen
Date: Wed Dec 02 2026 - 21:42:22 EST
On Tue, Nov 24, 2026, Peter Chen wrote:
> On 26-11-24 03:11:17, Thinh Nguyen wrote:
> > On Thu, Nov 12, 2026, Peter Chen wrote:
> > > When talking about whole system wakeup chain for USB:
> > > dwc3 -> xhci-plat -> roothub -> downstream device
> > > it usually depends on user program (per user option), but not bind to
> > > kernel driver, considering some situations that USB device are disconnected
> > > and re-connected, its wakeup option may need to re-set, and one typical
> > > solution is enable wakeup options before system suspend.
> >
> > I see. Looks like dwc->sys_wakeup is already false since
> > device_init_wakeup() is called after dwc3_core_probe(). Can we fix that
> > separately so xhci follows power/wakeup at suspend?
> >
>
> Sure, but first, we need to align what behaviours we want:
> 1. Who decides dwc3 core has wakeup capabilities?
> dwc3 core or glue layer driver?
Glue driver since it depends on the platform.
> 2. How to decide dwc3 core has wakeup capabilities?
> Has wakeup capabilities by default (xhci/cadence/chipidea) or depends on
> DT/ACPI firmware setting like "wakeup-source" property?
It should be up to the glue driver.
> 3. Default on or off for wakeup option (value for power/wakeup)
It should be up to each platform. For qcom, it's up to you and Bjorn.
> 4. xhci-plat has wakeup capabilities by default, we only need to
> set its wakeup option as default on if dwc3 core does the same thing
> for question 3.
>
The xhci should follow controller's power/wakeup setting at suspend. We
can do a check before suspend in pm_prepare(), perhaps something like
this (not tested):
int dwc3_pm_prepare(struct dwc3 *dwc)
{
...
if (dwc->xhci)
device_set_wakeup_enable(&dwc->xhci->dev,
device_may_wakeup(dwc->sysdev));
...
}
Thanks,
Thinh