Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1110075imm; Wed, 1 Aug 2018 10:20:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdYsx9DIM7NveTPI1gNOp7eKWe5ermK9k3EroKfTfLFsBUs9Y1Y6uK/sTYGNh+DthoB1VTQ X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr24990826pgh.28.1533144029974; Wed, 01 Aug 2018 10:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144029; cv=none; d=google.com; s=arc-20160816; b=SLoPD3eVqh4iZMOCvIRAu0fcoCJfsqPmBD/QSNR2hlPir9oW6busSRTLrD4GV6knY3 eMp4eFz1i4K/MAWkElemdi/i+ahgI98H13I4uRVj2lFFUvwIzJW13UQqbK2MY9H7X48e lfFPS5a2yGZdNI/t9kRnq6ZIpfsbVgRyxrFYN9RmOluI2pnpzeN2NVj9aYhONR+z1BDu VGLGIDEGs00ey6GH/jqNXmZ8wX8RyEJd7bg1QRDnSkCamaeMshYnNXOgvdzJQXcGqcgC aqalt1zbFVLXowpwvYolK+r/jr0txqpxBgNl8IpYRPcIznmCvorsgfI4F7eEgTIdcdGf 6YHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WzDEz0k7mcNfP07yrX+eAjjVWy3v3QDrRPZ4L87zaLs=; b=E0bkdPRtKy5ml+EPOvAznyh/gQoOgbEWrO5qUgKh4+o8dawCXCKps5HcTU9R8/nTyv wfYYq4n4bRO9F1wjTxEjCsalOdBHKV0hy5ebQ5cNc/eHbyriFoExbT+y4JGn2kHLw5du GlU5vLv6rx7tIDPvuGRlTdDvLPi7EsDchB+bBb/ksgIRIfLRgh6KMM5F4UVqLxlbaZyq 5zqJmK87dRUO5xI2vVhJzuD5ggFIsc+PxjCRC3+l9aenkDLPp19ZE1B8B5PLgsWzSlH9 bPmGjqUCZ6XpuCUD3YuKG+T1CTOiDrjaNykx/DCc3oi6gyLruCleN9qm9vA32vjFQzg5 P8Ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18-v6si17923469pfk.78.2018.08.01.10.20.15; Wed, 01 Aug 2018 10:20:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404997AbeHATFR (ORCPT + 99 others); Wed, 1 Aug 2018 15:05:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47356 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403817AbeHATFQ (ORCPT ); Wed, 1 Aug 2018 15:05:16 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D4994CC6; Wed, 1 Aug 2018 17:18:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Terry Junge , Jiri Kosina , Sasha Levin Subject: [PATCH 4.14 135/246] HID: hid-plantronics: Re-resend Update to map button for PTT products Date: Wed, 1 Aug 2018 18:50:45 +0200 Message-Id: <20180801165018.202737279@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Terry Junge [ Upstream commit 37e376df5f4993677c33968a0c19b0c5acbf1108 ] Add a mapping for Push-To-Talk joystick trigger button. Tested on ChromeBox/ChromeBook with various Plantronics devices. Signed-off-by: Terry Junge Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-plantronics.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/hid/hid-plantronics.c +++ b/drivers/hid/hid-plantronics.c @@ -2,7 +2,7 @@ * Plantronics USB HID Driver * * Copyright (c) 2014 JD Cole - * Copyright (c) 2015 Terry Junge + * Copyright (c) 2015-2018 Terry Junge */ /* @@ -48,6 +48,10 @@ static int plantronics_input_mapping(str unsigned short mapped_key; unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev); + /* special case for PTT products */ + if (field->application == HID_GD_JOYSTICK) + goto defaulted; + /* handle volume up/down mapping */ /* non-standard types or multi-HID interfaces - plt_type is PID */ if (!(plt_type & HID_USAGE_PAGE)) {