From patchwork Sun Dec 6 08:02:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cameron Gutman X-Patchwork-Id: 7778341 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 945D09F3E6 for ; Sun, 6 Dec 2015 08:02:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C407E203EC for ; Sun, 6 Dec 2015 08:02:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F0670203E5 for ; Sun, 6 Dec 2015 08:02:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753369AbbLFICe (ORCPT ); Sun, 6 Dec 2015 03:02:34 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36385 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364AbbLFICd (ORCPT ); Sun, 6 Dec 2015 03:02:33 -0500 Received: by pacdm15 with SMTP id dm15so108538022pac.3 for ; Sun, 06 Dec 2015 00:02:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=XJnfHA7aqAhSq2PjxbAXR+ixwPqryL+NqgsqqZhsQ9I=; b=Y+Gvydf8HQwz9UfJF+sz/Mm5fEP0yQxj0dYMTPGXzq0y5OEyEdCcPhLhCIibQFnGfU DJAU4qL25paeLG07miENxRrOPxN3StDbMjUzokOKhbDdOhMQq2Bh8dWWUIGEyPA7BprY sSVufDgW+DFYbA84r1CvG0Z6znPnFCXxJCbFCNRg/Rlx8Hv/jEoKkbXEb8m0aiy9G4JR lkVd4nXp21ZzBeV8tDiqJJA3f77DIANqJW/kJJ2FC2tQa8OOs/P99GKdFRpczv/T059K 1o57Lwok6P/QgYN/ZsJ6ns7P13ZKKIi23DjV10hWC5TvT2iWP89fx3pg3aD9/yKL4RHQ 95Xg== X-Received: by 10.66.217.138 with SMTP id oy10mr33659092pac.112.1449388952409; Sun, 06 Dec 2015 00:02:32 -0800 (PST) Received: from [192.168.80.128] ([50.35.69.90]) by smtp.gmail.com with ESMTPSA id u64sm26996514pfa.89.2015.12.06.00.02.31 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Dec 2015 00:02:31 -0800 (PST) From: Cameron Gutman Subject: [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com Message-ID: <5663EB97.7020103@gmail.com> Date: Sun, 6 Dec 2015 00:02:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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); }