Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp431582ybz; Wed, 22 Apr 2020 00:47:35 -0700 (PDT) X-Google-Smtp-Source: APiQypJDbJUxO2aE51OrPkZnG6KgbdfUtz4ZxkPXERsIOG6KTEsUXNhtLIrvIuSm9/TRYYghtSnj X-Received: by 2002:a50:ba83:: with SMTP id x3mr21134288ede.193.1587541655326; Wed, 22 Apr 2020 00:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587541655; cv=none; d=google.com; s=arc-20160816; b=Vdz63+sVeKn9LLQQ0Ep2Ep78QmRqfgt0sYmDDIo+CGDCsybhjkyMy4zAWdfshVnI2e OnRa64moSKJt7jiL/btEB2Ozt0rgUFudbqFjxR9aYy48uHtp2GIhJSjbB4BEIgjMIN8m mRC3MsO5gAytPCH5vxXmZBOw4VD/BJWTe6s/rseJRWiw4xOw7glJepW7HYjj0TiXLwhq cdho8FCUI5Wl790kZ7HfZvtviEUWTHJ3ZEUz8+19BMl2nuEeTiLmYXQIGIzfFMCPWpaZ EBwva852BEw/aGWSQ66a6+1MQD/7UEzwlWx2TO2/k3XFtYOQbQS0j9eo6GqGR4v8Kmua 3qOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=ysk4WMk8NsMihs1evCSOYe7LHkphmnmScYSQbOC8Llc=; b=eDYAzVdEUTPOEVuNkWWGVxrevNfafl1dz9vTrMAOj+IrhijcWl33SkwHytTk27txNG tVxgnn7yYJonUm/4sj4D12XgP/yElG+xbnwJh0dEN5HvoFRdBZzkj9nSxt4gKjr97jRW I3V3/rLdRWycRI/p9+iKB0DLxSxlf1wTFLqrC5N6VQabBAWiawJ7cEI9BMifV/cEV0cU p8nIYmC6XCyvgM3z8kdE1xrNUxkyS7cmhNmnahHdfNr09NzUwIZ4R+Itx1g8sjYfBQeO 3zVe7x5kJbALGzK+hpfUOrr8DXsR7W1Zc7ij3EEm0RqW4Y1Wi3+uMp2ZS+WrKvtGPNex Lg0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=o1SzwFR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si3194223edr.137.2020.04.22.00.47.12; Wed, 22 Apr 2020 00:47:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=o1SzwFR2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726154AbgDVHqC (ORCPT + 99 others); Wed, 22 Apr 2020 03:46:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725786AbgDVHqB (ORCPT ); Wed, 22 Apr 2020 03:46:01 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73CD8C03C1A6; Wed, 22 Apr 2020 00:46:01 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id z26so1181617ljz.11; Wed, 22 Apr 2020 00:46:01 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=ysk4WMk8NsMihs1evCSOYe7LHkphmnmScYSQbOC8Llc=; b=o1SzwFR2bkjbNNOJOE+ecvk9bOWfpyLmOCyf88lxbsunX1mPfn4RXpmFWpKI/wKJ4+ 3GrBxCgb8eBCPNdmnGEAsXvcBhzy5CNWepgs2qeUcBULvHwjqL/R7VIbidYmhk/oSRkd RrQCn9Ther16dMsGytaq97Rrpz4iVojN2Z8IoP3JT7VNBETLZQls7yE7W/U1TwZs2BZb wEN46kjfuRnh4sgQZJOUPWu1WHj6+cXeiAueKH5CUQmUoeZ9Ir8Qfxj/y1Vx+j4PKuy8 IOVpVgFp/k5YjV56fDk+iu4AHawH2gUKdFZMpgw/FwBCyqN6wrnvIRhDXYHj8ken4q6A nHmQ== 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:mime-version:content-transfer-encoding; bh=ysk4WMk8NsMihs1evCSOYe7LHkphmnmScYSQbOC8Llc=; b=XwZ8pufyYz039lNU8kBBozVoeU4gectRexW3zaG+IflUZRjcxO0xybkSkhk9iawlSq Qtb3y9HWIYufB1Z25RP0FMB+yYaypmf32EBAsp+AraRQAGSKeNDtCHrc8qTjrgJqd63K Cdz4QKOK44+5w/I0u5U28CXptrOU6guWiZfUitqQlGY5GlLHlMBWGalanQcYZJhogC72 OYogIx5A5hONA0yPB8AGbsa2nzdasOQGo7sYN2UCj26b12+iULAC7qQS2xX6Bl/kBD7Q 9K/JHt8F3QTuxAlZGUa7/vr9UCVw9AtigQjFRndSvDuo37NqPY9NQng75q1p6Q12QjHT KFog== X-Gm-Message-State: AGi0PuY/GtaZP0NLXKjfc2ogaKDKuhn9dZBJmoS+/N12Gb1hhdJNaYA2 5Sfj+ji9eODGkNm/JgcGFGs= X-Received: by 2002:a2e:b4f1:: with SMTP id s17mr15071165ljm.283.1587541559956; Wed, 22 Apr 2020 00:45:59 -0700 (PDT) Received: from luk-pc.lan (host-46-186-7-151.dynamic.mm.pl. [46.186.7.151]) by smtp.googlemail.com with ESMTPSA id c4sm3968427lfg.82.2020.04.22.00.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 00:45:59 -0700 (PDT) From: LuK1337 Cc: Cameron Gutman , =?UTF-8?q?=C5=81ukasz=20Patron?= , Dmitry Torokhov , Allison Randal , Thomas Gleixner , Greg Kroah-Hartman , Richard Fontana , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers Date: Wed, 22 Apr 2020 09:45:45 +0200 Message-Id: <20200422074546.14993-1-priv.luk@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <92b71dc5-ddd5-7ffd-65f8-65a6610dfe43@gmail.com> References: <92b71dc5-ddd5-7ffd-65f8-65a6610dfe43@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Łukasz Patron Sending [ 0x05, 0x20, 0x02, 0x0f, 0x06 ] packet for Xbox One S controllers fixes an issue where controller is stuck in Bluetooth mode and not sending any inputs. Signed-off-by: Łukasz Patron --- drivers/input/joystick/xpad.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6b40a1c68f9f..c77cdb3b62b5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = { 0x05, 0x20, 0x00, 0x01, 0x00 }; +/* + * This packet is required for Xbox One S (0x045e:0x02ea) + * and Xbox One Elite Series 2 (0x045e:0x0b00) pads to + * initialize the controller that was previously used in + * Bluetooth mode. + */ +static const u8 xboxone_s_init[] = { + 0x05, 0x20, 0x00, 0x0f, 0x06 +}; + /* * This packet is required for the Titanfall 2 Xbox One pads * (0x0e6f:0x0165) to finish initialization and for Hori pads @@ -516,6 +526,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(0x045e, 0x02ea, xboxone_s_init), + XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), -- 2.26.0