chiark / gitweb /
rules: exclude digitizers from joystick class
authorAnssi Hannula <anssi.hannula@iki.fi>
Mon, 27 Jul 2009 20:56:55 +0000 (23:56 +0300)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 5 Aug 2009 03:07:15 +0000 (05:07 +0200)
Exclude digitizers and similar devices from ID_CLASS joystick by
checking modalias for BTN_DIGI.

This was also done for linux kernel joydev interface in linux commit
d07a9cba6be5c0e947afc1014b5a62182a86f1f1.

rules/rules.d/60-persistent-input.rules

index c733ad5..c65517b 100644 (file)
@@ -16,8 +16,8 @@ DRIVERS=="atkbd", ENV{ID_CLASS}="kbd", GOTO="serial"
 DRIVERS=="psmouse", ENV{ID_CLASS}="mouse", GOTO="serial"
 ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir", GOTO="serial"
 
-# joystick (ABS_X || ABS_WHEEL || ABS_THROTTLE) && !BTN_TOUCH
-ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", \
+# joystick (ABS_X || ABS_WHEEL || ABS_THROTTLE) && !BTN_TOUCH && !BTN_DIGI
+ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14[0A],*r*", \
   ENV{ID_CLASS}="joystick", GOTO="serial"
 
 # fill empty serial number