This source file includes following definitions.
- nti_usbsun_report_fixup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <linux/device.h>
20 #include <linux/input.h>
21 #include <linux/hid.h>
22 #include <linux/module.h>
23
24 #include "hid-ids.h"
25
26 MODULE_AUTHOR("Jonathan Klabunde Tomer <jktomer@google.com>");
27 MODULE_DESCRIPTION("HID driver for Network Technologies USB-SUN keyboard adapter");
28
29
30
31
32 static __u8 *nti_usbsun_report_fixup(struct hid_device *hdev, __u8 *rdesc,
33 unsigned int *rsize)
34 {
35 if (*rsize >= 60 && rdesc[53] == 0x65 && rdesc[59] == 0x65) {
36 hid_info(hdev, "fixing up NTI USB-SUN keyboard adapter report descriptor\n");
37 rdesc[53] = rdesc[59] = 0xe7;
38 }
39 return rdesc;
40 }
41
42 static const struct hid_device_id nti_devices[] = {
43 { HID_USB_DEVICE(USB_VENDOR_ID_NTI, USB_DEVICE_ID_USB_SUN) },
44 { }
45 };
46 MODULE_DEVICE_TABLE(hid, nti_devices);
47
48 static struct hid_driver nti_driver = {
49 .name = "nti",
50 .id_table = nti_devices,
51 .report_fixup = nti_usbsun_report_fixup
52 };
53
54 module_hid_driver(nti_driver);
55
56 MODULE_LICENSE("GPL");