Re: [PATCH] HID: fix incorrect handling of devices with high button count
From: Jiri Kosina <hidden>
Date: 2012-10-31 15:04:12
From: Jiri Kosina <hidden>
Date: 2012-10-31 15:04:12
yOn Tue, 30 Oct 2012, Dmitry Torokhov wrote:
On Mon, Oct 29, 2012 at 02:29:30PM +0100, Ingo Ruhnke wrote:quoted
Button names for USB gamepads are currently assigned incorrectly, as the evdev code assigned to buttons is "BTN_GAMEPAD + code", which on devices with more then 16 buttons bleeds over into button names reserved for graphic tablets (BTN_TOOL_PEN, etc.). This causes problems further down the line as the device are now no longer detected as joystick. This patch fixes that by assigning buttons outside the range to BTN_TRIGGER_HAPPY (as is already the case for USB joysticks). Furthermore this patch corrects the assignment to BTN_TRIGGER_HAPPY, as currently the first button over 16 is assigned to BTN_TRIGGER_HAPPY17 (i.e. BTN_TRIGGER_HAPPY+0x10) not BTN_TRIGGER_HAPPY. Signed-off-by: Ingo Ruhnke <redacted>Makes sense. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Good catch indeed. Applied, thanks! -- Jiri Kosina SUSE Labs