From patchwork Fri May 27 00:12:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Rojtberg X-Patchwork-Id: 9137495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D673607D3 for ; Fri, 27 May 2016 00:13:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FBA6282E1 for ; Fri, 27 May 2016 00:13:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34953282FF; Fri, 27 May 2016 00:13:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4402828305 for ; Fri, 27 May 2016 00:13:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755469AbcE0ANT (ORCPT ); Thu, 26 May 2016 20:13:19 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34492 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755453AbcE0ANT (ORCPT ); Thu, 26 May 2016 20:13:19 -0400 Received: by mail-wm0-f68.google.com with SMTP id n129so9498288wmn.1 for ; Thu, 26 May 2016 17:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fESjXB64KqqHvdwwafizriSsE5w7DF6iRWoX/Zzee+M=; b=TsDz+gjeWThEKLmb3YP47cKO7Jzxa6CvSgP3ma1sdmjlMow0a+AFPZrd8OsL6MwDEH K42BRJWnotQcIkNOwKfL5cNIYD8UJGMlJNsMAsUB6dpaOyDSq56pyZp5yRGMxMOYot80 RJYBT9T9pWM3Rf324zNY9agA9axqigoGYmeRFr23ldBAQSyBAjbmGKPo5JLk7oroV8te qX8duepNbZn0gincQVqZImQiLvYLLESjTwn2NQWT1NPySsl2lq3qOCYZ2Ogty7EFzt3Y u9V29UOpWt+iJO7YEc7+jES29qcYY5/fi73LSAq8kCpfeZzyh0njFC+2g1unoFaS4Nuc Cf1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fESjXB64KqqHvdwwafizriSsE5w7DF6iRWoX/Zzee+M=; b=S2p7+nrpGjzqOk5qUsgQHS3d0TgMwHWUYqCOWrYHpBWyJurMEH7UG3f+NxCIk29f8S ZCJ98UognaHZrOsDKLOSofIdqnvVxMfadeC356rC/WWooBrD8Y/HJ/bYXeDVteKqNUwI cvhJsj2BJpReu6wL09JeVK0OK6Qxz4yiHuMKIBTOK5dRw1lVB6OH42XKejTl+HcPSDLn ketg/dMb0ptjVBnlSHpBSCb/PXWyD++H4FrrPoNSFFEBVfs44RbD1SqZ7eiSMuk382bs 9/5J+K+WAk0pn6QWs0HCapii4G4HrBKgR8iAIF4nRor8XuBNBKUzBa1mIMg93Fp3lbuF bANg== X-Gm-Message-State: ALyK8tLkElA3du/l6jTUZalzm/+fZ/fLakVyumMNs19UPojx8RybxA8sadxExMjeEwfpiQ== X-Received: by 10.28.135.137 with SMTP id j131mr3264650wmd.47.1464307992780; Thu, 26 May 2016 17:13:12 -0700 (PDT) Received: from deepwhite.fritz.box (p5790B7FB.dip0.t-ipconnect.de. [87.144.183.251]) by smtp.gmail.com with ESMTPSA id kz1sm16628372wjc.46.2016.05.26.17.13.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 May 2016 17:13:12 -0700 (PDT) From: Pavel Rojtberg X-Google-Original-From: Pavel Rojtberg < rojtberg@gmail.com > To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: Pavel Rojtberg , "Pierre-Loup A . Griffais" Subject: [PATCH 4/7] Input: xpad: xbox one elite controller support Date: Fri, 27 May 2016 02:12:52 +0200 Message-Id: <1464307975-25890-5-git-send-email-rojtberg@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464307975-25890-1-git-send-email-rojtberg@gmail.com> References: <1464307975-25890-1-git-send-email-rojtberg@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pavel Rojtberg added the according id and incresed XPAD_PKT_LEN to 64 as the elite controller sends at least 33 byte messages [1]. Verified to be working by [2]. [1]: https://franticrain.github.io/sniffs/XboxOneSniff.html [2]: https://github.com/paroj/xpad/issues/23 Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Pavel Rojtberg --- drivers/input/joystick/xpad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d601983..804dbcc 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -87,7 +87,7 @@ #define DRIVER_AUTHOR "Marko Friedemann " #define DRIVER_DESC "X-Box pad driver" -#define XPAD_PKT_LEN 32 +#define XPAD_PKT_LEN 64 /* xbox d-pads should map to buttons, as is required for DDR pads but we map them to axes when possible to simplify things */ @@ -129,6 +129,7 @@ static const struct xpad_device { { 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 }, { 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE }, { 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE }, + { 0x045e, 0x02e3, "Microsoft X-Box One Elite pad", 0, XTYPE_XBOXONE }, { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },