Re: Seeking Assistance: Implementing USB Device Suspend/Resume in User Space Driver

Muni Sekhar <[email protected]>
Newsgroups gmane.linux.kernel.kernelnewbies,gmane.linux.usb.general
Message-ID <CAHhAz+hgmXZsbr6pBTWb70rv6Ob803eG4sCKOW0b9xVpTjTovg@mail.gmail.com>
On Mon, 6 May, 2024, 7:59 pm Alan Stern, <[email protected]> wrote:

> On Mon, May 06, 2024 at 04:44:30PM +0530, Muni Sekhar wrote:
> > Dear Linux USB Subsystem Community,
> >
> > I hope this email finds you well. We are currently working on a USB
> > device driver in the Linux kernel space, which supports the
> > suspend/resume functionality for a USB device using the struct
> > usb_driver's .suspend and .resume callbacks.
> >
> >
> > In our driver code, we perform a check to determine if the device has
> > remote wakeup capability. If the device supports remote wakeup, we
> > enable the device's autosuspend mode by setting the struct
> > usb_device->dev.power.autosuspend_delay parameter and then calling
> > usb_enable_autosuspend().
> >
> >
> > Similarly, to resume the suspended device, we expose an API to user
> > space via IOCTL. In this process, we set struct
> > usb_device->dev.power.autosuspend_delay to -1 and then call
> > usb_disable_autosuspend().
> >
> >
> > While we have successfully converted most of the USB device driver
> > functionality from kernel space to user space using libusb, we are now
> > seeking guidance on how to implement USB device suspend/resume in user
> > space. Specifically, we would like to know if libusb provides support
> > for achieving the suspend/resume functionality mentioned above.
> > Additionally, any insights or suggestions on how to accomplish this
> > task would be greatly appreciated.
>
> Your question is about libusb, right?  So you'll get better answers if
> you post it on the libusb mailing list rather than the linux-usb mailing
> list.
>
Can USB device suspend\resume be implemented in user space driver using
software other than libusb?

Alan Stern
>
> > It's worth mentioning that our USB device driver also supports
> > Bulk\Coontrol I/O transfers and other functionalities.
> >
> >
> > Thank you in advance for any assistance you can provide. I look
> > forward to your valuable inputs and recommendations.
> >
> >
> > --
> > Thanks,
> > Sekhar
> >
>

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.