Skip to content

Commit 9fb6de1

Browse files
vrankidtor
authored andcommitted
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>
1 parent 4af2ff9 commit 9fb6de1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/input/joydev.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,12 @@ static const struct input_device_id joydev_ids[] = {
946946
.evbit = { BIT_MASK(EV_ABS) },
947947
.absbit = { BIT_MASK(ABS_X) },
948948
},
949+
{
950+
.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
951+
INPUT_DEVICE_ID_MATCH_ABSBIT,
952+
.evbit = { BIT_MASK(EV_ABS) },
953+
.absbit = { BIT_MASK(ABS_Z) },
954+
},
949955
{
950956
.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
951957
INPUT_DEVICE_ID_MATCH_ABSBIT,

0 commit comments

Comments
 (0)