linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: Vicki Pfau <vi@endrift.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Michael Cullen <michael@michaelcullen.name>,
	Marcos Alano <marcoshalano@gmail.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: xpad - fix PowerA EnWired Controller guide button
Date: Sat, 25 Feb 2023 02:14:27 +0100	[thread overview]
Message-ID: <d4b320fcca34c25713836c1ef5a34157c67071f0.camel@redhat.com> (raw)
In-Reply-To: <20221006221209.2016372-1-vi@endrift.com>

Poke, Dmitry - any chance we could get this pushed?

On Thu, 2022-10-06 at 15:12 -0700, Vicki Pfau wrote:
> Some Xbox One controllers require more complete versions of the controller
> start-up sequence used in official software in order to function properly.
> This patch adds a usb_set_interface call that matches official startup and
> nominally disabled the audio interface, which isn't supported in the xpad
> driver in the first place.
> 
> 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 18190b529bca..6449665d7b61 100644
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
> @@ -1509,6 +1509,13 @@ static int xpad_start_input(struct usb_xpad *xpad)
>  		return -EIO;
>  
>  	if (xpad->xtype == XTYPE_XBOXONE) {
> +		/* 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 */
> +		error = usb_set_interface(xpad->udev, 1, 0);
> +		if (error)
> +			return error;
> +
>  		error = xpad_start_xbox_one(xpad);
>  		if (error) {
>  			usb_kill_urb(xpad->irq_in);

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


  parent reply	other threads:[~2023-02-25  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 22:12 [PATCH] Input: xpad - fix PowerA EnWired Controller guide button Vicki Pfau
2022-10-14 13:00 ` Mattijs Korpershoek
2023-02-25  1:14 ` Lyude Paul [this message]
2023-02-25 18:27   ` Dmitry Torokhov
2023-02-28  0:32     ` 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=d4b320fcca34c25713836c1ef5a34157c67071f0.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=marcoshalano@gmail.com \
    --cc=michael@michaelcullen.name \
    --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).