HID: nintendo: add support for nso controllers
authorRyan McClelland <rymcclel@gmail.com>
Mon, 4 Dec 2023 08:17:21 +0000 (00:17 -0800)
committerJiri Kosina <jkosina@suse.com>
Tue, 12 Dec 2023 13:53:32 +0000 (14:53 +0100)
commit94f18bb19945915fcdfd1903841020ef1b6af44a
tree5df6bd3b4f5c1f142e6e36047ccf9710754eb614
parent1f342790ad3c2456e15351829ad5d8919cccc03f
HID: nintendo: add support for nso controllers

This adds support for the nintendo switch online controllers which
include the SNES, Genesis, and N64 Controllers.

As each nso controller only implements a subset of what a pro
controller can do. Each of these 'features' were broken up in to
seperate functions which include right stick, left stick, imu, and
dpad and depending on the controller type that it is, it will call
the supported functions appropriately.

Each controller now has a struct which maps the bit within the hid
in report to a button.

The name given to the device now comes directly from the hid
device name rather than looking up a predefined string.

Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
Reviewed-by: Daniel J. Ogorchock <djogorchock@gmail.com>
Tested-by: Daniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/Kconfig
drivers/hid/hid-ids.h
drivers/hid/hid-nintendo.c