Hi Alan, I do not quite understand your second comment. But I realize now I was not thinking of the big picture earlier. The UDC needs to send the actual wakeup signal when prompted by the usb_gadget_wakeup(). Since the raspberry pi I am using only supports the dwc2 driver, and the dwc2's usb_gadget_ops does not have the wakeup function it looks like I just need different hardware that uses a dwc3 UDC. Unless you know of something else. On Mon, Jul 1, 2024 at 2:05 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > On Sun, Jun 30, 2024 at 11:22:12PM -0400, Darrion Ramos wrote: > > (resending in plain text) Hello all, thank you for all your > > information. It has been very helpful. I was able to implement the > > usb_gadget_wakeup() call and set the USB_CONFIG_ATT_WAKEUP bit. > > Setting the bit did create the /sys/bus/usb/devices/.../power wakeup > > files that I noticed were missing. Unfortunately usb_gadget_wakeup() > > calls gadget->ops functions to send the signal and these need to be > > implemented as well. From my understanding I need to translate the > > __dwc3_gadget_wakeup() function in linux/drivers/usb/dwc3/gadget.c > > into raw_gadget.c. > > No, that's not right. All raw_gadget.c has to do is call > usb_gadget_wakeup(). > > The dwc3 gadget driver _does_ define a wakeup member of gadget->ops; it > points to the dwc3_gadget_wakeup() routine, which definitely is > implemented. > > > I have not been able to properly look through the > > __dwc3_gadget_wakeup() function yet, Andrey is it feasible to write > > that function in the raw_gadget currently or is there something else I > > am missing where I do not need that ops function in raw_gadget? > > You're missing something. Think of it this way: If raw_gadget was > running on some device other than a Raspberry Pi, with a UDC controller > that wasn't DWC3, then it certainly would have no need to do anything > connected with __dwc3_gadget_wakeup(). The same is true when it _is_ > running on a Raspberry Pi. > > Alan Stern -- -Thanks, Darrion