]> git.karo-electronics.de Git - linux-beck.git/commit
HID: handle joysticks with large number of buttons
authorJiri Kosina <jkosina@suse.cz>
Mon, 4 Jan 2010 11:20:56 +0000 (12:20 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 4 Jan 2010 11:20:56 +0000 (12:20 +0100)
commitcf2f765f1896064e34c6f0f2ef896ff058dd5c06
tree5bb51af0bfcd5f72a740dee0c8b97ae358643d05
parent92688c0c3c1c9e2daf705d307e8fda1b5a180d26
HID: handle joysticks with large number of buttons

Current HID code doesn't properly handle HID joysticks which have
larger number of buttons than what fits into current range reserved
for BTN_JOYSTICK.

One such joystick reported to not work properly is Saitek X52 Pro
Flight System.

We can't extend the range to fit more buttons in, because of backwards
compatibility reasons.

Therefore this patch introduces a new BTN_TRIGGER_HAPPY range, and
uses these to map the buttons which are over BTN_JOYSTICK limit.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [for the input.h part]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c
include/linux/input.h