From b857c651e7e369c12098007772549f817b3bf961 Mon Sep 17 00:00:00 2001 From: Navaho Gunleg Date: Fri, 30 Jun 2006 09:44:03 +0200 Subject: [PATCH] USB: add support for WiseGroup., Ltd SmartJoy Dual PLUS Adapter This patch is to get the WiseGroup.,Ltd SmartJoy Dual Plus PS2-to-USB Adapter [0x6677:0x8802] correctly detected. It sets the NOGET and MULTI_INPUT quirks to make 2 joystick nodes appear in stead of only one. (As of yet, only confirmed working by myself.) Signed-off-by: Navaho Gunleg Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/hid-core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/usb/input') diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index b9fb9687f92..8ea9c915fbf 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -1507,6 +1507,9 @@ void hid_init_reports(struct hid_device *hid) #define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104 #define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866 +#define USB_VENDOR_ID_WISEGROUP_LTD 0x6677 +#define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802 + #define USB_VENDOR_ID_CODEMERCS 0x07c0 #define USB_DEVICE_ID_CODEMERCS_IOW40 0x1500 #define USB_DEVICE_ID_CODEMERCS_IOW24 0x1501 @@ -1670,6 +1673,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, -- cgit v1.2.3-70-g09d2 From 168ffc444663e34a20e6d04b6c31e5d495b283fb Mon Sep 17 00:00:00 2001 From: Marko Macek Date: Sun, 30 Jul 2006 01:55:12 -0700 Subject: USB: ati_remote.c: autorepeat fix When HZ is set to 250 (new default) or 100, the time span during which repeated events from the device are ignored could be too small due to ms->jiffies rounding. This causes the auto repeat to kick in early making it impossible for the user to generate individual press/release events. Increate the timeout to compensate. Signed-off-by: Marko Macek Cc: Dmitry Torokhov Cc: Vojtech Pavlik Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/ati_remote.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/usb/input') diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c index 05d2d6012eb..df198cf76f5 100644 --- a/drivers/usb/input/ati_remote.c +++ b/drivers/usb/input/ati_remote.c @@ -152,9 +152,8 @@ static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; * events. The hardware generates 5 events for the first keypress * and we have to take this into account for an accurate repeat * behaviour. - * (HZ / 20) == 50 ms and works well for me. */ -#define FILTER_TIME (HZ / 20) +#define FILTER_TIME 60 /* msec */ struct ati_remote { struct input_dev *idev; @@ -467,7 +466,7 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) /* Filter duplicate events which happen "too close" together. */ if ((ati_remote->old_data[0] == data[1]) && (ati_remote->old_data[1] == data[2]) && - time_before(jiffies, ati_remote->old_jiffies + FILTER_TIME)) { + time_before(jiffies, ati_remote->old_jiffies + msecs_to_jiffies(FILTER_TIME))) { ati_remote->repeat_count++; } else { ati_remote->repeat_count = 0; -- cgit v1.2.3-70-g09d2