Linux USB
 help / color / mirror / Atom feed
From: Elson Serrao <quic_eserrao@quicinc.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: <gregkh@linuxfoundation.org>, <Thinh.Nguyen@synopsys.com>,
	<balbi@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-usb@vger.kernel.org>, <quic_wcheng@quicinc.com>,
	<quic_jackp@quicinc.com>
Subject: Re: [PATCH v3 1/5] usb: gadget: Properly configure the device for remote wakeup
Date: Mon, 6 Feb 2023 12:30:14 -0800	[thread overview]
Message-ID: <2cd37948-8927-3a30-eb40-846d7ac8f0fd@quicinc.com> (raw)
In-Reply-To: <Y+Fft/vGfHxGrvC0@rowland.harvard.edu>



On 2/6/2023 12:14 PM, Alan Stern wrote:
> On Mon, Feb 06, 2023 at 11:13:22AM -0800, Elson Roy Serrao wrote:
>> The wakeup bit in the bmAttributes field indicates whether the device
>> is configured for remote wakeup. But this field should be allowed to
>> set only if the UDC supports such wakeup mechanism. So configure this
>> field based on UDC capability. Also inform the UDC whether the device
>> is configured for remote wakeup by implementing a gadget op.
>>
>> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com>
>> ---
>>   drivers/usb/gadget/composite.c | 24 +++++++++++++++++++++++-
>>   drivers/usb/gadget/udc/core.c  | 27 +++++++++++++++++++++++++++
>>   drivers/usb/gadget/udc/trace.h |  5 +++++
>>   include/linux/usb/gadget.h     |  8 ++++++++
>>   4 files changed, 63 insertions(+), 1 deletion(-)
> 
>> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
>> index dc3092c..05d1449 100644
>> --- a/include/linux/usb/gadget.h
>> +++ b/include/linux/usb/gadget.h
>> @@ -309,6 +309,7 @@ struct usb_udc;
>>   struct usb_gadget_ops {
>>   	int	(*get_frame)(struct usb_gadget *);
>>   	int	(*wakeup)(struct usb_gadget *);
>> +	int	(*set_remotewakeup)(struct usb_gadget *, int set);
>>   	int	(*set_selfpowered) (struct usb_gadget *, int is_selfpowered);
>>   	int	(*vbus_session) (struct usb_gadget *, int is_active);
>>   	int	(*vbus_draw) (struct usb_gadget *, unsigned mA);
>> @@ -383,6 +384,8 @@ struct usb_gadget_ops {
>>    * @connected: True if gadget is connected.
>>    * @lpm_capable: If the gadget max_speed is FULL or HIGH, this flag
>>    *	indicates that it supports LPM as per the LPM ECN & errata.
>> + * @rw_capable: True if gadget is capable of sending remote wakeup.
>> + * @rw_armed: True if gadget is armed by the host for remote wakeup.
> 
> Minor stylistic request: Could you choose something other than "rw" to
> start these field names?  For too many people, that abbreviation is
> firmly associated with "read/write".  Maybe just "wakeup"?
> 
> Alan Stern

Sure. Agree that "rw" is firmly associated with "read/write". Will just 
rename it to "wakeup"

Thanks
Elson

  reply	other threads:[~2023-02-06 20:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 19:13 [PATCH v3 0/5] Add function suspend/resume and remote wakeup support Elson Roy Serrao
2023-02-06 19:13 ` [PATCH v3 1/5] usb: gadget: Properly configure the device for remote wakeup Elson Roy Serrao
2023-02-06 20:14   ` Alan Stern
2023-02-06 20:30     ` Elson Serrao [this message]
2023-02-07  0:24   ` Thinh Nguyen
2023-02-06 19:13 ` [PATCH v3 2/5] usb: dwc3: Add remote wakeup handling Elson Roy Serrao
2023-02-07  0:48   ` Thinh Nguyen
2023-02-07 22:41     ` Elson Serrao
2023-02-08  1:10       ` Thinh Nguyen
2023-02-08  1:51         ` Elson Serrao
2023-02-08  2:11           ` Thinh Nguyen
2023-02-10  1:36             ` Elson Serrao
2023-02-10  2:27               ` Thinh Nguyen
2023-02-10  3:43                 ` Elson Serrao
2023-02-07 10:45   ` kernel test robot
2023-02-06 19:13 ` [PATCH v3 3/5] usb: gadget: Add function wakeup support Elson Roy Serrao
2023-02-07  1:14   ` Thinh Nguyen
2023-02-07  5:56   ` Greg KH
2023-02-06 19:13 ` [PATCH v3 4/5] usb: dwc3: Add function suspend and " Elson Roy Serrao
2023-02-06 19:13 ` [PATCH v3 5/5] usb: gadget: f_ecm: Add suspend/resume and remote " Elson Roy Serrao
2023-02-07  1:24 ` [PATCH v3 0/5] Add function " Thinh Nguyen
2023-02-07  2:14   ` Elson 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=2cd37948-8927-3a30-eb40-846d7ac8f0fd@quicinc.com \
    --to=quic_eserrao@quicinc.com \
    --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_jackp@quicinc.com \
    --cc=quic_wcheng@quicinc.com \
    --cc=stern@rowland.harvard.edu \
    /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