Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3675701rwl; Tue, 27 Dec 2022 13:05:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdyMOSP2KmeZEr56HuaqDGIFW1AtMxUA8SrShcd5U2meja5Cgoj5KRlzTkMboUfGddPpBh X-Received: by 2002:a05:6a20:3d18:b0:aa:5fed:8d6 with SMTP id y24-20020a056a203d1800b000aa5fed08d6mr35456656pzi.15.1672175159521; Tue, 27 Dec 2022 13:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672175159; cv=none; d=google.com; s=arc-20160816; b=G8QIB2Om22NtRBJqOkgzvGK5gDhufWRwEAT4nFECDMGJpHmKUoFDud2cJH07wfuDwt Cr8AYLM7CFlW3ReyHplRF0l9UZysBVp/JhCP1fEqA9vNMx85Hz+vazize6PZVS2knK+f Ei0KgT2FGFF99aibXa2Cgn29jglnsAMpaF1WjFTI6kbjUbzAhaDNslEB5ySBwKv6WVAu fWBZojLRv4S2IgvIsDI9+bU6v4eoL6MVHf33/fYtrxUDo5tUBGAwccAzD6Rv7ffzLzMc flXVZR8f67bH4szztLiFpW6m/m4/+aA30yeoDtzgYGj6666Ss2AYDXrqrJfbVJNo9hwR DAsw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pAbKsft5qIXumTnQK7KUYuZuNg2CmNNrEdLMXqljnj4=; b=m3Lv9ROxoucxr1S3lBYqdAsYj6rs3zzfdrUFhjDmDW+gbDKkotJ5w5pIfN5pIT0eHn BOnaTE0JzFbigSBTh/Xn/O4S+Nn5zRSrpS2L+BpG1pjjAt1T2e375W4gfwAurB8D0NnV 6NCD6id+BjqSu5Xm7nCO8vobCmMQkBQn+GvZBUG0cHLBl67lCDm1MM9MzLYS1Z4I+o6a 10RIephqzayt/z3xkkj4xpMnB9BaTYDFMT2INILarj0Ni1aCrUjG+k0jMr75nIixnjP5 nsmUq7JFWa30A7xgsks8aR1Ma/c3E8v1N61TZAkFMwjez4ATOPejTTC3igEO42RIZeWS hruA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pjVjKIyx; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t42-20020a056a0013aa00b005815a373296si4106833pfg.328.2022.12.27.13.05.50; Tue, 27 Dec 2022 13:05:59 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=pjVjKIyx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231918AbiL0Umd (ORCPT + 66 others); Tue, 27 Dec 2022 15:42:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232889AbiL0Ulb (ORCPT ); Tue, 27 Dec 2022 15:41:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71A54FADD; Tue, 27 Dec 2022 12:35:33 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 495BB61241; Tue, 27 Dec 2022 20:35:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D16A0C433F1; Tue, 27 Dec 2022 20:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672173331; bh=Q2bL3I0b2iBFMA3Rdw6QtfNMQihRPrg1Vifl5Yphj7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pjVjKIyx+N+1uffGQrtB6ycu8FBG1M9GiYJMSNECFFAlqiqpNwJOITQZYHagvDpfY k2kzHQ4liWzVef/szhectaaZ/Y4GKM7/vK2vOWD8K1mPqVPFP1svuRkOTWJNqT3Zhi HMnve35EppDtuG6buHvlcFyDZ6TqFdDkDGqZix1AnsqXoPGozuF18hs7lKSHiH3Y6u 7yhxNqeJ0Pw9rVBItPzWw8G2cid+b5Tni2WPFSLmXSICd3mGJtmIuHfHonmv+MYC7o Y8/JsvMYnayiVGlsPr5Dtu8Qrq/GCErXfSpnm5IJlf6bOjPXHHymZ2cD3e85UVWOPO zcMoVqlneeGCQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Terry Junge , Jiri Kosina , Sasha Levin , jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 7/7] HID: plantronics: Additional PIDs for double volume key presses quirk Date: Tue, 27 Dec 2022 15:35:10 -0500 Message-Id: <20221227203512.1214527-7-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221227203512.1214527-1-sashal@kernel.org> References: <20221227203512.1214527-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 From: Terry Junge [ Upstream commit 3d57f36c89d8ba32b2c312f397a37fd1a2dc7cfc ] I no longer work for Plantronics (aka Poly, aka HP) and do not have access to the headsets in order to test. However, as noted by Maxim, the other 32xx models that share the same base code set as the 3220 would need the same quirk. This patch adds the PIDs for the rest of the Blackwire 32XX product family that require the quirk. Plantronics Blackwire 3210 Series (047f:c055) Plantronics Blackwire 3215 Series (047f:c057) Plantronics Blackwire 3225 Series (047f:c058) Quote from previous patch by Maxim Mikityanskiy Plantronics Blackwire 3220 Series (047f:c056) sends HID reports twice for each volume key press. This patch adds a quirk to hid-plantronics for this product ID, which will ignore the second volume key press if it happens within 5 ms from the last one that was handled. The patch was tested on the mentioned model only, it shouldn't affect other models, however, this quirk might be needed for them too. Auto-repeat (when a key is held pressed) is not affected, because the rate is about 3 times per second, which is far less frequent than once in 5 ms. End quote Signed-off-by: Terry Junge Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-plantronics.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 70a693f8f034..18c4d8104ee9 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -948,7 +948,10 @@ #define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003 #define USB_VENDOR_ID_PLANTRONICS 0x047f +#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES 0xc055 #define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES 0xc056 +#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES 0xc057 +#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES 0xc058 #define USB_VENDOR_ID_PANASONIC 0x04da #define USB_DEVICE_ID_PANABOARD_UBT780 0x1044 diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c index e81b7cec2d12..3d414ae194ac 100644 --- a/drivers/hid/hid-plantronics.c +++ b/drivers/hid/hid-plantronics.c @@ -198,9 +198,18 @@ static int plantronics_probe(struct hid_device *hdev, } static const struct hid_device_id plantronics_devices[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, + USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES), + .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS }, { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES), .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS }, + { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, + USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES), + .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS }, + { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, + USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES), + .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS }, { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) }, { } }; -- 2.35.1