提交 9fb6de1b 编写于 作者: V Ville Ranki 提交者: Dmitry Torokhov

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: NVille Ranki <ville.ranki@iki.fi>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 4af2ff91
...@@ -946,6 +946,12 @@ static const struct input_device_id joydev_ids[] = { ...@@ -946,6 +946,12 @@ static const struct input_device_id joydev_ids[] = {
.evbit = { BIT_MASK(EV_ABS) }, .evbit = { BIT_MASK(EV_ABS) },
.absbit = { BIT_MASK(ABS_X) }, .absbit = { BIT_MASK(ABS_X) },
}, },
{
.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 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
INPUT_DEVICE_ID_MATCH_ABSBIT, INPUT_DEVICE_ID_MATCH_ABSBIT,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册