From f48ee7e25bf2e2fdd15f8c27be7c81a09064e755 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Fri, 9 Oct 2015 17:03:25 -0400 Subject: [PATCH] hwdb: fix udev rule for uhid devices 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 --- hwdb/70-libratbag-mouse.rules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hwdb/70-libratbag-mouse.rules b/hwdb/70-libratbag-mouse.rules index 44e54584..64ef05d3 100644 --- a/hwdb/70-libratbag-mouse.rules +++ b/hwdb/70-libratbag-mouse.rules @@ -11,6 +11,12 @@ KERNELS=="input*", ENV{ID_BUS}=="usb", \ 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"