Received: by 10.223.176.5 with SMTP id f5csp3399562wra; Mon, 29 Jan 2018 12:37:27 -0800 (PST) X-Google-Smtp-Source: AH8x226+Ug6W1wZDFGYDb+cxf4sExiL6MGTebL47OrhE6TvaCJ1yL7241vLEBuAOSAa/L6BGJLtn X-Received: by 10.98.103.83 with SMTP id b80mr27760681pfc.223.1517258247854; Mon, 29 Jan 2018 12:37:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517258247; cv=none; d=google.com; s=arc-20160816; b=gosnwaxyGbrcSbdRkEzR4eyGHj6lNar9bD/UbxeXPt4URRzk/Vnyr+26uXoQXo8ZFl VDPNvh4bz9LGRIwrfwsNhuHnpSlucy1V7jpkaa5h2T6TGvJGCsILOovnjSqud3lklgck SCSSI4GXA8VbNIUXrZFBKn4FJ1GxInyNJrOIdeNmh4hAI1BtivWn4TRSnyD3zBuyA7cz peGdAtprXKcKAzv+mGWG4xv4J2N/QIUDhw8CJxT6z30qV50+iCPGo2LTtGe08eNqccEp CmeZh2Z37IzD7C7DbH8uqTVMkYXnhOWnFIDEWBbDTEpSvluphcdSjZtGAZpCYl9PQnxl DKZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=I/c3FyVEGRyu4LqsjwDJ4IG2bmskHsoJxPmxvwdUbvg=; b=zCIe1UOCFvTT3KVIvoRGbz9MPDv8RKRK4xaGkYX/bI2K0LD8Y2PxpdViBNnhTm7PNC aFgqQ0kX3RGT+wqX3NXhimuGVzWM/TEatqXttm7xTNe2j6Y39BFvtx93yhtqYwJKyl6g zYxdBdXm5cesfOtF38sC5pm7ACGoKF4aGQpX1UaWFv8L5hmFewnCo3tnoeOVIOwkNTdj HS+Vy6JQuDOvfowUMdmPtrT8h0eCyGha61JzZ5vVmLbRKaMVJbAgcs+Exq4MfvjM30vF VdsARokzPuedjJVYFOqlU43Vd9IVoXi+kFImKZVdK7j9Vcv/z1lrsAN4de7hqZNBxHL7 JAzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24si3994704pfa.194.2018.01.29.12.37.13; Mon, 29 Jan 2018 12:37:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754202AbeA2UOD (ORCPT + 99 others); Mon, 29 Jan 2018 15:14:03 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39218 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753888AbeA2UOA (ORCPT ); Mon, 29 Jan 2018 15:14:00 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 402B63004; Mon, 29 Jan 2018 13:09:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Furneaux , Cameron Gutman , Dmitry Torokhov Subject: [PATCH 4.14 08/71] Input: xpad - add support for PDP Xbox One controllers Date: Mon, 29 Jan 2018 13:56:36 +0100 Message-Id: <20180129123827.870138753@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123827.271171825@linuxfoundation.org> References: <20180129123827.271171825@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Furneaux commit e5c9c6a885fad00aa559b49d8fc23a60e290824e upstream. 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 Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) --- 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_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),