From patchwork Mon Oct 24 11:31:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp392092wru; Mon, 24 Oct 2022 04:34:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4FCnaRnxAurr9j95fshu8wR+alg9YjeecZ9xCG9fV9KNujx0cwK3zx4I7dbieA4cvUYx4+ X-Received: by 2002:a17:903:41ca:b0:186:a68e:c06d with SMTP id u10-20020a17090341ca00b00186a68ec06dmr5130509ple.61.1666611276638; Mon, 24 Oct 2022 04:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666611276; cv=none; d=google.com; s=arc-20160816; b=gU5GPpFrW5x0hrrnFC4DuVXHEa4bOpCmM2iJx6ewJgbO86cfXi1GxEKkV/d7ZtCwxF L3IIj0JwygvZpMN5VRCyyCd02EIcQEY0aTy+jEyTBOFZXyMlIN9JG8Zk2PyU55drKwkz WktJn2x0k9E6eGRVW0Qzx/71YSDrSIN7Uce/4Dp6+I1ylTfKL4EIHmxWvG8DXbxbm/Kd yCxCm+ARmBl+XPNKtfsXjdK1fBgHAgEBNCuRlCRun8gwAqcev+Fotc+wgcLznB751eG7 xallI8wpAZYvH+x1fx0W2TQQWsvEifNwr9hd2lL6w8XXqyuDoqp+BuWCmjMtxtLlOV9c dSxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EPrw8z6el89wn+XhTzoKo/AWaysCiXf+94hnEd+cTxw=; b=KT6faZx7JiwIQ6xk19f7ts6NMry2x08wKk6LJQaTTcBCRK6W6dmULr+uijT8sheY/c O5iakXESYZ7xvgOfKleQFPOIg/CbcbNKY9YFqOsFETn0UW9ioKPlwS969BidUAeF6Z0c 3Iw9kcDuwdSU6vX6wFYr00kqyD+L2ALlYOcgVHWqvuEKa6TNVWDzFLWpm4a6+x5l8YY4 zP64oCXd5wxd7k0gPnEjWBe+HVD5F0MuMSNrdHxI65L/jQ3C95j04Ruxb8Q2Wtmtw9HU iKwf7Z4lLatkKC7dGbSsTrgooG780BCf/qpimJwaCv7txQsY2j03OZNUHytbS1shy2tN SwVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xGD64d69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu15-20020a17090b388f00b0020c8e9efc7bsi9615341pjb.47.2022.10.24.04.34.22; Mon, 24 Oct 2022 04:34:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xGD64d69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbiJXLdj (ORCPT + 99 others); Mon, 24 Oct 2022 07:33:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230386AbiJXLco (ORCPT ); Mon, 24 Oct 2022 07:32:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B9257566; Mon, 24 Oct 2022 04:32:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5D64AB81141; Mon, 24 Oct 2022 11:32:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A953AC433C1; Mon, 24 Oct 2022 11:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611145; bh=KewVzdkDE/IMXnwzEyL8hV5FTZmJHOyqSi6AKVE3M4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xGD64d6961VldCdS6WSxQTSM0NXCtLHKyNTjmQ0B+ACAsTAmuNiEWkQZme1Ruq0Na zxFEnZskvTLKNvgrf7P+I/8eSAhgJeyBlMzzw0nG+cOcwFrcHQ1QPBjnk65DAfHMFT ta/SJhnrTZ5+CnsIT2oO4uWQC7iZVnNEPvC7/J0w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roderick Colenbrander , Benjamin Tissoires Subject: [PATCH 6.0 07/20] HID: playstation: add initial DualSense Edge controller support Date: Mon, 24 Oct 2022 13:31:09 +0200 Message-Id: <20221024112934.735209336@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112934.415391158@linuxfoundation.org> References: <20221024112934.415391158@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747568585795029219?= X-GMAIL-MSGID: =?utf-8?q?1747568585795029219?= From: Roderick Colenbrander commit b8a968efab301743fd659b5649c5d7d3e30e63a6 upstream. Provide initial support for the DualSense Edge controller. The brings support up to the level of the original DualSense, but won't yet provide support for new features (e.g. reprogrammable buttons). Signed-off-by: Roderick Colenbrander CC: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221010212313.78275-3-roderick.colenbrander@sony.com Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-playstation.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1142,6 +1142,7 @@ #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2 0x09cc #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE 0x0ba0 #define USB_DEVICE_ID_SONY_PS5_CONTROLLER 0x0ce6 +#define USB_DEVICE_ID_SONY_PS5_CONTROLLER_2 0x0df2 #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER 0x03d5 #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002 --- a/drivers/hid/hid-playstation.c +++ b/drivers/hid/hid-playstation.c @@ -1467,7 +1467,8 @@ static int ps_probe(struct hid_device *h goto err_stop; } - if (hdev->product == USB_DEVICE_ID_SONY_PS5_CONTROLLER) { + if (hdev->product == USB_DEVICE_ID_SONY_PS5_CONTROLLER || + hdev->product == USB_DEVICE_ID_SONY_PS5_CONTROLLER_2) { dev = dualsense_create(hdev); if (IS_ERR(dev)) { hid_err(hdev, "Failed to create dualsense.\n"); @@ -1508,6 +1509,8 @@ static void ps_remove(struct hid_device static const struct hid_device_id ps_devices[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS5_CONTROLLER) }, { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS5_CONTROLLER) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS5_CONTROLLER_2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS5_CONTROLLER_2) }, { } }; MODULE_DEVICE_TABLE(hid, ps_devices);