Input: xpad - add support for XBOX One Elite paddles
authorChristopher Crockett <chaorace@gmail.com>
Thu, 18 Aug 2022 15:44:11 +0000 (17:44 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Sep 2022 18:45:27 +0000 (11:45 -0700)
commite23c69e3324892f7420686b3aaa0403df6cf152c
treec3d1575231293fb2c50b65f63fd7c32e13a686c4
parentda7e2128b869a1315b8919ded42b799076279cda
Input: xpad - add support for XBOX One Elite paddles

An effort has been made to support every official model and firmware
version I could track down info on. The following controllers _should_
have working paddles with this PR:
- Xbox Elite (**untested**)
- Xbox Elite Series 2 on early firmwares (**untested**)
- Xbox Elite Series 2 on v4 firmwares (Tested v4.8.1908.0)
- Xbox Elite Series 2 on v5 pre-BLE firmwares (**untested**)
- Xbox Elite Series 2 on v5 post-BLE firmwares (Tested v5.13.3143.0)

This patch also introduces correct handling for the Elite 1 controller
and properly suppresses paddle inputs when using a custom profile slot.

Starting with firmware v5.11, certain inputs for the Elite 2 were moved
to an extra packet that is not enabled by default.

We must first manually enable this extra packet in order to correctly
process paddle input data with these later firmwares.

Signed-off-by: Christopher Crockett <chaorace@gmail.com>
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Tested-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20220818154411.510308-5-rojtberg@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c