]> git.baikalelectronics.ru Git - kernel.git/commit
Input: xpad - remove spurious events of wireless xpad 360 controller
authorClement Calmels <clement.calmels@free.fr>
Sun, 13 Dec 2015 05:20:11 +0000 (21:20 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Dec 2015 01:11:29 +0000 (17:11 -0800)
commit8edd47b76b55baa742d8b7dc25cbc6b3746f4b7e
tree15a0e90518ebec955a52ef79e7a541bde3267079
parent8a4e66d6876ca2806a1603b37b11e6302e642c93
Input: xpad - remove spurious events of wireless xpad 360 controller

When powering up a wireless xbox 360 controller, some wrong joystick
events are generated. It is annoying because, for example, it makes
unwanted moves in Steam big picture mode's menu.

When my controller is powering up, this packet is received by the
driver:
00000000: 00 0f 00 f0 00 cc ff cf 8b e0 86 6a 68 f0 00 20  ...........jh..
00000010: 13 e3 20 1d 30 03 40 01 50 01 ff ff              .. .0.@.P...

According to xboxdrv userspace driver source code, this packet is only
dumping a serial id and should not be interpreted as joystick events.
This issue can be easily seen with jstest:
$ jstest --event /dev/input/js0

This patch only adds a way to filter out this "serial" packet and as a
result it removes the spurous events.

Signed-off-by: Clement Calmels <clement.calmels@free.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c