From patchwork Fri Feb 3 02:27:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicki Pfau X-Patchwork-Id: 13126928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DC16C61DA4 for ; Fri, 3 Feb 2023 02:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231462AbjBCC2o (ORCPT ); Thu, 2 Feb 2023 21:28:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbjBCC2n (ORCPT ); Thu, 2 Feb 2023 21:28:43 -0500 Received: from endrift.com (endrift.com [173.255.198.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7BEE23100 for ; Thu, 2 Feb 2023 18:28:42 -0800 (PST) Received: from nebulosa.vulpes.eutheria.net (unknown [50.47.218.115]) by endrift.com (Postfix) with ESMTPSA id 9CAC2A264; Thu, 2 Feb 2023 18:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=endrift.com; s=2020; t=1675391322; bh=qeP0TaAqRTLFzJZr4cKi3LGKbofYpdAHzSlvZ6+Mc34=; h=From:To:Cc:Subject:Date:From; b=UWgsIiLVcjS9Id9G+tTMTKoEVKAcEIJEEDXmMI8Mr64Zi6GaNvHxAT6WL1eZ42glt ffqIV/AGBtTo2+5eul/PkTJVWdKM//wUWEzZFBviB+jM2/9064f5kTsevsgEs0L3M2 zJkJPK/X8equOm7Fp1D7FH9xWviZZAGdCsNTHKziVPyx1xp9wus/VeFMAspZVdzduw StxUbL167H6ts+2TqqKEqX/SfKomy1wbuJl5zmCZEDw++f6gIpwiWjwlqZ2h1GD6oR qStiz2mWFPQV1T8C2JBRHXjaIo2l7Idd4h0RJmlSjz11vdR9nRGheFbuMbOhUBFc+U /o8j0ekMabgaQ== From: Vicki Pfau To: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Cc: "Pierre-Loup A. Griffais" , Cristian Ciocaltea Subject: [PATCH 1/3] Input: xpad - Treat Qanba controllers as Xbox360 controllers Date: Thu, 2 Feb 2023 18:27:56 -0800 Message-Id: <20230203022758.3982393-1-vi@endrift.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: "Pierre-Loup A. Griffais" They act that way in PC mode. Signed-off-by: Cristian Ciocaltea Reviewed-by: Lyude Paul --- drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2959d80f7fdb..bb65c8268963 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -492,6 +492,7 @@ static const struct usb_device_id xpad_table[] = { XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA Controllers */ XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */ XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */ + XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */ XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */ XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */ XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */ From patchwork Fri Feb 3 02:27:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicki Pfau X-Patchwork-Id: 13126927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36862C636D3 for ; Fri, 3 Feb 2023 02:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjBCC2p (ORCPT ); Thu, 2 Feb 2023 21:28:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbjBCC2o (ORCPT ); Thu, 2 Feb 2023 21:28:44 -0500 Received: from endrift.com (endrift.com [173.255.198.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B1686EAFD for ; Thu, 2 Feb 2023 18:28:43 -0800 (PST) Received: from nebulosa.vulpes.eutheria.net (unknown [50.47.218.115]) by endrift.com (Postfix) with ESMTPSA id 417CBA26C; Thu, 2 Feb 2023 18:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=endrift.com; s=2020; t=1675391322; bh=/OAQPnjD+4hInMiKM1lNb4m4uuGicNrtQj9U+A7PyFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QowG1kC/RmrDmoffyAffqarBTLkmL7uWH7SAgQFvd3qcVT5IcXMRSfhUronZACrVq S+Inm071hSkT2zHkO0Fiw3MsGkkaiWaomyCyidt5wOfTvEUWYq33Opb9dA0q8aLTmd J7XuT7fYF+2F2wPO3FavXp/LT2PTOrM+tAFdCaaCck3sdDVapca2T+EZwb+I47Fg/B TMhXdFfl/gjZKFh1lakYLI5RgCy1hlzFtbmr9Zb9j66Zcdlt3vx63jCCh8jaod7GLu 2XFISCCCIv8SfJYCbkMnMvMDc0LkOMcUlVe9YIEINeeQ9THmSIKEq0mzWLu4JAFh1A Iio0x+wCh5Tcw== From: Vicki Pfau To: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Cc: Vicki Pfau Subject: [PATCH 2/3] Input: xpad - fix PowerA EnWired Controller guide button Date: Thu, 2 Feb 2023 18:27:57 -0800 Message-Id: <20230203022758.3982393-2-vi@endrift.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230203022758.3982393-1-vi@endrift.com> References: <20230203022758.3982393-1-vi@endrift.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This commit explicitly disables the audio interface the same way the official driver does. This is needed for some controllers, such as the PowerA Enhanced Wired Controller for Series X|S (0x20d6:0x200e) to report the guide button. Signed-off-by: Vicki Pfau --- drivers/input/joystick/xpad.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index bb65c8268963..16bc3cd4c2b7 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1390,6 +1390,13 @@ static int xpad_start_xbox_one(struct usb_xpad *xpad) unsigned long flags; int retval; + /* Explicitly disable the audio interface. This is needed for some + * controllers, such as the PowerA Enhanced Wired Controller + * for Series X|S (0x20d6:0x200e) to report the guide button */ + retval = usb_set_interface(xpad->udev, 1, 0); + if (retval) + return retval; + spin_lock_irqsave(&xpad->odata_lock, flags); /* From patchwork Fri Feb 3 02:27:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicki Pfau X-Patchwork-Id: 13126929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78196C636D4 for ; Fri, 3 Feb 2023 02:28:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbjBCC2q (ORCPT ); Thu, 2 Feb 2023 21:28:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230424AbjBCC2o (ORCPT ); Thu, 2 Feb 2023 21:28:44 -0500 Received: from endrift.com (endrift.com [173.255.198.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBAB72278F for ; Thu, 2 Feb 2023 18:28:43 -0800 (PST) Received: from nebulosa.vulpes.eutheria.net (unknown [50.47.218.115]) by endrift.com (Postfix) with ESMTPSA id C5A7EA29A; Thu, 2 Feb 2023 18:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=endrift.com; s=2020; t=1675391323; bh=+gITOjPgsU8iMWovncH/ffEsr04VsUNBAvbzm6qK918=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dSjktX6y1SF9MxZh/0bhi9IferWdLmcPie57IBYE0JG8NJVshTQ/+WYJEXNUPhG46 LfxFLOEFYWzg6LLbWn8Uqm9TUOH+8wbQcsu7OOO5QLhit+1Dkd2X7S/WzoxCELjHdE tJE/rdwbBbFN1Hoz+9dUr/1BIrctrSzam2WgUSz+SlxcRN+wX13nGI1RDUqNfw/Rfi Z1GhXNBCLdJrpvWADx1PrukLd3k7lRL5d1xwx2nput18Q1xvUfM+18jiBZYUlvgq2Z OUrX1ghXBgro+HSNmE6yvd7mvLlfMieB2bCDwfCYT3al5/aStvFfy7pWqY04YoXMm+ qM0zaHFVS+pHg== From: Vicki Pfau To: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Cc: "Pierre-Loup A. Griffais" , Josh Cotton Subject: [PATCH 3/3] Input: xpad - add support for 8BitDo Ultimate Wireless controller dongle Date: Thu, 2 Feb 2023 18:27:58 -0800 Message-Id: <20230203022758.3982393-3-vi@endrift.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230203022758.3982393-1-vi@endrift.com> References: <20230203022758.3982393-1-vi@endrift.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: "Pierre-Loup A. Griffais" Add the VID and PID of the 8BitDo Ultimate Wireless controller dongle Signed-off-by: Josh Cotton --- drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 16bc3cd4c2b7..403b57e8176b 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -359,6 +359,7 @@ static const struct xpad_device { { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, { 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 }, { 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE }, + { 0x2dc8, 0x3106, "8BitDo Ultimate Wireless Controller", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 }, @@ -494,6 +495,7 @@ static const struct usb_device_id xpad_table[] = { XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */ XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */ XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */ + XPAD_XBOX360_VENDOR(0x2dc8), /* 8BitDo Ultimate Wireless Controller */ XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Duke X-Box One pad */ XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */ XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */