]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
HID: hid-plantronics: Re-resend Update to map button for PTT products
authorTerry Junge <terry.junge@plantronics.com>
Mon, 30 Apr 2018 20:32:46 +0000 (13:32 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 16 May 2018 09:06:40 +0000 (11:06 +0200)
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>
drivers/hid/hid-plantronics.c

index febb21ee190e99134ae995887ceeeb86721e1440..584b10d3fc3d84d026c56e4ae4b74fb7b2525d69 100644 (file)
@@ -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>
  */
 
 /*
@@ -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)) {