From: Vicki Pfau <vi@endrift.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
linux-input@vger.kernel.org
Cc: Vicki Pfau <vi@endrift.com>
Subject: [PATCH v2 0/3] HID: nintendo: Add preliminary Switch 2 controller driver
Date: Tue, 17 Mar 2026 20:08:44 -0700 [thread overview]
Message-ID: <20260318030850.289712-1-vi@endrift.com> (raw)
This series adds preliminary support for Switch 2 controllers. As with v1,
it does not support Bluetooth controllers and does not contain IMU or
battery support. However, several significant changes have been made:
First and foremost, the driver has been folded into hid-nintendo instead of
a separate hid-switch2 driver. This allowed reuse of some small bits of
hid-nintendo's existing support, but not a signiicant amount.
Secondly, the configuration interface API has been changed to make the
switch2_controller struct opaque. As the configuration interface is
effectively just a dumb sidechannel used for passing data that is the same
regardless of transit, there is no need for it to have any internal state
knowledge.
Thirdly, it adds support for "unified" format that had been left as a TODO
in the previous version. Though it does not directly enable said format,
it's good to have for future purposes.
It also addresses the other TODO regarding partial initialization,
guaranteeing a consistent state after setup, regardless of whether or not
an userspace process has claimed an then released control of the USB
interface.
Finally, it fixes a number of bugs, including some missing locks and race
conditions that could trigger a kernel panic if the USB configuration
interface was claimed or released from userspace.
For ease of reviewing, the series has been split into three patches, though
the bulk of the code is still in the first patch.
Vicki Pfau (3):
HID: nintendo: Add preliminary Switch 2 controller driver
HID: nintendo: Add rumble support for Switch 2 controllers
HID: nintendo: Add unified report format support
MAINTAINERS | 1 +
drivers/hid/Kconfig | 19 +-
drivers/hid/hid-ids.h | 4 +
drivers/hid/hid-nintendo.c | 1507 ++++++++++++++++-
drivers/hid/hid-nintendo.h | 72 +
drivers/input/joystick/Kconfig | 11 +
drivers/input/joystick/Makefile | 1 +
drivers/input/joystick/nintendo-switch2-usb.c | 352 ++++
8 files changed, 1953 insertions(+), 14 deletions(-)
create mode 100644 drivers/hid/hid-nintendo.h
create mode 100644 drivers/input/joystick/nintendo-switch2-usb.c
--
2.53.0
next reply other threads:[~2026-03-18 3:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 3:08 Vicki Pfau [this message]
2026-03-18 3:08 ` [PATCH v2 1/3] HID: nintendo: Add preliminary Switch 2 controller driver Vicki Pfau
2026-03-18 3:08 ` [PATCH v2 2/3] HID: nintendo: Add rumble support for Switch 2 controllers Vicki Pfau
2026-03-18 3:08 ` [PATCH v2 3/3] HID: nintendo: Add unified report format support Vicki Pfau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260318030850.289712-1-vi@endrift.com \
--to=vi@endrift.com \
--cc=bentiss@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox