linux icon indicating copy to clipboard operation
linux copied to clipboard

Add support for the Nintendo Switch Online SNES controller

Open nadiaholmquist opened this issue 6 years ago • 7 comments

This pull request adds support for the Switch SNES controller.

Since I have one of these controllers I decided to try and take a stab at adding support for it in the driver. I'm completely unfamiliar with kernel module development so some things might not be entirely right, but from my testing with my European model of the controller, what I've added seems to work well.

nadiaholmquist avatar Nov 27 '19 16:11 nadiaholmquist

Hi Nadia. Thanks for the patch. I haven't had a chance to review it in detail yet, but it looks good overall. Are you interested in trying to get it mainlined? If so, my current patchset is sitting in the mailing list right now, so once I manage to get that in you could submit yours if desired.

Have you happened to run checkpatch on this patch? I see you had to indent some sections further due to additional if statement nesting, and it might be causing some to go over the kernel's 80 column limit coding standard. If they are, maybe those parts could be refactored to put multiple conditionals in if statements of the lower indentation level.

DanielOgorchock avatar Dec 05 '19 01:12 DanielOgorchock

Hi, yeah I do want to get this mainlined if I can, but had no idea how the process is like, so thought I'd just submit a pull request here. I'll have to look into how I actually do this properly.

I haven't run checkpatch on it, and since I forgot to set vim to 8-wide tabs it's definitely possible that some of the lines go over the limit

nadiaholmquist avatar Dec 09 '19 17:12 nadiaholmquist

Yeah I'm wondering how to get it mainlined too :+1:

Grimish-ng avatar Feb 15 '20 14:02 Grimish-ng

What benefits does this bring for the SNES controller? Is it for battery reading and LED control?

nfp0 avatar Oct 29 '22 02:10 nfp0

Is it for battery reading and LED control?

Yes, as well as making it actually work over USB and not just wirelessly, and a consistent button mapping with other controllers supported by Linux.


I should probably look at getting my updated version of this patch that also supports the NES controllers mainlined unless someone else has done the work to support these controllers since last I looked at it, which by now is quite a long time ago.

nadiaholmquist avatar Oct 30 '22 11:10 nadiaholmquist

I saw this: https://github.com/emilyst/hid-nx-dkms. It also supports the N64 and Genesis controllers. (I never tried it)

SuperSamus avatar Oct 30 '22 11:10 SuperSamus

@nadiaholmquist Thank you for the clarification. Yes, I would love to see your work mainlined!

@SuperSamus Interesting. I did not know that exists. It's useful for me because I also game with the Genesis controller and plan to get the N64 one (if it ever gets back in stock). This could also get mainlined.

nfp0 avatar Oct 30 '22 22:10 nfp0