Skip to content

Commit 37e376d

Browse files
terryjungeJiri Kosina
authored andcommitted
HID: hid-plantronics: Re-resend Update to map button for PTT products
Add a mapping for Push-To-Talk joystick trigger button. Tested on ChromeBox/ChromeBook with various Plantronics devices. Signed-off-by: Terry Junge <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 008464a commit 37e376d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/hid/hid-plantronics.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Plantronics USB HID Driver
33
*
44
* Copyright (c) 2014 JD Cole <[email protected]>
5-
* Copyright (c) 2015 Terry Junge <[email protected]>
5+
* Copyright (c) 2015-2018 Terry Junge <[email protected]>
66
*/
77

88
/*
@@ -48,6 +48,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
4848
unsigned short mapped_key;
4949
unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev);
5050

51+
/* special case for PTT products */
52+
if (field->application == HID_GD_JOYSTICK)
53+
goto defaulted;
54+
5155
/* handle volume up/down mapping */
5256
/* non-standard types or multi-HID interfaces - plt_type is PID */
5357
if (!(plt_type & HID_USAGE_PAGE)) {

0 commit comments

Comments
 (0)