From eb8141ccd32d422fa11c6e2108cae4c40456d811 Mon Sep 17 00:00:00 2001 From: Lamarque Vieira Souza Date: Fri, 2 Oct 2009 15:04:44 +0200 Subject: HID: blacklist Acer Ferrari 4005 optical mouse Marks Acer Bluetooth Optical Rechargeable Mouse from Ferrari 4005 notebook to be ignored by hid core. This change makes hid core to use input session instead of hid session with that mouse. With hid session the mouse cursor moves too laggy, using input session corrects this problem. Signed-off-by: Lamarque V. Souza Signed-off-by: Jiri Kosina --- drivers/hid/hid-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 7d05c4bb201..9d66d535fad 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1620,6 +1620,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) }, { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) }, -- cgit v1.2.3 From 88adb72bcf3b1cc6b440fda9fa97bc2151245fc5 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 2 Oct 2009 18:29:34 +0200 Subject: HID: fix MODULE_AUTHOR usage in HID modules Remove unused (in usbhid module) DRIVER_AUTHOR macrco and properly use multiple MODULE_AUTHOR() instances in both modules. Signed-off-by: Jiri Kosina --- drivers/hid/hid-core.c | 4 +++- drivers/hid/usbhid/hid-core.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 9d66d535fad..c4cb8e9d0e7 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -40,7 +40,6 @@ */ #define DRIVER_VERSION "v2.6" -#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina" #define DRIVER_DESC "HID core driver" #define DRIVER_LICENSE "GPL" @@ -1919,5 +1918,8 @@ static void __exit hid_exit(void) module_init(hid_init); module_exit(hid_exit); +MODULE_AUTHOR("Andreas Gal"); +MODULE_AUTHOR("Vojtech Pavlik"); +MODULE_AUTHOR("Jiri Kosina"); MODULE_LICENSE(DRIVER_LICENSE); diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 03bd703255a..390225dbb66 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -42,7 +42,6 @@ */ #define DRIVER_VERSION "v2.6" -#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina" #define DRIVER_DESC "USB HID core driver" #define DRIVER_LICENSE "GPL" @@ -1423,6 +1422,8 @@ static void __exit hid_exit(void) module_init(hid_init); module_exit(hid_exit); -MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_AUTHOR("Andreas Gal"); +MODULE_AUTHOR("Vojtech Pavlik"); +MODULE_AUTHOR("Jiri Kosina"); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE(DRIVER_LICENSE); -- cgit v1.2.3 From ccabcd2dbe08c3b44ebae18e43ba212dfcb706d1 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 2 Oct 2009 18:31:36 +0200 Subject: HID: remove useless DRIVER_VERSION macro DRIVER_VERSION has no use whatosoever, it has been set to "2.6" for ages. Remove it. Signed-off-by: Jiri Kosina --- drivers/hid/hid-core.c | 1 - drivers/hid/usbhid/hid-core.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index c4cb8e9d0e7..6d5c84573b3 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -39,7 +39,6 @@ * Version Information */ -#define DRIVER_VERSION "v2.6" #define DRIVER_DESC "HID core driver" #define DRIVER_LICENSE "GPL" diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 390225dbb66..3f56e9c02e6 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -41,7 +41,6 @@ * Version Information */ -#define DRIVER_VERSION "v2.6" #define DRIVER_DESC "USB HID core driver" #define DRIVER_LICENSE "GPL" @@ -1394,8 +1393,7 @@ static int __init hid_init(void) retval = usb_register(&hid_driver); if (retval) goto usb_register_fail; - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); return 0; usb_register_fail: -- cgit v1.2.3 From 73cdcf567aaa4b348a1150c85ac5917c32f3c7f9 Mon Sep 17 00:00:00 2001 From: Keith Rutkowski Date: Mon, 19 Oct 2009 16:55:55 -0400 Subject: HID: add NOGET quirk for another device from CH Products This patch was applied to Fedora 11's 2.6.30.8-64 kernel and adds the NOGET quirk for CH Products industrial class joystick(s). It is like the previous CH Products NOGET quirk patch for their consumer class joysticks. Without the quirk, the joystick would only be detected and would not function at all in kernels >= 2.6.29. It was tested with a CH Products 3-axis 5-button industrial joystick, product #HG-434IS000-U-217. Signed-off-by: Keith Rutkowski Signed-off-by: Jiri Kosina --- drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index adbef5d069c..1d99c81ad17 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -117,6 +117,7 @@ #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 #define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff +#define USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK 0x00d3 #define USB_VENDOR_ID_CHERRY 0x046a #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 0d9045aa2c4..2d445b27021 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -53,6 +53,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET }, { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, -- cgit v1.2.3 From 1168df7e1cbfa4b45ba2bfd982ff535df50c273c Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Wed, 4 Nov 2009 00:57:35 +0200 Subject: HID: pidff - fix unnecessary loop iterations on reset When encountering a strange value in the pool report, pidff_reset will always refetch the report 20 times, even if one of the retries results in a sane value. This is because a temporary variable being used to store the value is not being updated inside the loop. Fix it by using the value directly in the loop. Reported-by: Roel Kluin Signed-off-by: Anssi Hannula Signed-off-by: Jiri Kosina --- drivers/hid/usbhid/hid-pidff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index 484e3eec2f8..e565dbe91d9 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -1181,12 +1181,11 @@ static void pidff_reset(struct pidff_device *pidff) usbhid_wait_io(hid); if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { - int sim_effects = pidff->pool[PID_SIMULTANEOUS_MAX].value[0]; - while (sim_effects < 2) { + while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) { if (i++ > 20) { printk(KERN_WARNING "hid-pidff: device reports " "%d simultaneous effects\n", - sim_effects); + pidff->pool[PID_SIMULTANEOUS_MAX].value[0]); break; } debug("pid_pool requested again"); -- cgit v1.2.3 From 5b915d9e6dc3d22fedde91dfef1cb1a8fa9a1870 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Thu, 5 Nov 2009 14:08:03 +0100 Subject: HID: fixup quirk for NCR devices NCR devices are terminally broken by design -- they claim themselves to contain proper input applications in their HID report descriptor, but behave very badly if treated in standard way. According to NCR developers, the devices get confused when queried for reports in a standard way, rendering them unusable. NCR is shipping application called "RPSL" that can be used to drive these devices through hiddev, under the assumption that in-kernel driver doesn't perform initial report query. If it does, neither in-kernel nor hiddev-based driver can operate with these devices any more. Introduce a quirk that skips the report query for all NCR devices. The previous NOGET quirk was wrong and had been introduced because I misunderstood the nature of brokenness of these devices. Signed-off-by: Jiri Kosina --- drivers/hid/usbhid/hid-core.c | 3 ++- drivers/hid/usbhid/hid-quirks.c | 2 +- include/linux/hid.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 3f56e9c02e6..0258289f3b3 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -996,7 +996,8 @@ static int usbhid_start(struct hid_device *hid) usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma; usbhid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP); - usbhid_init_reports(hid); + if (!(hid->quirks & HID_QUIRK_NO_INIT_REPORTS)) + usbhid_init_reports(hid); set_bit(HID_STARTED, &usbhid->iofl); diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 2d445b27021..c3b02f59792 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -281,7 +281,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct) if (idVendor == USB_VENDOR_ID_NCR && idProduct >= USB_DEVICE_ID_NCR_FIRST && idProduct <= USB_DEVICE_ID_NCR_LAST) - return HID_QUIRK_NOGET; + return HID_QUIRK_NO_INIT_REPORTS; down_read(&dquirks_rwsem); bl_entry = usbhid_exists_dquirk(idVendor, idProduct); diff --git a/include/linux/hid.h b/include/linux/hid.h index 10f62841674..87093652dda 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -312,6 +312,7 @@ struct hid_item { #define HID_QUIRK_MULTI_INPUT 0x00000040 #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 +#define HID_QUIRK_NO_INIT_REPORTS 0x20000000 /* * This is the global environment of the parser. This information is -- cgit v1.2.3 From 6c857730438cceb56a94ade3029899f52adf3b90 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Thu, 5 Nov 2009 16:01:13 +0100 Subject: HID: remove BKL from hiddev_ioctl_usage() The race between ioctl and disconnect is guarded by low level hiddev device mutex (existancelock) since the commit 07903407 ("HID: hiddev cleanup -- handle all error conditions properly"), therefore we can remove the lock_kernel() from hiddev_ioctl_usage(). Acked-by: Oliver Neukum Signed-off-by: Jiri Kosina --- drivers/hid/usbhid/hiddev.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 8b6ee247bfe..867e08433e4 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -450,7 +450,6 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL); if (!uref_multi) return -ENOMEM; - lock_kernel(); uref = &uref_multi->uref; if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) { if (copy_from_user(uref_multi, user_arg, @@ -528,7 +527,6 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, case HIDIOCGCOLLECTIONINDEX: i = field->usage[uref->usage_index].collection_index; - unlock_kernel(); kfree(uref_multi); return i; case HIDIOCGUSAGES: @@ -547,15 +545,12 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, } goodreturn: - unlock_kernel(); kfree(uref_multi); return 0; fault: - unlock_kernel(); kfree(uref_multi); return -EFAULT; inval: - unlock_kernel(); kfree(uref_multi); return -EINVAL; } -- cgit v1.2.3 From 24985cf68612a5617d396b0b188cec807641cde1 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 13 Nov 2009 10:45:53 +0100 Subject: HID: support Logitech/3DConnexion SpaceTraveler and SpaceNavigator These devices wrongly report their axes as relative instead of absolute. Fix this in up report descriptor of the device before it enters the parser. Reported-by: simon.windows@gmail.com Signed-off-by: Jiri Kosina --- drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-lg.c | 13 +++++++++++++ 3 files changed, 17 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 6d5c84573b3..30d85a1b414 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1324,6 +1324,8 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 1d99c81ad17..2fd2aae332b 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -305,6 +305,8 @@ #define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 #define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512 #define USB_DEVICE_ID_MX3000_RECEIVER 0xc513 +#define USB_DEVICE_ID_SPACETRAVELLER 0xc623 +#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626 #define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704 #define USB_DEVICE_ID_DINOVO_EDGE 0xc714 #define USB_DEVICE_ID_DINOVO_MINI 0xc71f diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 0f870a3243e..8e28f1dc40a 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c @@ -33,6 +33,7 @@ #define LG_NOGET 0x100 #define LG_FF 0x200 #define LG_FF2 0x400 +#define LG_RDESC_REL_ABS 0x800 /* * Certain Logitech keyboards send in report #3 keys which are far @@ -51,6 +52,13 @@ static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, rdesc[84] = rdesc[89] = 0x4d; rdesc[85] = rdesc[90] = 0x10; } + if ((quirks & LG_RDESC_REL_ABS) && rsize >= 50 && + rdesc[32] == 0x81 && rdesc[33] == 0x06 && + rdesc[49] == 0x81 && rdesc[50] == 0x06) { + dev_info(&hdev->dev, "fixing up rel/abs in Logitech " + "report descriptor\n"); + rdesc[33] = rdesc[50] = 0x02; + } } #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ @@ -303,8 +311,13 @@ static const struct hid_device_id lg_devices[] = { .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), .driver_data = LG_FF2 }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR), + .driver_data = LG_RDESC_REL_ABS }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER), + .driver_data = LG_RDESC_REL_ABS }, { } }; + MODULE_DEVICE_TABLE(hid, lg_devices); static struct hid_driver lg_driver = { -- cgit v1.2.3 From 66d61bec697e99476c2fb095f9a6ead3be2e1c21 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Tue, 24 Nov 2009 18:22:20 +0100 Subject: HID: make Media key on Logitech DiNovo Mini work Put proper mapping of Media key on Logitech DiNovo Mini. According to the specification from Logitech webpage, this key is intended to launch a Media center. Reported-by: Stefan Plattner Signed-off-by: Jiri Kosina --- drivers/hid/hid-lg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 0f870a3243e..4a489785647 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c @@ -89,6 +89,22 @@ static int lg_ultrax_remote_mapping(struct hid_input *hi, return 1; } +static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage, + unsigned long **bit, int *max) +{ + if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) + return 0; + + switch (usage->hid & HID_USAGE) { + + case 0x00d: lg_map_key_clear(KEY_MEDIA); break; + default: + return 0; + + } + return 1; +} + static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage, unsigned long **bit, int *max) { @@ -164,6 +180,10 @@ static int lg_input_mapping(struct hid_device *hdev, struct hid_input *hi, lg_ultrax_remote_mapping(hi, usage, bit, max)) return 1; + if (hdev->product == USB_DEVICE_ID_DINOVO_MINI && + lg_dinovo_mapping(hi, usage, bit, max)) + return 1; + if ((quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max)) return 1; -- cgit v1.2.3 From e8d0eab4d9eda9f5e97852f780f020bfb134f9f0 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Wed, 2 Dec 2009 22:54:11 +0100 Subject: HID: add support for Acan FG-8100 barcode reader Acan FG-8100 barcode reader (0x04b4/0xbca1) has vendor ID of cypress and requires the same MIN/MAX swap descriptor quirk as other barcode readers from cypress. Reported-by: Stijn Ghesquiere Signed-off-by: Jiri Kosina --- drivers/hid/hid-core.c | 1 + drivers/hid/hid-cypress.c | 2 ++ drivers/hid/hid-ids.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 7d05c4bb201..e2e8741fdb5 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1294,6 +1294,7 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, diff --git a/drivers/hid/hid-cypress.c b/drivers/hid/hid-cypress.c index 62e9cb10e88..998b6f443d7 100644 --- a/drivers/hid/hid-cypress.c +++ b/drivers/hid/hid-cypress.c @@ -126,6 +126,8 @@ static const struct hid_device_id cp_devices[] = { .driver_data = CP_RDESC_SWAPPED_MIN_MAX }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2), .driver_data = CP_RDESC_SWAPPED_MIN_MAX }, + { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3), + .driver_data = CP_RDESC_SWAPPED_MIN_MAX }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE), .driver_data = CP_2WHEEL_MOUSE_HACK }, { } diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index adbef5d069c..656c015cf79 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -145,6 +145,7 @@ #define USB_DEVICE_ID_CYPRESS_ULTRAMOUSE 0x7417 #define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61 #define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64 +#define USB_DEVICE_ID_CYPRESS_BARCODE_3 0xbca1 #define USB_VENDOR_ID_DEALEXTREAME 0x10c5 #define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a -- cgit v1.2.3 From 9db630b48a99adb4156e205b812fba8959644280 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Dec 2009 15:08:10 +1000 Subject: HID: add multi-input quirk for NextWindow Touchscreen. These touchscreens are mounted onto HP TouchSmart and the Dell Studio One 19. Without a quirk they report a wrong button set and the x/y coordinates through ABS_Z/ABS_RX, confusing the higher levels (most notably X.Org's evdev driver). Device id 0x003 covers models 1900, 2150, and 2700 [1] though testing could only be performed on a model 1900. [1] http://www.nextwindow.com/nextwindow_support/latest_tech_info.html Signed-off-by: Peter Hutterer Signed-off-by: Jiri Kosina --- drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 656c015cf79..0ceabbb8e01 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -347,6 +347,9 @@ #define USB_VENDOR_ID_NEC 0x073e #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 +#define USB_VENDOR_ID_NEXTWINDOW 0x1926 +#define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003 + #define USB_VENDOR_ID_NTRIG 0x1b96 #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001 diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 0d9045aa2c4..e9875625dcf 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -37,6 +37,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_NATSU, USB_DEVICE_ID_NATSU_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD }, + { USB_VENDOR_ID_NEXTWINDOW, USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN, HID_QUIRK_MULTI_INPUT}, { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD }, -- cgit v1.2.3