android_kernel_xiaomi_sm8350/drivers/input
Anssi Hannula a0979923d7 Input: xpad - fix dpad handling of unknown devices
For devices not specifically listed in xpad.c, xpad->dpad_mapping
is initially set to MAP_DPAD_UNKNOWN. In xpad_probe() it gets changed
to either MAP_DPAD_TO_BUTTONS or MAP_DPAD_TO_AXES, depending on the
module parameter dpad_to_buttons.

However, MAP_DPAD_UNKNOWN is defined as -1, while the field is u8.
This results in actual value of 255, causing the MAP_DPAD_UNKNOWN
check in xpad_probe() to fail.
Fix that by defining MAP_DPAD_UNKNOWN as 2 instead.

Also, setting module parameter dpad_to_buttons to 1 should obviously
map dpad to buttons, while the default behaviour (0) should be to map
dpad to axes. However, dpad_to_buttons is directly assigned to
xpad->dpad_mapping, and as MAP_DPAD_TO_BUTTONS is 0, the actual
behaviour is reversed.
Fix that by negating dpad_to_buttons in assignment.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-03 16:18:10 -04:00
..
gameport gameport: remove duplicate include 2008-02-03 16:03:50 +02:00
joystick Input: xpad - fix dpad handling of unknown devices 2008-04-03 16:18:10 -04:00
keyboard Input: pxa27x - fix keypad KPC macros 2008-03-20 09:48:14 -04:00
misc ixp4xx-beeper: add MODULE_ALIAS 2008-03-28 14:45:22 -07:00
mouse Input: ALPS - fix forward/back buttons reversed on Acer 5520-5290 2008-03-18 00:39:55 -04:00
serio Input: i8042 - add SNI RM support 2008-03-14 11:54:06 -04:00
tablet Input: wacom - add support for Bamboo1, BambooFun, and Cintiq 12WX 2008-03-14 11:54:38 -04:00
touchscreen Input: ads7846 - fix uninitialized var warning 2008-03-14 11:54:13 -04:00
apm-power.c Input: apm-power - fix crash when unloading modules 2008-03-24 11:02:06 -04:00
evbug.c
evdev.c Input: make sure input interfaces pin parent input devices 2008-04-01 00:22:53 -04:00
ff-core.c
ff-memless.c
fixp-arith.h changed email 2007-10-20 00:47:32 +02:00
input-polldev.c Input: remove private member from input_dev structure 2008-04-02 00:41:00 -04:00
input.c Input: constify function pointer tables (seq_operations) 2008-01-31 00:43:32 -05:00
joydev.c Input: make sure input interfaces pin parent input devices 2008-04-01 00:22:53 -04:00
Kconfig Input: add input event to APM event bridge 2008-01-30 16:33:59 -05:00
Makefile Input: add input event to APM event bridge 2008-01-30 16:33:59 -05:00
mousedev.c Input: make sure input interfaces pin parent input devices 2008-04-01 00:22:53 -04:00