Skip to content

Commit 03ece95

Browse files
XenuIsWatchingJiri Kosina
authored andcommitted
HID: nintendo: add support for md/gen 6B controller
The NSO MD/GEN 6B was a Japan-only controller released which has 6 buttons on the face of the controller. This adds support for this controller. It still enumerates just like the 3B controller, but will use extra bits in it's report for the 3 extra controllers. This also changes the events reported to match the letter on the controller for the NSO MD/GEN controller. The VID/PID it reports is the same as the 3B controller. This also removes a comment on the N64 Controllers which didn't mean anything. Signed-off-by: Ryan McClelland <rymcclel@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent 2a770b4 commit 03ece95

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

drivers/hid/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ config HID_NINTENDO
787787
Adds support for the Nintendo Switch Joy-Cons, NSO, Pro Controller.
788788
All controllers support bluetooth, and the Pro Controller also supports
789789
its USB mode. This also includes support for the Nintendo Switch Online
790-
Controllers which include the Genesis, SNES, and N64 controllers.
790+
Controllers which include the NES, Genesis, SNES, and N64 controllers.
791791

792792
To compile this driver as a module, choose M here: the
793793
module will be called hid-nintendo.

drivers/hid/hid-nintendo.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -456,24 +456,20 @@ static const struct joycon_ctlr_button_mapping snescon_button_mappings[] = {
456456
{ /* sentinel */ },
457457
};
458458

459-
/*
460-
* "A", "B", and "C" are mapped positionally, rather than by label (e.g., "A"
461-
* gets assigned to BTN_EAST instead of BTN_A).
462-
*/
463459
static const struct joycon_ctlr_button_mapping gencon_button_mappings[] = {
464-
{ BTN_SOUTH, JC_BTN_A, },
465-
{ BTN_EAST, JC_BTN_B, },
466-
{ BTN_WEST, JC_BTN_R, },
460+
{ BTN_A, JC_BTN_A, },
461+
{ BTN_B, JC_BTN_B, },
462+
{ BTN_C, JC_BTN_R, },
463+
{ BTN_X, JC_BTN_X, }, /* MD/GEN 6B Only */
464+
{ BTN_Y, JC_BTN_Y, }, /* MD/GEN 6B Only */
465+
{ BTN_Z, JC_BTN_L, }, /* MD/GEN 6B Only */
467466
{ BTN_SELECT, JC_BTN_ZR, },
468467
{ BTN_START, JC_BTN_PLUS, },
469468
{ BTN_MODE, JC_BTN_HOME, },
470469
{ BTN_Z, JC_BTN_CAP, },
471470
{ /* sentinel */ },
472471
};
473472

474-
/*
475-
* N64's C buttons get assigned to d-pad directions and registered as buttons.
476-
*/
477473
static const struct joycon_ctlr_button_mapping n64con_button_mappings[] = {
478474
{ BTN_A, JC_BTN_A, },
479475
{ BTN_B, JC_BTN_B, },

0 commit comments

Comments
 (0)