Re: [PATCH v1 2/3] usb: gadget: Use get_status callback to set remote wakeup capability

From: Thinh Nguyen
Date: Wed Apr 09 2025 - 18:12:44 EST


On Wed, Apr 09, 2025, Thinh Nguyen wrote:
> On Wed, Apr 09, 2025, Prashanth K wrote:
> >
> >
> > On 09-04-25 06:25 am, Thinh Nguyen wrote:
> > >
> > > Not at the gadget level, I mean to create a configfs attribute common
> > > across different functions to allow the user to enable/disable the
> > > function wakeup capability via the configfs when you setup the function.
> > >
> > > What do you think?
> > >
> > > Thanks,
> > > Thinh
> >
> > Thats a good idea, in fact I had the same thought. But thought of doing
> > it later since its beyond the scope of this patch/series.
>
> The way you have it done now forces a usb3x function driver to implement
> f->get_status to be able to respond with function wakeup capable.
> Previously, we automatically enable function wakeup capability for all
> functions if the USB_CONFIG_ATT_WAKEUP is set.
>
> Arguably, this can cause a regression for remote capable devices to
> operate in usb3 speeds.

Sorry typos: I mean arguably, this can cause a regression for remote
wake capable devices to perform remote wakeup in usb3 speed.

BR,
Thinh

>
> >
> > We can add a configfs attribute to enable/disable FUNC_RW_CAP, and
> > functions can return get_status() based on the attribute.
> >
>
> That would be great! This would fit this series perfectly. Let me know
> if there's an issue.
>
> Thanks,
> Thinh