Skip to content

Commit 068815e

Browse files
author
Jiri Kosina
committed
Merge branch 'for-6.14/nintendo' into for-linus
- support for MD/GEN 6B controller (Ryan McClelland)
2 parents cf6473b + 03ece95 commit 068815e

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)