summaryrefslogtreecommitdiffstats
path: root/drivers/input/joydev.c
diff options
context:
space:
mode:
authorVille Ranki <ville.ranki@iki.fi>2016-09-15 15:31:27 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-09-26 20:03:06 -0700
commit9fb6de1b0bf4ec11573b76059da3c3b39ac7f2ff (patch)
treeef62417c2f3210a0724d31700b3adc5f222dc1a2 /drivers/input/joydev.c
parent4af2ff91ec3f42b538a65cf12df5f9faf6aaa914 (diff)
downloadlinux-9fb6de1b0bf4ec11573b76059da3c3b39ac7f2ff.tar.bz2
Input: joydev - recognize devices with Z axis as joysticks
Current implementation of joydev's input_device_id table recognizes only devices with ABS_X, ABS_WHEEL or ABS_THROTTLE axes as joysticks. There are joystick devices that do not have those axes, for example TRC Rudder device. The device in question has ABS_Z, ABS_RX and ABS_RY axes causing it not being detected as joystick. This patch adds ABS_Z to the input_device_id list allowing devices with ABS_Z axis to be detected correctly. Signed-off-by: Ville Ranki <ville.ranki@iki.fi> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r--drivers/input/joydev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 5d11fea3c8ec..f3135ae22df4 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -950,6 +950,12 @@ static const struct input_device_id joydev_ids[] = {
.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
INPUT_DEVICE_ID_MATCH_ABSBIT,
.evbit = { BIT_MASK(EV_ABS) },
+ .absbit = { BIT_MASK(ABS_Z) },
+ },
+ {
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+ INPUT_DEVICE_ID_MATCH_ABSBIT,
+ .evbit = { BIT_MASK(EV_ABS) },
.absbit = { BIT_MASK(ABS_WHEEL) },
},
{