diff mbox

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

Message ID 1525120366-29304-1-git-send-email-terry.junge@plantronics.com (mailing list archive)
State New, archived
Headers show

Commit Message

Junge, Terry April 30, 2018, 8:32 p.m. UTC
Resend again with no trailing legal disclaimers added by mail server

Added mapping for Push-To-Talk joystick trigger button.

Patched against git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git

Tested on ChromeBox/ChromeBook with various Plantronics devices.

Signed-off-by: Terry Junge <terry.junge@plantronics.com>
---
 drivers/hid/hid-plantronics.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Jiri Kosina May 16, 2018, 9:07 a.m. UTC | #1
Applied to for-4.18/plantronics, thanks.
diff mbox

Patch

diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c
index febb21e..584b10d 100644
--- 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 <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)) {