Input: xpad - fix Share button on Xbox One controllers
authorVicki Pfau <vi@endrift.com>
Sun, 11 May 2025 05:59:25 +0000 (22:59 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 11 May 2025 06:08:17 +0000 (23:08 -0700)
commit4ef46367073b107ec22f46fe5f12176e87c238e8
tree3f07007dea1d7f1c24455c9631a286a624943118
parentd05a424bea9aa3435009d5c462055008cc1545d8
Input: xpad - fix Share button on Xbox One controllers

The Share button, if present, is always one of two offsets from the end of the
file, depending on the presence of a specific interface. As we lack parsing for
the identify packet we can't automatically determine the presence of that
interface, but we can hardcode which of these offsets is correct for a given
controller.

More controllers are probably fixable by adding the MAP_SHARE_BUTTON in the
future, but for now I only added the ones that I have the ability to test
directly.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/20250328234345.989761-2-vi@endrift.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c