kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Matt Silva <msilva-dev@protonmail.com>
Cc: "kernelnewbies@kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Subject: Re: Supporting a USB HID device interface that is missing a interrupt input endpoint
Date: Thu, 19 May 2022 09:38:53 +0200	[thread overview]
Message-ID: <YoX0Dd/VmkzVmmRt@kroah.com> (raw)
In-Reply-To: <vu8STBurL5SbEdlkJg0_YTRyy2c0SbglHzFbvYLW7C4N_Ui0pglwNwSS-300k7vuixyJKhNvmBaNJeo0qhJQRInsBwazfGPnV2XSMoERWeU=@protonmail.com>

On Wed, May 18, 2022 at 10:04:14PM +0000, Matt Silva wrote:
> Hi, Greg. Thanks for the response, I really appreciate it! Awesome to get a reply from the man himself.
> 
> Probably wasn't the best from me to refer to the Windows software as a driver. As far as I can tell it
> is just a userspace application using the Windows interface to communicate, as you described below.
> 
> From my understanding, the device intends to operate as a HID device (unless your comment below about
> all devices claiming to be HID when they're not on Windows applies here), it even provides a HID descriptor
> with usages to Windows. It's also my understanding that for certain devices with "quirks" that don't
> operate normally, the Linux kernel has quirks that allow these edge case devices to operate as intended.

But this really is not a HID device, right?

What is the HID descriptor that it prints out?  Can you use the
'usbhid-dump' program that is part of the usbutils package to show the
report descriptors?

> So while your feedback about using libusb for OpenRGB in userspace definitely doable, I was curious if this device
> would benifit from having support for its quirk added to the kernel so that it can be exposed in userspace
> as it intends, rather than just solving my specific problem for OpenRGB. As far as I can tell, the
> interface never communicated to directly through its single OUT endpoint. The communication is through
> the control endpoint via a SET REPORT request. I did some reading and you are correct, HID class
> interfaces require a interrupt in endpoint. But like I said, the fact that it only communicates via the
> control endpoint made me think that maybe this requirement may not be necessary for the interface
> to function as intended.

If this is all going through a "fake" SET REPORT command, in a
vendor-specific way, I would just recommend doing it all from userspace
using libusb like OpenRGB does for other devices.  No need to mess with
the kernel at all for a fake HID device like this.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2022-05-19  7:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 23:40 Supporting a USB HID device interface that is missing a interrupt input endpoint Matt Silva
2022-05-17  6:18 ` Greg KH
2022-05-18 22:04   ` Matt Silva
2022-05-19  7:38     ` Greg KH [this message]
2022-05-26 20:06       ` Matt Silva
2022-05-27  6:13         ` Greg KH

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=YoX0Dd/VmkzVmmRt@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=msilva-dev@protonmail.com \
    /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 NNTP newsgroup(s).