Skip to content

Commit 94f18bb

Browse files
XenuIsWatchingJiri Kosina
authored andcommitted
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 <[email protected]> Reviewed-by: Daniel J. Ogorchock <[email protected]> Tested-by: Daniel J. Ogorchock <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1f34279 commit 94f18bb

File tree

3 files changed

+649
-266
lines changed

3 files changed

+649
-266
lines changed

drivers/hid/Kconfig

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -761,14 +761,15 @@ config HID_MULTITOUCH
761761
module will be called hid-multitouch.
762762

763763
config HID_NINTENDO
764-
tristate "Nintendo Joy-Con and Pro Controller support"
764+
tristate "Nintendo Joy-Con, NSO, and Pro Controller support"
765765
depends on NEW_LEDS
766766
depends on LEDS_CLASS
767767
select POWER_SUPPLY
768768
help
769-
Adds support for the Nintendo Switch Joy-Cons and Pro Controller.
769+
Adds support for the Nintendo Switch Joy-Cons, NSO, Pro Controller.
770770
All controllers support bluetooth, and the Pro Controller also supports
771-
its USB mode.
771+
its USB mode. This also includes support for the Nintendo Switch Online
772+
Controllers which include the Genesis, SNES, and N64 controllers.
772773

773774
To compile this driver as a module, choose M here: the
774775
module will be called hid-nintendo.
@@ -779,9 +780,9 @@ config NINTENDO_FF
779780
select INPUT_FF_MEMLESS
780781
help
781782
Say Y here if you have a Nintendo Switch controller and want to enable
782-
force feedback support for it. This works for both joy-cons and the pro
783-
controller. For the pro controller, both rumble motors can be controlled
784-
individually.
783+
force feedback support for it. This works for both joy-cons, the pro
784+
controller, and the NSO N64 controller. For the pro controller, both
785+
rumble motors can be controlled individually.
785786

786787
config HID_NTI
787788
tristate "NTI keyboard adapters"

drivers/hid/hid-ids.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,10 @@
986986
#define USB_DEVICE_ID_NINTENDO_JOYCONL 0x2006
987987
#define USB_DEVICE_ID_NINTENDO_JOYCONR 0x2007
988988
#define USB_DEVICE_ID_NINTENDO_PROCON 0x2009
989-
#define USB_DEVICE_ID_NINTENDO_CHRGGRIP 0x200E
989+
#define USB_DEVICE_ID_NINTENDO_CHRGGRIP 0x200e
990+
#define USB_DEVICE_ID_NINTENDO_SNESCON 0x2017
991+
#define USB_DEVICE_ID_NINTENDO_GENCON 0x201e
992+
#define USB_DEVICE_ID_NINTENDO_N64CON 0x2019
990993

991994
#define USB_VENDOR_ID_NOVATEK 0x0603
992995
#define USB_DEVICE_ID_NOVATEK_PCT 0x0600

0 commit comments

Comments
 (0)