linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Vicki Pfau <vi@endrift.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH 2/3] Input: xpad - fix PowerA EnWired Controller guide button
Date: Thu, 23 Mar 2023 18:29:17 -0700	[thread overview]
Message-ID: <ZBz87SvlSKWyVEUZ@google.com> (raw)
In-Reply-To: <20230203022758.3982393-2-vi@endrift.com>

On Thu, Feb 02, 2023 at 06:27:57PM -0800, Vicki Pfau wrote:
> This commit explicitly disables the audio interface the same way the official
> driver does. This is needed for some controllers, such as the PowerA Enhanced
> Wired Controller for Series X|S (0x20d6:0x200e) to report the guide button.
> 
> Signed-off-by: Vicki Pfau <vi@endrift.com>
> ---
>  drivers/input/joystick/xpad.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> index bb65c8268963..16bc3cd4c2b7 100644
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
> @@ -1390,6 +1390,13 @@ static int xpad_start_xbox_one(struct usb_xpad *xpad)
>  	unsigned long flags;
>  	int retval;
>  
> +	/* Explicitly disable the audio interface. This is needed for some
> +	 * controllers, such as the PowerA Enhanced Wired Controller
> +	 * for Series X|S (0x20d6:0x200e) to report the guide button */

Is it guaranteed that there is 2nd interface? Is it always the audio
interface?

> +	retval = usb_set_interface(xpad->udev, 1, 0);
> +	if (retval)
> +		return retval;
> +
>  	spin_lock_irqsave(&xpad->odata_lock, flags);
>  
>  	/*
> -- 
> 2.39.1
> 

Thanks.

-- 
Dmitry

  reply	other threads:[~2023-03-24  1:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03  2:27 [PATCH 1/3] Input: xpad - Treat Qanba controllers as Xbox360 controllers Vicki Pfau
2023-02-03  2:27 ` [PATCH 2/3] Input: xpad - fix PowerA EnWired Controller guide button Vicki Pfau
2023-03-24  1:29   ` Dmitry Torokhov [this message]
2023-02-03  2:27 ` [PATCH 3/3] Input: xpad - add support for 8BitDo Ultimate Wireless controller dongle Vicki Pfau
2023-03-24  1:25   ` Dmitry Torokhov
2023-02-10 21:45 ` [PATCH 1/3] Input: xpad - Treat Qanba controllers as Xbox360 controllers Lyude Paul
2023-02-10 21:46   ` Lyude Paul
2023-03-23 21:33 ` Lyude Paul
2023-03-24  1:24 ` Dmitry Torokhov

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=ZBz87SvlSKWyVEUZ@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=vi@endrift.com \
    /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;
as well as URLs for NNTP newsgroup(s).