HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd

Many vendors highspeed devices give erroneously fullspeed interval value in
endpoint descriptor for interrupt endpoints. This quirk fixes up that by
recalculating the right value for highspeed device.

At the time of hid configuration this quirk calculates which highspeed interval
value gives same interval delay as, or next smaller then, what it would be if
the original value would be interpreted as fullspeed value. In subsequent urbs
that new value is used instead.

Forming the 'hid->name' in usb_hid_config() was moved up to accommodate more
descriptive printk reporting the fixup.

In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared
HID-keyboard. It reports value 16 which means 4,069s in highspeed while
obviously 16ms was intended. In this case quirk calculates new value to be 8
which gives when interpreted as highspeed value 16ms as wanted. The behavior of
the device was verified to be what expected both before and after the patch.

Signed-off-by: Pekka Sarnila <sarnila@adit.fi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index e29a057..54b8f83 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -32,6 +32,9 @@
 #define USB_VENDOR_ID_ADS_TECH 		0x06e1
 #define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X	0xa155
 
+#define USB_VENDOR_ID_AFATECH		0x15a4
+#define USB_DEVICE_ID_AFATECH_AF9016	0x9016
+
 #define USB_VENDOR_ID_AIPTEK		0x08ca
 #define USB_DEVICE_ID_AIPTEK_01		0x0001
 #define USB_DEVICE_ID_AIPTEK_10		0x0010
@@ -436,6 +439,8 @@
 	
 	{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE, HID_QUIRK_DUPLICATE_USAGES },
 
+	{ USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016, HID_QUIRK_FULLSPEED_INTERVAL },
+
 	{ USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM, HID_QUIRK_HIDDEV },
 	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4, HID_QUIRK_HIDDEV | HID_QUIRK_IGNORE_HIDINPUT },
 	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV, HID_QUIRK_HIDINPUT },