Message ID | 1522801129-20747-1-git-send-email-terry.junge@plantronics.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 3 Apr 2018, Terry Junge wrote: > Resend with corrected email addresses > > 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(-) > > 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)) { > -- > 2.7.4 Thanks, will apply, but ... > CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, > files or previous e-mail messages attached to it, may contain > information that is confidential and/or legally privileged. If you are > not the intended recipient, or a person responsible for delivering it to > the intended recipient, please DO NOT disclose the contents to another > person, store or copy the information in any medium, or use any of the > information contained in or attached to this transmission for any > purpose. If you have received this transmission in error, please > immediately notify the sender by reply email or at > privacy@plantronics.com, and destroy the original transmission and its > attachments without reading or saving in any manner. ... before that happens, could you please resend without this uncomfy legalese? Thanks,
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)) {
Resend with corrected email addresses 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(-) -- 2.7.4