Re: Remote wake up in gadget drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 28, 2024 at 08:25:22PM +0200, Andrey Konovalov wrote:
> Darrion, you can try adding a new Raw Gadget ioctl that calls
> usb_gadget_wakeup() and see if that works for you. This shouldn't be
> hard: just add another handler to raw_ioctl().
> 
> And you probably also still need to set the USB_CONFIG_ATT_WAKEUP bit
> in the USB config descriptor in the Raw Gadget keyboard example.
> 
> For a proper remote wake up support, I think we would also need
> another two ioctls: one for checking whether the UDC supports remote
> wake up and one for checking whether the device is suspended (the
> former can be combined with reporting other UDC capabilities:
> https://github.com/xairy/raw-gadget/issues/41).

While the wakeup_capable and wakeup_armed bitflags are defined in 
linux/usb/gadget.h, it doesn't look like any of the UDC drivers 
implement them.  So it may not be possible to see whether the UDC 
supports remote wakeup (but it appears that most of them do).

Checking whether the device is suspended is subject to races.  The 
result would not be fully reliable.

Alan Stern




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux