[PATCH] HID: hid-plantronics: Update to map button for PTT products

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx>
- *  Copyright (c) 2015 Terry Junge <terry.junge@xxxxxxxxxxxxxxx>
+ *  Copyright (c) 2015-2018 Terry Junge <terry.junge@xxxxxxxxxxxxxxx>
  */

 /*
@@ -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


________________________________

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@xxxxxxxxxxxxxxx, and destroy the original transmission and its attachments without reading or saving in any manner.

For further information about Plantronics - the Company, its products, brands, partners, please visit our website www.plantronics.com.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux