mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Elson Serrao <quic_eserrao@quicinc.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"balbi@kernel.org" <balbi@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"quic_wcheng@quicinc.com" <quic_wcheng@quicinc.com>,
	"quic_jackp@quicinc.com" <quic_jackp@quicinc.com>
Subject: Re: [PATCH v2 1/5] usb: gadget: Add remote wakeup capable flag
Date: Fri, 20 Jan 2023 21:06:39 -0500	[thread overview]
Message-ID: <Y8tIrx+F/4X9YyFT@rowland.harvard.edu> (raw)
In-Reply-To: <20230121020223.l2tyvyqifc7umqpy@synopsys.com>

On Sat, Jan 21, 2023 at 02:02:36AM +0000, Thinh Nguyen wrote:
> On Fri, Jan 20, 2023, Alan Stern wrote:
> > A UDC design might have multiple versions, some supporting remote wakeup 
> > and others not.  But drivers generally use a single static 
> > usb_gadget_ops structure, and they don't modify it at runtime to account 
> > for hardware differences.  So if a single driver controls those multiple 
> > versions, you can't rely on the presence of gadget->ops->wakeup to 
> > indicate whether there actually is hardware remote wakeup support.
> > 
> > Ideally, the usb_gadget structure should have a wakeup_capable flag 
> > which the UDC driver would set appropriately (probably during its probe 
> > routine).
> > 
> 
> I was thinking that it can be handled by the
> usb_gadget_enable_remote_wakeup() so we can do away with the
> wakeup_capable flag.

usb_gadget_enable_remote_wakeup() gets called when the gadget or 
function is suspended, right?  But a gadget driver may want to know long 
before that whether the UDC supports remote wakeup, in order to set up 
its config descriptor correctly.

Alan Stern

  reply	other threads:[~2023-01-21  2:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 21:55 [PATCH v2 0/5] Add function suspend/resume and remote wakeup support Elson Roy Serrao
2023-01-17 21:55 ` [PATCH v2 1/5] usb: gadget: Add remote wakeup capable flag Elson Roy Serrao
2023-01-19  1:44   ` Thinh Nguyen
2023-01-20  0:13     ` Elson Serrao
2023-01-20  1:15       ` Thinh Nguyen
2023-01-21  0:06         ` Elson Serrao
2023-01-21  0:21           ` Thinh Nguyen
2023-01-21  1:55             ` Alan Stern
2023-01-21  2:02               ` Thinh Nguyen
2023-01-21  2:06                 ` Alan Stern [this message]
2023-01-21  2:12                   ` Thinh Nguyen
2023-01-23 19:33                     ` Thinh Nguyen
2023-01-23 20:25                       ` Elson Serrao
2023-01-23 23:02                         ` Thinh Nguyen
2023-01-24  1:42                           ` Elson Serrao
2023-01-19 13:02   ` Greg KH
2023-01-19 23:48     ` Elson Serrao
2023-01-17 21:55 ` [PATCH v2 2/5] usb: dwc3: Add remote wakeup handling Elson Roy Serrao
2023-01-17 21:55 ` [PATCH v2 3/5] usb: gadget: Add function wakeup support Elson Roy Serrao
2023-01-17 21:55 ` [PATCH v2 4/5] usb: dwc3: Add function suspend and " Elson Roy Serrao
2023-01-19  2:18   ` Thinh Nguyen
2023-01-19 20:03     ` Elson Serrao
2023-01-17 21:55 ` [PATCH v2 5/5] usb: gadget: f_ecm: Add suspend/resume and remote " Elson Roy Serrao

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=Y8tIrx+F/4X9YyFT@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_eserrao@quicinc.com \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_wcheng@quicinc.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®