mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@oss.qualcomm.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johan Hovold <johan@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Wesley Cheng <wesley.cheng@oss.qualcomm.com>,
	Udipto Goswami <udipto.goswami@oss.qualcomm.com>,
	Jack Pham <jack.pham@oss.qualcomm.com>,
	Pratham Pratap <pratham.pratap@oss.qualcomm.com>,
	Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>,
	Prashanth K <prashanth.k@oss.qualcomm.com>,
	Elson Serrao <elson.serrao@oss.qualcomm.com>,
	"cros-qcom-dts-watchers@chromium.org"
	<cros-qcom-dts-watchers@chromium.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/1] usb: dwc3: qcom: Keep wakeup option default off
Date: Sat, 5 Dec 2026 20:22:39 -0800	[thread overview]
Message-ID: <axTjD5Ha5j81qjRx@hu-petche-lv.qualcomm.com> (raw)
In-Reply-To: <axIqBQ5A2xrEd4XD@vbox>

On 26-12-04 03:12:35, Thinh Nguyen wrote:
> > 
> > If both wakeup capability and wakeup option are decided by glue layer,
> > there is no reason dwc->sys_wakeup existed for dwc3 core, and there is
> > no glue layer user for that. But there are behaviour changes, I am not
> > sure if there is a regression.
> 
> We should keep sys_wakeup. It tracks the platform default setting at
> probe, which the gadget start/stop needs. The pm_prepare() change only
> affects xhci in host mode.
> 

First, whether the USB is as system wakeup source may be decided
by user at runtime, assume there is a system option at user menu
for wakeup setting, the user could change it at any time, the
default setting is not the final setting, do we align this?

If the sys_wakeup tracks default wakeup setting:

- At device mode, if the default wakeup option is off, the wakeup option 
can't control it at gadget start/stop, the wakeup option will be totally
decided by user option (/sys/../power/wakeup), could you accept this?

- At host mode, the user decides runtime wakeup setting and we don't need
to block any wakeup setting at code, and xhci follows dwc3 core's setting
at pm_prepare(), the sys_wakeup isn't needed, do you agree?

> > 
> > - At host mode: anything the user writes to xhci's own power/wakeup is
> > overwritten at every prepare. Before, it could be set independently of the parent.
> 
> That's intended. The controller's power/wakeup is the one that we should
> check. The xhci platform device is recreated on role switch, so the
> value written to it doesn't persist anyway.

Agree, although there could be pre_suspend script do that too.

> > 
> > - At device mode, current wakeup option depends on whether gadget start/stop
> > or without binding gadget driver. If delete dwc->sys_wakeup, it
> > totally depends on glue layer. For commit f9aa41130ac6 ("usb: dwc3: Properly set
> > system wakeup"), it describes a bug of enabling wakeup when gadget driver
> > is not bound, it seems some other places enable wakeup option, and read dwc3 wakeup
> > option, do some settings later. So, I am afraid there may be regression
> > for platforms which set wakeup option default on and rely on dwc3 gadget driver
> > disable it.
> 
> It's not affected if we keep sys_wakeup. For qcom, device_init_wakeup()
> should be moved before dwc3_core_probe() so sys_wakeup matches the
> glue's setting.
> 

Yes, if wakeup option is default on, the device mode driver sets
wakeup option at gadget start/stop and without bound gadget driver
situations correctly.

-- 

Thanks,
Peter Chen

      reply	other threads:[~2026-12-06  4:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  9:21 Peter Chen
2026-11-10  9:21 ` [PATCH 1/1] " Peter Chen
2026-11-12  1:14 ` [PATCH 0/1] " Thinh Nguyen
2026-11-12  8:10   ` Peter Chen
2026-11-24  3:11     ` Thinh Nguyen
2026-11-25  4:47       ` Peter Chen
2026-11-25  9:30         ` Peter Chen
2026-12-03  2:41         ` Thinh Nguyen
2026-12-03 11:40           ` Peter Chen
2026-12-04  3:12             ` Thinh Nguyen
2026-12-06  4:22               ` Peter Chen [this message]

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=axTjD5Ha5j81qjRx@hu-petche-lv.qualcomm.com \
    --to=peter.chen@oss.qualcomm.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=andersson@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=elson.serrao@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack.pham@oss.qualcomm.com \
    --cc=johan@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=prashanth.k@oss.qualcomm.com \
    --cc=pratham.pratap@oss.qualcomm.com \
    --cc=udipto.goswami@oss.qualcomm.com \
    --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

all inboxes | Powered by JetHome®