Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <terry.junge@plantronics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Terry Junge and committed by
Jiri Kosina
37e376df 008464a9

+5 -1
+5 -1
drivers/hid/hid-plantronics.c
··· 2 2 * Plantronics USB HID Driver 3 3 * 4 4 * Copyright (c) 2014 JD Cole <jd.cole@plantronics.com> 5 - * Copyright (c) 2015 Terry Junge <terry.junge@plantronics.com> 5 + * Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com> 6 6 */ 7 7 8 8 /* ··· 47 47 { 48 48 unsigned short mapped_key; 49 49 unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev); 50 + 51 + /* special case for PTT products */ 52 + if (field->application == HID_GD_JOYSTICK) 53 + goto defaulted; 50 54 51 55 /* handle volume up/down mapping */ 52 56 /* non-standard types or multi-HID interfaces - plt_type is PID */