* [PATCH] hiddev: Clarify minor device numbering
@ 2022-03-07 10:30 Thomas Guyot-Sionnest
0 siblings, 0 replies; only message in thread
From: Thomas Guyot-Sionnest @ 2022-03-07 10:30 UTC (permalink / raw)
To: linux-doc; +Cc: Thomas Guyot-Sionnest
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-07 11:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 10:30 [PATCH] hiddev: Clarify minor device numbering Thomas Guyot-Sionnest
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).