udev: consider a device with BTN_TRIGGER_HAPPY as joystick
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 21 Jun 2017 23:11:15 +0000 (09:11 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 21 Jun 2017 23:19:25 +0000 (09:19 +1000)
commitc874fed3481638155a23601ce65985b2d0283e9c
treea43af2b98b25ab8999fc219c27d9a0bf4df3e67e
parentc9fb8c7c4a748a9205629f08d16afbb61d8e875b
udev: consider a device with BTN_TRIGGER_HAPPY as joystick

These buttons were added specifically for joysticks with lots of buttons, no
other device should be using them. See kernel commit
cf2f765f18960 "HID: handle joysticks with large number of buttons"

We only test for BTN_TRIGGER_HAPPY (an alias for BTN_TRIGGER_HAPPY1) here, a
device that sets buttons 2 and above but doesn't set 1 is considered buggy.

https://github.com/systemd/systemd/issues/6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/udev/udev-builtin-input_id.c