Linux-USB Archive mirror
 help / color / mirror / Atom feed
From: Muni Sekhar <munisekharrms@gmail.com>
To: linux-usb@vger.kernel.org
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Seeking Assistance: Implementing USB Device Suspend/Resume in User Space Driver
Date: Mon, 6 May 2024 16:44:30 +0530	[thread overview]
Message-ID: <CAHhAz+g=7pocghMX-Yu=jg0jxnpfwa3+ZmmdLP_pVuXmWLJ=aw@mail.gmail.com> (raw)

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.


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

             reply	other threads:[~2024-05-06 11:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 11:14 Muni Sekhar [this message]
2024-05-06 14:29 ` Seeking Assistance: Implementing USB Device Suspend/Resume in User Space Driver Alan Stern
2024-05-06 16:14   ` Muni Sekhar
2024-05-06 19:50     ` Alan Stern
2024-05-07 11:44       ` Muni Sekhar
2024-05-07 14:20         ` Alan Stern
2024-05-07 16:38           ` Muni Sekhar
2024-05-07 17:51             ` Alan Stern
2024-05-08  5:38               ` Muni Sekhar
2024-05-08 13:58                 ` Alan Stern
2024-05-13 17:44         ` Muni Sekhar
2024-05-13 18:09           ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHhAz+g=7pocghMX-Yu=jg0jxnpfwa3+ZmmdLP_pVuXmWLJ=aw@mail.gmail.com' \
    --to=munisekharrms@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).