2 * Plantronics USB HID Driver
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
17 #include <linux/hid.h>
18 #include <linux/module.h>
20 static int plantronics_input_mapping(struct hid_device *hdev,
22 struct hid_field *field,
23 struct hid_usage *usage,
24 unsigned long **bit, int *max)
26 if (field->application == HID_CP_CONSUMERCONTROL
27 && (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) {
28 hid_dbg(hdev, "usage: %08x (appl: %08x) - defaulted\n",
29 usage->hid, field->application);
33 hid_dbg(hdev, "usage: %08x (appl: %08x) - ignored\n",
34 usage->hid, field->application);
39 static const struct hid_device_id plantronics_devices[] = {
40 { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
43 MODULE_DEVICE_TABLE(hid, plantronics_devices);
45 static struct hid_driver plantronics_driver = {
46 .name = "plantronics",
47 .id_table = plantronics_devices,
48 .input_mapping = plantronics_input_mapping,
50 module_hid_driver(plantronics_driver);
54 MODULE_DESCRIPTION("Plantronics USB HID Driver");
55 MODULE_LICENSE("GPL");