Linux Input/HID development
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Max Staudt <max@enpas.org>
Cc: "Daniel J . Ogorchock" <djogorchock@gmail.com>,
	 Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	 linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] HID: nintendo: Don't fail on setting baud rate
Date: Wed, 3 Apr 2024 13:39:41 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2404031339350.20263@cbobk.fhfr.pm> (raw)
In-Reply-To: <20240315165729.17817-1-max@enpas.org>

On Sat, 16 Mar 2024, Max Staudt wrote:

> 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>
> ---
> Changes in v2:
>  - Made hid_err() a hid_warn() since it's not a fatal failure.
> ---
>  drivers/hid/hid-nintendo.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
> index 997c3a1adaca..395ed6b5ef59 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) {
> -			hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
> -			goto out_unlock;
> +			/*
> +			 * We can function with the default baudrate.
> +			 * Provide a warning, and continue on.
> +			 */
> +			hid_warn(hdev, "Failed to set baudrate (ret=%d), continuing anyway\n", ret);

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs


      reply	other threads:[~2024-04-03 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 16:57 [PATCH v2] HID: nintendo: Don't fail on setting baud rate Max Staudt
2024-04-03 11:39 ` Jiri Kosina [this message]

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=nycvar.YFH.7.76.2404031339350.20263@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=djogorchock@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@enpas.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