linux
linux copied to clipboard
Add support for the Nintendo Switch Online SNES controller
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.
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.
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
Yeah I'm wondering how to get it mainlined too :+1:
What benefits does this bring for the SNES controller? Is it for battery reading and LED control?
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.
I saw this: https://github.com/emilyst/hid-nx-dkms. It also supports the N64 and Genesis controllers. (I never tried it)
@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.