From patchwork Sun Feb 5 00:29:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cameron Gutman X-Patchwork-Id: 9555815 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 DE75960236 for ; Sun, 5 Feb 2017 00:32:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA5A1269DA for ; Sun, 5 Feb 2017 00:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF2DE26BE9; Sun, 5 Feb 2017 00:32:43 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 72186269DA for ; Sun, 5 Feb 2017 00:32:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751862AbdBEAbj (ORCPT ); Sat, 4 Feb 2017 19:31:39 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34563 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751239AbdBEAbg (ORCPT ); Sat, 4 Feb 2017 19:31:36 -0500 Received: by mail-pg0-f66.google.com with SMTP id v184so5455514pgv.1; Sat, 04 Feb 2017 16:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pg0hu1QBBeYcsx2lvd4Llsj/qMYsnoHnX21noFH3lpA=; b=P/DLh/ASP9Uqzk+aqzULtO/iNtDSjv/i2mt4kOA5U8w1vD2fGeG+l3KqJ9v7ut/ILz gDqMqlqagX1h5tw6pgkSKePdfzJJCyL2oY2LmXC1q4hzObMCc8SW4oRaeg/fCWqJ5CsL HsplyNcoLJUcLXKEnrff7xZ1MFHXU7hh7B85VjFaH0DE93wIeb/+cYOUucCbM84ZsdUJ FxAErSkrapoEwMTZPQGo3bKiBgeVMkm6jO9GtiqJYBLi3cRAGQ1rm0BNH1MgGyKCSG3o j00lUtpRf/2/DUm9isMmvJG16NbjaPANYprJgBNGN6StAyPlHVWrNOEsW3S5meajfr78 ZRbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pg0hu1QBBeYcsx2lvd4Llsj/qMYsnoHnX21noFH3lpA=; b=b8fpPoUKxp29pdxOFGbprDp9pmi642dQhROJE7aJem1xzkbImFaBV9p84GUi2oh2qo 5fHLcWIqlat+pBaYbNN7yHayS+/hRunYiNkbIdkJWQSrRAJk7EapjHFLiV3GA0QiEyiT XIHDHhhGOoGV/Vy9Dkz88kSP88/zwI/bHaENriGNvoaEb3FUESJldPvyO9eL2khBRSdS qXSYFcT5JNb1/9NaXGB8zgEe1aenazKk5UaK7c1B1VCg4qB0u91dkdzJ72X0fub/JBCD B+XoDDrrzxD8x4WfAK4WJkiKJdyXxuufmOfH8873QtqoXB5nw4F+wqQO91YWB5tMhP8I KJFA== X-Gm-Message-State: AIkVDXJlkjdQ6Z4Ka97/69fcxApbtIN7EqHSFsNvl020+LbtstvMSyVDT3lhrTblH9GLlA== X-Received: by 10.98.75.16 with SMTP id y16mr5320070pfa.23.1486254695589; Sat, 04 Feb 2017 16:31:35 -0800 (PST) Received: from localhost.localdomain ([174.127.240.168]) by smtp.gmail.com with ESMTPSA id s8sm77744303pfj.30.2017.02.04.16.31.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Feb 2017 16:31:35 -0800 (PST) From: Cameron Gutman To: dmitry.torokhov@gmail.com, rojtberg@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Cameron Gutman Subject: [PATCH 2/5] Input: xpad - add init packet for Hori and Titanfall 2 pads Date: Sat, 4 Feb 2017 16:29:59 -0800 Message-Id: <20170205003002.28160-3-aicommander@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170205003002.28160-1-aicommander@gmail.com> References: <20170205003002.28160-1-aicommander@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 Without sending this packet, the Titanfall 2 pad (0x0e6f:0x0165) continuously attempts to handshake with the PC and never sends any input reports. The Hori gamepad (0x0f0d:0x0067) analog sticks don't work if this isn't sent, though other buttons do work without it. Signed-off-by: Cameron Gutman --- drivers/input/joystick/xpad.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6f07b5b..3f19f32b 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -346,6 +346,14 @@ struct xpad_output_packet { /* Sequence numbers will be added before the packets are sent */ static const struct xpad_output_packet xone_init_pkt[] = { /* + * This packet is required for the Titanfall 2 Xbox One pads + * (0x0e6f:0x0165) to finish initialization and for Hori pads + * (0x0f0d:0x0067) to make the analog sticks work. + */ + {{0x01, 0x20, 0x00, 0x09, 0x00, 0x04, 0x20, 0x3a, + 0x00, 0x00, 0x00, 0x80, 0x00}, 13, true}, + + /* * This packet is required for all Xbox One pads with 2015 * or later firmware installed (or present from the factory). */