Skip to content

Commit

Permalink
HID: hid-plantronics: Re-resend Update to map button for PTT products
Browse files Browse the repository at this point in the history
Add a mapping for Push-To-Talk joystick trigger button.

Tested on ChromeBox/ChromeBook with various Plantronics devices.

Signed-off-by: Terry Junge <terry.junge@plantronics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Terry Junge authored and Jiri Kosina committed May 16, 2018
1 parent 008464a commit 37e376d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/hid/hid-plantronics.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Plantronics USB HID Driver
*
* 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>
*/

/*
Expand Down Expand Up @@ -48,6 +48,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
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)) {
Expand Down

0 comments on commit 37e376d

Please sign in to comment.