summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2011-02-15 13:06:18 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2011-02-15 13:06:18 +0100
commit5e9eb156c003dc7f8f92287bfad0251d6c5d0ef9 (patch)
treeba4ac3447ca55a73d4031bcd5253fc7e0e5a7a84
parent0852794347827d3135882c1496a233407ba0ed2a (diff)
60-persistent-input.rules: Support multiple interfaces
Create /dev/input/by-id symlinks containing the USB interface number so that each interface in a multi-interface USB input device gets its own symlink. Thanks to a7x <ubuntu-a7x@scientician.org>! https://launchpad.net/bugs/626449
-rw-r--r--rules/rules.d/60-persistent-input.rules2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules
index 634c4dbeaf..685e57e15b 100644
--- a/rules/rules.d/60-persistent-input.rules
+++ b/rules/rules.d/60-persistent-input.rules
@@ -21,7 +21,9 @@ ENV{.INPUT_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
# by-id links
KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{.INPUT_CLASS}"
+KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-$env{.INPUT_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{.INPUT_CLASS}"
+KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-event-$env{.INPUT_CLASS}"
# allow empty class for USB devices, by appending the interface number
SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumber}=="?*", \
SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}"