forked from drath/libratbag
The MX Master is using BLE to connect, and so the system sees it as a uhid device. The current rule ignores it because uhid devices do not have the ID_BUS set. Fix that by detecting uhid devices and put the bus in the hwdb accordingly. For completeness, also add usb through uhid so we can also replay devices and test their drivers. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
ACTION=="remove", GOTO="mouse_end"
|
|
KERNEL!="event*", GOTO="mouse_end"
|
|
ENV{ID_INPUT}=="", GOTO="mouse_end"
|
|
|
|
# mouse:<subsystem>:v<vid>p<pid>:name:<name>:*
|
|
KERNELS=="input*", ENV{ID_BUS}=="usb", \
|
|
IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="mouse_end"
|
|
KERNELS=="input*", ENV{ID_BUS}=="bluetooth", \
|
|
IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="mouse_end"
|
|
KERNELS=="input*", ENV{DEVPATH}=="/devices/virtual/misc/uhid/0003:*", \
|
|
IMPORT{builtin}="hwdb 'mouse:usb:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="mouse_end"
|
|
KERNELS=="input*", ENV{DEVPATH}=="/devices/virtual/misc/uhid/0005:*", \
|
|
IMPORT{builtin}="hwdb 'mouse:bluetooth:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="mouse_end"
|
|
DRIVERS=="psmouse", SUBSYSTEMS=="serio", \
|
|
IMPORT{builtin}="hwdb 'mouse:ps2::name:$attr{device/name}:'", \
|
|
GOTO="mouse_end"
|
|
|
|
LABEL="mouse_end"
|