[PATCH] Input: joydev - Recognize joysticks with Z axis as joysticks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 drivers/input/joydev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 5d11fea..f3135ae 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) },
 	},
 	{
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux