2 * USB HID quirks support for Network Technologies, Inc. "USB-SUN" USB
3 * adapter for pre-USB Sun keyboards
5 * Copyright (c) 2011 Google, Inc.
7 * Based on HID apple driver by
8 * Copyright (c) 1999 Andreas Gal
9 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
10 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
11 * Copyright (c) 2006-2007 Jiri Kosina
12 * Copyright (c) 2008 Jiri Slaby <jirislaby@gmail.com>
16 * This program is free software; you can redistribute it and/or modify it
17 * under the terms of the GNU General Public License as published by the Free
18 * Software Foundation; either version 2 of the License, or (at your option)
22 #include <linux/device.h>
23 #include <linux/input.h>
24 #include <linux/hid.h>
25 #include <linux/module.h>
29 MODULE_AUTHOR("Jonathan Klabunde Tomer <jktomer@google.com>");
30 MODULE_DESCRIPTION("HID driver for Network Technologies USB-SUN keyboard adapter");
33 * NTI Sun keyboard adapter has wrong logical maximum in report descriptor
35 static __u8
*nti_usbsun_report_fixup(struct hid_device
*hdev
, __u8
*rdesc
,
38 if (*rsize
>= 60 && rdesc
[53] == 0x65 && rdesc
[59] == 0x65) {
39 hid_info(hdev
, "fixing up NTI USB-SUN keyboard adapter report descriptor\n");
40 rdesc
[53] = rdesc
[59] = 0xe7;
45 static const struct hid_device_id nti_devices
[] = {
46 { HID_USB_DEVICE(USB_VENDOR_ID_NTI
, USB_DEVICE_ID_USB_SUN
) },
49 MODULE_DEVICE_TABLE(hid
, nti_devices
);
51 static struct hid_driver nti_driver
= {
53 .id_table
= nti_devices
,
54 .report_fixup
= nti_usbsun_report_fixup
57 module_hid_driver(nti_driver
);
59 MODULE_LICENSE("GPL");