From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x2264VmjidORGBPrguqaa5tLAI3ggm3UK336O7+5EESkOZk3AuAiITUwBWJTMCCB8oV2Vp9xX ARC-Seal: i=1; a=rsa-sha256; t=1517256841; cv=none; d=google.com; s=arc-20160816; b=fljaskGjfo8dYZoRygL1H35yr3/6hvaRKDwrzBnYk1bd5Hov4354Kqo5WorSGq9wPf g5Wg/34ZAKAQwi5hekpL0FsGyW4cfg4zTzeclnKk0iDD1iOGFNUDmGQF0bF0PKD6ND+n oZTfzTp7lfceQy8FkXpEaq31l348Sor1slX7DusS5726mjRJcikFyOaXciFswAOyV5+P jr355oxdFwKNbT4G4zP2kJG+Xg7VwToY5tlClPyWXRN0wrzUsIaCAxS2q9seN5AqbWxg cIOnKSC5hx/4aBWa9JmuzEbMCW0SVObr5IEJDO5uf4ojaSv77ON4Lrq7z8cLf8Y9AMQs 7l2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=I/c3FyVEGRyu4LqsjwDJ4IG2bmskHsoJxPmxvwdUbvg=; b=n1pO0GCpkCQsCoF3ITsoSVonRvb49gCzBEtv+RRtJddzi4Js7bz4Ta/w4xId8d3X1k VmDiz9cox/oXCONhK3lU9EH03ZqPrFVCleTbUeaByaW7Lrt6Wd26X0xBhbmh36n9Z/3f fJUdZWG1ncjJfnxpgSO39NccKvdElNTMM4G1K297/HpPnOWdTfZgH5FXXwoIy0Z885oz xs4GOd4jbY58r8S7qwiHa8fSYaJiWBCjZr3rQ3rl2sOKaxPzgYFg2b0fF4ZwICAnvQX4 h2RHJfZqY/t6GbVx7gwxVH95/JieHpfZ2zCaLlux3akdqgFr8FbGjROpHPiv/7XYftHE X9hw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590959109887851577?= X-GMAIL-MSGID: =?utf-8?q?1590959109887851577?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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),