From: Max Staudt <max@enpas.org>
To: "Daniel J . Ogorchock" <djogorchock@gmail.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, max@enpas.org
Subject: [PATCH v1] HID: nintendo: Don't fail on setting baud rate
Date: Mon, 15 Jan 2024 23:50:00 +0900 [thread overview]
Message-ID: <20240115145000.12777-1-max@enpas.org> (raw)
Some third-party controllers can't change the baud rate.
We can still use the gamepad as-is, so let's do that.
Signed-off-by: Max Staudt <max@enpas.org>
---
drivers/hid/hid-nintendo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
index 997c3a1adaca..8cba0612c3ae 100644
--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
@@ -2164,8 +2164,11 @@ static int joycon_init(struct hid_device *hdev)
/* set baudrate for improved latency */
ret = joycon_send_usb(ctlr, JC_USB_CMD_BAUDRATE_3M, HZ);
if (ret) {
+ /*
+ * We can function with the default baudrate.
+ * Provide a warning, and continue on.
+ */
hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
- goto out_unlock;
}
/* handshake */
ret = joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ);
--
2.39.2
next reply other threads:[~2024-01-15 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 14:50 Max Staudt [this message]
2024-02-20 17:20 ` [PATCH v1] HID: nintendo: Don't fail on setting baud rate Max Staudt
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=20240115145000.12777-1-max@enpas.org \
--to=max@enpas.org \
--cc=benjamin.tissoires@redhat.com \
--cc=djogorchock@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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