support USB 3.2 function remote wake

Greg Kroah-Hartman gregkh at linuxfoundation.org
Wed Jun 29 03:22:33 PDT 2022


On Wed, Jun 29, 2022 at 05:02:54PM +0800, Chunfeng Yun wrote:
> Hi,
> 
> I plan to support function remote wakeup on our usb3 device controller
> driver.

Is this based on dwc3 or some new silicon?

> A function may signal that it wants to exit from Function Suspend by
> sending a Function Wake Notification to the host, and the notification
> need knows the first interface number in this function.
> But the current gadget ops:
>     int (*wakeup)(struct usb_gadget *);
> does not provide information about interface number;

Why would the interface matter as you need to do this for the whole
device, not just one interface, right?

> There seems to be two ways:
> 1. add a new parameter as below,
>     int (*wakeup)(struct usb_gadget *, u8 intf);
> 2. add a new ops, such as,
>     int (*function_wakeup)(struct usb_gadget *, u8 intf);
> 
> Do you have any suggestions?

Look at what the existing ones do, I do not think you have different
suspend levels per USB interface, but rather the whole device.  Try it
and see.

thanks,

greg k-h



More information about the Linux-mediatek mailing list