60-persistent-input.rules 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # do not edit this file, it will be overwritten on update
  2. ACTION=="remove", GOTO="persistent_input_end"
  3. SUBSYSTEM!="input", GOTO="persistent_input_end"
  4. SUBSYSTEMS=="bluetooth", ENV{ID_BUS}="bluetooth", GOTO="persistent_input_end"
  5. # Bluetooth devices don't always have the bluetooth subsystem
  6. ATTRS{id/bustype}=="0005", ENV{ID_BUS}="bluetooth", GOTO="persistent_input_end"
  7. SUBSYSTEMS=="rmi4", ENV{ID_BUS}="rmi"
  8. SUBSYSTEMS=="serio", ENV{ID_BUS}="i8042"
  9. SUBSYSTEMS=="usb", ENV{ID_BUS}=="", IMPORT{builtin}="usb_id"
  10. # determine class name for persistent symlinks
  11. ENV{ID_INPUT_KEYBOARD}=="?*", ENV{.INPUT_CLASS}="kbd"
  12. ENV{ID_INPUT_MOUSE}=="?*", ENV{.INPUT_CLASS}="mouse"
  13. ENV{ID_INPUT_TOUCHPAD}=="?*", ENV{.INPUT_CLASS}="mouse"
  14. ENV{ID_INPUT_TABLET}=="?*", ENV{.INPUT_CLASS}="mouse"
  15. ENV{ID_INPUT_JOYSTICK}=="?*", ENV{.INPUT_CLASS}="joystick"
  16. DRIVERS=="pcspkr", ENV{.INPUT_CLASS}="spkr"
  17. ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{.INPUT_CLASS}="ir"
  18. # fill empty serial number
  19. ENV{.INPUT_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
  20. # by-id links
  21. KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{.INPUT_CLASS}"
  22. KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-$env{.INPUT_CLASS}"
  23. KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{.INPUT_CLASS}"
  24. KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-event-$env{.INPUT_CLASS}"
  25. # allow empty class for USB devices, by appending the interface number
  26. SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumber}=="?*", \
  27. SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}"
  28. # by-path
  29. SUBSYSTEMS=="pci|usb|platform|acpi", IMPORT{builtin}="path_id"
  30. ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{.INPUT_CLASS}"
  31. ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{.INPUT_CLASS}"
  32. # allow empty class for platform and usb devices; platform supports only a single interface that way
  33. SUBSYSTEMS=="usb|platform", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \
  34. SYMLINK+="input/by-path/$env{ID_PATH}-event"
  35. LABEL="persistent_input_end"