linux/drivers/input/joystick
Anshul Dalal 52c4e5985a Input: driver for Adafruit Seesaw Gamepad
Adds a driver for a mini gamepad that communicates over i2c, the gamepad
has bidirectional thumb stick input and six buttons.

The gamepad chip utilizes the open framework from Adafruit called 'Seesaw'
to transmit the ADC data for the joystick and digital pin state for the
buttons. I have only implemented the functionality required to receive the
thumb stick and button state.

Steps in reading the gamepad state over i2c:
  1. Reset the registers
  2. Set the pin mode of the pins specified by the `BUTTON_MASK` to input
      `BUTTON_MASK`: A bit-map for the six digital pins internally
       connected to the joystick buttons.
  3. Enable internal pullup resistors for the `BUTTON_MASK`
  4. Bulk set the pin state HIGH for `BUTTON_MASK`
  5. Poll the device for button and joystick state done by:
      `seesaw_read_data(struct i2c_client *client, struct seesaw_data *data)`

Product page:
  https://www.adafruit.com/product/5743
Arduino driver:
  https://github.com/adafruit/Adafruit_Seesaw

Driver tested on RPi Zero 2W

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
Link: https://lore.kernel.org/r/20240106015111.882325-2-anshulusr@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-01-09 23:45:19 -08: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
adafruit-seesaw.c Input: driver for Adafruit Seesaw Gamepad 2024-01-09 23:45:19 -08: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 Input: as5011 - convert to GPIO descriptor 2023-12-13 21:26:13 -08: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_mp.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
grip.c input: drop empty comment blocks 2022-09-29 16:25:42 -07: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: driver for Adafruit Seesaw Gamepad 2024-01-09 23:45:19 -08:00
magellan.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
Makefile Input: driver for Adafruit Seesaw Gamepad 2024-01-09 23:45:19 -08: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: pxspad - fix unused data warning when force feedback not enabled 2022-12-07 13:29:05 -08:00
pxrc.c Input: pxrc - simplify mutex handling with guard macro 2023-12-09 22:25:23 -08:00
qwiic-joystick.c Input: Switch i2c drivers back to use .probe() 2023-05-17 09:59:11 -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 Input: walkera0701 - use module_parport_driver macro to simplify the code 2023-10-29 02:56:46 +00:00
warrior.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
xpad.c Input: xpad - remove usage of the deprecated ida_simple_xx() API 2023-12-11 18:52:09 -08:00
zhenhua.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00