aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2008-03-14 11:53:07 -0400
committerJiri Kosina <jkosina@suse.cz>2008-04-22 05:34:57 -0400
commit5f1ab74f650b392ebcaa7cf3283e56d8dc6c7e56 (patch)
treef53c417f6353cdb66ba9c81ef1a2ba9f2073f5ad /drivers/hid/usbhid
parent974faac46455076c709a745f546b348017ad18dc (diff)
HID: Sunplus Wireless Desktop needs report descriptor fixup
This device has reports lower logical maximum compared to the real usages for Zoom+ and Zoom- it emits. This patch bumps the values in the report descriptor up, and also adjusts HID_MAX_USAGE accordingly. Reported-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-quirks.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 81dc5e353dd8..f06356512067 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -381,6 +381,9 @@
381#define USB_VENDOR_ID_SUN 0x0430 381#define USB_VENDOR_ID_SUN 0x0430
382#define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab 382#define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab
383 383
384#define USB_VENDOR_ID_SUNPLUS 0x04fc
385#define USB_DEVICE_ID_SUNPLUS_WDESKTOP 0x05d8
386
384#define USB_VENDOR_ID_TOPMAX 0x0663 387#define USB_VENDOR_ID_TOPMAX 0x0663
385#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103 388#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
386 389
@@ -735,6 +738,8 @@ static const struct hid_rdesc_blacklist {
735 738
736 { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE }, 739 { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE },
737 740
741 { USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP, HID_QUIRK_RDESC_SUNPLUS_WDESKTOP },
742
738 { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1, HID_QUIRK_RDESC_SWAPPED_MIN_MAX }, 743 { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1, HID_QUIRK_RDESC_SWAPPED_MIN_MAX },
739 { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2, HID_QUIRK_RDESC_SWAPPED_MIN_MAX }, 744 { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2, HID_QUIRK_RDESC_SWAPPED_MIN_MAX },
740 745
@@ -1009,6 +1014,17 @@ static void usbhid_fixup_logitech_descriptor(unsigned char *rdesc, int rsize)
1009 } 1014 }
1010} 1015}
1011 1016
1017static void usbhid_fixup_sunplus_wdesktop(unsigned char *rdesc, int rsize)
1018{
1019 if (rsize >= 107 && rdesc[104] == 0x26
1020 && rdesc[105] == 0x80
1021 && rdesc[106] == 0x03) {
1022 printk(KERN_INFO "Fixing up Sunplus Wireless Desktop report descriptor\n");
1023 rdesc[105] = rdesc[110] = 0x03;
1024 rdesc[106] = rdesc[111] = 0x21;
1025 }
1026}
1027
1012/* 1028/*
1013 * Samsung IrDA remote controller (reports as Cypress USB Mouse). 1029 * Samsung IrDA remote controller (reports as Cypress USB Mouse).
1014 * 1030 *
@@ -1182,4 +1198,7 @@ void usbhid_fixup_report_descriptor(const u16 idVendor, const u16 idProduct,
1182 __usbhid_fixup_report_descriptor(quirks, rdesc, rsize); 1198 __usbhid_fixup_report_descriptor(quirks, rdesc, rsize);
1183 } 1199 }
1184 1200
1201 if (quirks & HID_QUIRK_RDESC_SUNPLUS_WDESKTOP)
1202 usbhid_fixup_sunplus_wdesktop(rdesc, rsize);
1203
1185} 1204}