From: Cameron Gutman <aicommander@gmail.com>
To: linux-input@vger.kernel.org
Cc: dmitry.torokhov@gmail.com
Subject: [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller
Date: Sun, 6 Dec 2015 00:02:31 -0800 [thread overview]
Message-ID: <5663EB97.7020103@gmail.com> (raw)
The Covert Forces edition of the Xbox One controller requires the full 5
byte initialization packet to work at all. The 5 byte packet was known to
be needed for proper rumble support, but it looks like it's needed even
without rumble on these controllers.
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
---
drivers/input/joystick/xpad.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index fd4100d..de89de0 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1052,7 +1052,10 @@ static int xpad_open(struct input_dev *dev)
/* Xbox one controller needs to be initialized. */
xpad->odata[0] = 0x05;
xpad->odata[1] = 0x20;
- xpad->irq_out->transfer_buffer_length = 2;
+ xpad->odata[2] = 0x00;
+ xpad->odata[3] = 0x01;
+ xpad->odata[4] = 0x00;
+ xpad->irq_out->transfer_buffer_length = 5;
return usb_submit_urb(xpad->irq_out, GFP_KERNEL);
}
--
2.5.0
next reply other threads:[~2015-12-06 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-06 8:02 Cameron Gutman [this message]
2015-12-10 6:47 ` [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller 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=5663EB97.7020103@gmail.com \
--to=aicommander@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.