From patchwork Sun Dec 10 23:52:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Furneaux X-Patchwork-Id: 10104069 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 ACF62602D8 for ; Mon, 11 Dec 2017 00:25:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CE1529249 for ; Mon, 11 Dec 2017 00:25:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FABC2927D; Mon, 11 Dec 2017 00:25: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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 827DC29249 for ; Mon, 11 Dec 2017 00:25:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452AbdLKAZU (ORCPT ); Sun, 10 Dec 2017 19:25:20 -0500 Received: from outbound214.reliablemail.org ([173.236.5.214]:60531 "EHLO outbound214.reliablemail.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751137AbdLKAZU (ORCPT ); Sun, 10 Dec 2017 19:25:20 -0500 X-Greylist: delayed 1564 seconds by postgrey-1.27 at vger.kernel.org; Sun, 10 Dec 2017 19:25:20 EST Received: from [184.154.46.16] (helo=pcluster12.stablehost.com) by filter02.reliabledns.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eOBV2-00048W-DW for linux-input@vger.kernel.org; Sun, 10 Dec 2017 16:59:14 -0700 Received: from cpe08d42b1fb123-cm788df7e09410.cpe.net.cable.rogers.com ([173.35.34.236]:4793 helo=volta) by pcluster12.stablehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1eOBV1-002Fx9-FQ; Sun, 10 Dec 2017 16:59:11 -0700 Date: Sun, 10 Dec 2017 18:52:08 -0500 From: Mark Furneaux (by way of Mark Furneaux ) To: mark@furneaux.ca Message-ID: <20171210185208.08d7e52c@volta> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Subject: [PATCH v2] Input: Add support for PDP Xbox One controllers X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - pcluster12.stablehost.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - furneaux.ca X-Get-Message-Sender-Via: pcluster12.stablehost.com: authenticated_id: mark@furneaux.ca X-Authenticated-Sender: pcluster12.stablehost.com: mark@furneaux.ca X-Source: X-Source-Args: X-Source-Dir: X-Originating-IP: 184.154.46.16 X-SpamExperts-Domain: outgoing.reliabledns.org X-SpamExperts-Username: 184.154.46.16 Authentication-Results: reliabledns.org; auth=pass smtp.auth=184.154.46.16@outgoing.reliabledns.org X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: SB/global_tokens (0.00273776702766) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5jBPzIhHILHoMo0gJXV6cYQXv9krsgRhBn0ayn6qsUc7bGFWXFtvoxcs yLJek5KJPOrkwOtxAS8PGBqPQnmkEPnGTeieozC56kHupXsZOaDG5wsdoXt9bpGmMLeJUlmQLjtV rcXiG3jVvyh9GTF9XU6Cu5+xn8wZE3UBya6qQ+FDjX6whPNVpK61zHnQxfXo7XeMg/YUK0x6HmwH CNapmLvgvpnunQOsgZPpnjjHtFttCMKZw1tYrnr7rJHHUpEAaqg2HAG29ucnwP0M3OWpRjoXRuWz sGtazoE/vPfv1xaxiagz04q5AaWjEwacdK/02AXxHd6tfCgKxSc7jkftfJXcP1+oiRAyJTS82LRn ZNr6QSonZiFodgo9fgcdxbh+YirKlBJzmvmuVVPMmGAm2H4sifhPvHIkt3zYV/z7EHc3sFdeAnz4 j2Jd9hHlkVeQ3de5SQnMMyNtwELxWMVGvRU/2Jb+MUDCV6Z92vdi8cBprSOIPpeqwlm2NDGXIJ2x 7GwwyZqBYx24k616xfOEncM6YSYal3oS/yApctHpS3hYi2j2KJhc1YNsGtVSrmzbufEDiikv83R3 XZ9uoPmXptVekdx6iwaS82oaUqxMAFV8WkSmBoqt+1W8f95sPuMtAYYTykwT1ZsDZDClk+OSCpvd BGlCYHY42VDjPjMzsuvZkdWGrpJyeIGs7ykfLm94n1z1pRXWhjh9fdbl44I0Df0naCKROGNUrfen r7qhmMlub965+P0hekseyVlGovw8nTh2qNF+rMrSGyPONPkGPSMJpDmLQv2Y+mIEkl31AUcs5lek lD82TDmgNXzI3IaAKyRSQmmkyj8dBOCH5zXpAxMVrxP+0sgmqaWdlumlM90FrOPsX8vkPosvZjDR 6UMuWM/tLtD/9t5u37lt3Q37A7u3Ch87gqUIv4wg2u9Rwpfh9jihx+Za/cV70jOJzN2r4A== X-Report-Abuse-To: spam@filter01.reliabledns.org 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 Input: Add support for PDP Xbox One controllers Adds support for the current lineup of Xbox One controllers from PDP (Performance Designed Products). These controllers are very picky with their initialization sequence and require an additional 2 packets before they send any input reports. Signed-off-by: Mark Furneaux Reviewed-by: Cameron Gutman --- Changes in v2: - Zeroed the sequence numbers and removed the redundant quirk entry. - Corrected mangled formatting from my email client. drivers/input/joystick/xpad.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d86e595..d88d3e0 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -229,6 +229,7 @@ static const struct xpad_device { { 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE }, + { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 }, { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 }, @@ -476,6 +477,22 @@ static const u8 xboxone_hori_init[] = { }; /* + * This packet is required for some of the PDP pads to start + * sending input reports. One of those pads is (0x0e6f:0x02ab). + */ +static const u8 xboxone_pdp_init1[] = { + 0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14 +}; + +/* + * This packet is required for some of the PDP pads to start + * sending input reports. One of those pads is (0x0e6f:0x02ab). + */ +static const u8 xboxone_pdp_init2[] = { + 0x06, 0x20, 0x00, 0x02, 0x01, 0x00 +}; + +/* * A specific rumble packet is required for some PowerA pads to start * sending input reports. One of those pads is (0x24c6:0x543a). */ @@ -505,6 +522,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), + XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init1), + XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2), XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init), XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),