From: Thomas Guyot-Sionnest <tguyot@gmail.com>
To: linux-doc@vger.kernel.org
Cc: Thomas Guyot-Sionnest <tguyot@gmail.com>
Subject: [PATCH] hiddev: Clarify minor device numbering
Date: Mon, 7 Mar 2022 05:30:48 -0500 [thread overview]
Message-ID: <20220307103048.44159-1-tguyot@gmail.com> (raw)
USB hiddev minor device numbering can be dynamic, in which case the
minor be any number from 0 to 255. This is defined in drivers/hid/usbhid/hiddev.c.
Signed-off-by: Thomas Guyot-Sionnest <tguyot@gmail.com>
---
Documentation/hid/hiddev.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/hid/hiddev.rst b/Documentation/hid/hiddev.rst
index caebc6266603..9647210cdd34 100644
--- a/Documentation/hid/hiddev.rst
+++ b/Documentation/hid/hiddev.rst
@@ -54,6 +54,13 @@ you need the following commands::
mknod /dev/usb/hiddev14 c 180 110
mknod /dev/usb/hiddev15 c 180 111
+When using CONFIG_USB_DYNAMIC_MINORS you should let udev create these
+devices automatically. They will have a minor ranging from 0 to 255.
+You can find the actual major:minor in the /sys tree under the usbmisc
+class. You can list them with::
+
+ grep -H . /sys/class/usbmisc/hiddev*/dev
+
So you point your hiddev compliant user-space program at the correct
interface for your device, and it all just works.
--
2.30.2
reply other threads:[~2022-03-07 11:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220307103048.44159-1-tguyot@gmail.com \
--to=tguyot@gmail.com \
--cc=linux-doc@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 NNTP newsgroup(s).