linux/drivers/input/joystick
Brenton Simpson 1c57e5ef85 Input: xpad - add Lenovo Legion Go controllers
[ Upstream commit 80441f76ee ]

The Lenovo Legion Go is a handheld gaming system, similar to a Steam Deck.
It has a gamepad (including rear paddles), 3 gyroscopes, a trackpad,
volume buttons, a power button, and 2 LED ring lights.

The Legion Go firmware presents these controls as a USB hub with various
devices attached.  In its default state, the gamepad is presented as an
Xbox controller connected to this hub.  (By holding a combination of
buttons, it can be changed to use the older DirectInput API.)

This patch teaches the existing Xbox controller module `xpad` to bind to
the controller in the Legion Go, which enables support for the:

- directional pad,
- analog sticks (including clicks),
- X, Y, A, B,
- start and select (or menu and capture),
- shoulder buttons, and
- rumble.

The trackpad, touchscreen, volume controls, and power button are already
supported via existing kernel modules.  Two of the face buttons, the
gyroscopes, rear paddles, and LEDs are not.

After this patch lands, the Legion Go will be mostly functional in Linux,
out-of-the-box.  The various components of the USB hub can be synthesized
into a single logical controller (including the additional buttons) in
userspace with [Handheld Daemon](https://github.com/hhd-dev/hhd), which
makes the Go fully functional.

Signed-off-by: Brenton Simpson <appsforartists@google.com>
Link: https://lore.kernel.org/r/20240118183546.418064-1-appsforartists@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-03-01 13:26:27 +01:00
..
iforce Input: iforce - invert valid length check when fetching device IDs 2022-11-07 10:28:58 -08:00
a3d.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
adc-joystick.c Input: adc-joystick - add polled input device support 2022-08-17 12:32:51 -07:00
adi.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
amijoy.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
analog.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
as5011.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
cobra.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
db9.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
fsia6b.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
gamecon.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
gf2k.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
grip.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
grip_mp.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
guillemot.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
interact.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
joydump.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
Kconfig Input: joystick - fix Kconfig warning for JOYSTICK_ADC 2022-12-31 13:32:09 +01:00
magellan.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
Makefile Input: add Raspberry Pi Sense HAT joystick driver 2022-04-24 18:25:02 -07:00
maplecontrol.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
n64joy.c Input: n64joy - fix return value check in n64joy_probe() 2021-03-09 21:41:28 -08:00
psxpad-spi.c Input: psxpad-spi - switch to using polled mode of input devices 2019-10-29 17:13:36 -07:00
pxrc.c Input: pxrc - flatten probe code 2018-07-25 19:04:19 +00:00
qwiic-joystick.c Input: add SparkFun Qwiic Joystick driver 2021-06-18 21:28:20 -07:00
sensehat-joystick.c Input: sensehat-joystick - remove unnecessary error message 2022-06-28 22:50:48 -07:00
sidewinder.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
spaceball.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
spaceorb.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
stinger.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
tmdc.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
turbografx.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
twidjoy.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
walkera0701.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
warrior.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
xpad.c Input: xpad - add Lenovo Legion Go controllers 2024-03-01 13:26:27 +01:00
zhenhua.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00