Commit cbc596d0 authored by Terry Junge's avatar Terry Junge Committed by Kleber Sacilotto de Souza

HID: hid-plantronics: Re-resend Update to map button for PTT products

BugLink: https://bugs.launchpad.net/bugs/1791953

[ Upstream commit 37e376df ]

Add a mapping for Push-To-Talk joystick trigger button.

Tested on ChromeBox/ChromeBook with various Plantronics devices.
Signed-off-by: default avatarTerry Junge <terry.junge@plantronics.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent d4187449
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Plantronics USB HID Driver * Plantronics USB HID Driver
* *
* Copyright (c) 2014 JD Cole <jd.cole@plantronics.com> * Copyright (c) 2014 JD Cole <jd.cole@plantronics.com>
* Copyright (c) 2015 Terry Junge <terry.junge@plantronics.com> * Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
*/ */
/* /*
...@@ -48,6 +48,10 @@ static int plantronics_input_mapping(struct hid_device *hdev, ...@@ -48,6 +48,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
unsigned short mapped_key; unsigned short mapped_key;
unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev); 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 */ /* handle volume up/down mapping */
/* non-standard types or multi-HID interfaces - plt_type is PID */ /* non-standard types or multi-HID interfaces - plt_type is PID */
if (!(plt_type & HID_USAGE_PAGE)) { if (!(plt_type & HID_USAGE_PAGE)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment