Re: [PATCH] 2.6: joydev is too eager claiming input devices
From: Dmitry Torokhov
Date: Thu Sep 25 2003 - 00:13:41 EST
On Wednesday 24 September 2003 10:03 pm, Dan wrote:
> This patch seems to have broken my Logitech Wingman Action usb gamepad,
> it shows as connected but isn't claimed by joydev... another joystick I
> have (saitek cyborg usb gold) works fine, and the logitech worked in
> previous 2.5/6.x kernels so I'm guessing this patch is to blame, I'm on
> 2.6.0-test5-mm1, is there any info from the joystick I can provide you
> with to fix it? I'm not sure where to look, thanks -Dan
>
Could you please try the following patch (it is incremental against the
previous one and should apply to the -mm)
--- 2.6.0-test4/drivers/input/joydev.c 2003-09-25 00:06:52.000000000 -0500
+++ linux-2.6.0-test4/drivers/input/joydev.c 2003-09-25 00:02:17.000000000 -0500
@@ -499,7 +499,28 @@
.evbit = { BIT(EV_ABS) },
.absbit = { BIT(ABS_RX), BIT(ABS_RY) },
}, /* magellan and some others report only MISC buttons but we can identify
- them by using special axis auch as RX/RY, ABS_WHEEL or ABS_THROTTLE */
+ them by using special axis auch as RX/RY, HATnX/HATnY, ABS_WHEEL or
+ ABS_THROTTLE */
+ {
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+ .evbit = { BIT(EV_ABS) },
+ .absbit = { BIT(ABS_HAT0X), BIT(ABS_HAT0Y) },
+ },
+ {
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+ .evbit = { BIT(EV_ABS) },
+ .absbit = { BIT(ABS_HAT1X), BIT(ABS_HAT1Y) },
+ },
+ {
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+ .evbit = { BIT(EV_ABS) },
+ .absbit = { BIT(ABS_HAT2X), BIT(ABS_HAT2Y) },
+ },
+ {
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+ .evbit = { BIT(EV_ABS) },
+ .absbit = { BIT(ABS_HAT3X), BIT(ABS_HAT3Y) },
+ },
{
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
.evbit = { BIT(EV_ABS) },
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/