From 5556feae1c4e1cf2021b5fb2ef99973125de2250 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Thu, 11 Jan 2007 16:51:17 +0200 Subject: hid: quirk for multi-input devices with unneeded output reports Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports when enumerating reports on a hid-input device. Add this quirk and HID_QUIRK_MULTI_INPUT to 0810:0001. PantherLord Twin USB Joystick, 0810:0001 has separate input reports for 2 distinct game controllers in the same interface, so it needs HID_QUIRK_MULTI_INPUT. However, the device also contains one output report per controller which is used to control the force feedback function, and we do not want those to appear as separate input devices as well. The simplest approach seems to be to add a quirk to skip output reports on 0810:0001, and allow the force feedback driver to handle those. Signed-off-by: Anssi Hannula Signed-off-by: Jiri Kosina --- include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 342b4e639acb..523b8341e791 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -264,6 +264,7 @@ struct hid_item { #define HID_QUIRK_INVERT_HWHEEL 0x00004000 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 +#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 /* * This is the global environment of the parser. This information is -- cgit v1.2.3 From 20eb12790670985c8e30821218993bd260387b89 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Thu, 11 Jan 2007 16:51:18 +0200 Subject: hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter Add a force feedback driver for PantherLord USB/PS2 2in1 Adapter, 0810:0001. The device identifies itself as "Twin USB Joystick". Signed-off-by: Anssi Hannula Signed-off-by: Jiri Kosina --- include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 523b8341e791..18d0f2ce817f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -504,6 +504,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size); int hid_ff_init(struct hid_device *hid); int hid_lgff_init(struct hid_device *hid); +int hid_plff_init(struct hid_device *hid); int hid_tmff_init(struct hid_device *hid); int hid_zpff_init(struct hid_device *hid); #ifdef CONFIG_HID_PID -- cgit v1.2.3 From c080d89ad91e98fec0e8fc5f448a1ad899bd85c7 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Thu, 25 Jan 2007 11:43:31 +0100 Subject: HID: hid debug from hid-debug.h to hid layer hid-debug.h contains a lot of code, and should not therefore be a header. This patch moves the code to generic hid layer as .c source, and introduces CONFIG_HID_DEBUG to conditionally compile it, instead of playing with #define DEBUG and including hid-debug.h. Signed-off-by: Jiri Kosina --- include/linux/hid.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 18d0f2ce817f..189460e7b03f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -472,16 +472,6 @@ struct hid_descriptor { struct hid_class_descriptor desc[1]; } __attribute__ ((packed)); -#ifdef DEBUG -#include "hid-debug.h" -#else -#define hid_dump_input(a,b) do { } while (0) -#define hid_dump_device(c) do { } while (0) -#define hid_dump_field(a,b) do { } while (0) -#define resolv_usage(a) do { } while (0) -#define resolv_event(a,b) do { } while (0) -#endif - /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ /* We ignore a few input applications that are not widely used */ #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) -- cgit v1.2.3 From 7c379146005d277982acde02da44c773de5e7e5a Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Wed, 24 Jan 2007 11:54:19 +0100 Subject: HID: API - fix leftovers of hidinput API in USB HID hidinput_{open,close}() functions do not belong to usbhid, but to the generic HID layer. Move them, and fix hooks in struct hid_device, so that now the callbacks are done to transport-specific _open() functions, but not input_open() functions. Signed-off-by: Jiri Kosina --- include/linux/hid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 189460e7b03f..829690d8071e 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -431,8 +431,8 @@ struct hid_device { /* device report descriptor */ /* device-specific function pointers */ int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); - int (*hidinput_open) (struct input_dev *); - void (*hidinput_close) (struct input_dev *); + int (*hid_open) (struct hid_device *); + void (*hid_close) (struct hid_device *); /* hiddev event handler */ void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field, -- cgit v1.2.3 From a417a21e10831bca695b4ba9c74f4ddf5a95ac06 Mon Sep 17 00:00:00 2001 From: Soeren Sonnenburg Date: Mon, 5 Feb 2007 10:06:01 +0100 Subject: USB HID: handle multi-interface devices for Apple macbook pro properly Some HID devices by Apple have both keyboard and mouse interfaces; the keyboard interface is handled by usbhid, but the mouse (really touchpad) interface must be handled by the separate 'appletouch' driver. Using HID_QUIRK_IGNORE will make hiddev ignore both interfaces, therefore a new quirk flag to ignore only the mouse interface is required. Signed-off-by: Soeren Sonnenburg Signed-off-by: Sergey Vlasov Signed-off-by: Jiri Kosina --- include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 829690d8071e..93173fe45634 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -265,6 +265,7 @@ struct hid_item { #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 +#define HID_QUIRK_IGNORE_MOUSE 0x00040000 /* * This is the global environment of the parser. This information is -- cgit v1.2.3 From 4a1a4d8b87389e35c3af04c0d0a95f6a0391b964 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Mon, 15 Jan 2007 20:11:52 -0800 Subject: USB: ps3 controller hid quirk Add the USB HID quirk HID_QUIRK_SONY_PS3_CONTROLLER. This sends an HID_REQ_GET_REPORT to the the PS3 controller to put the device into 'operational mode'. Signed-off-by: Geoff Levand Cc: David Brownell Signed-off-by: Greg Kroah-Hartman --- include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/hid.h') diff --git a/include/linux/hid.h b/include/linux/hid.h index 93173fe45634..d26b08f461f2 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -266,6 +266,7 @@ struct hid_item { #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 #define HID_QUIRK_IGNORE_MOUSE 0x00040000 +#define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 /* * This is the global environment of the parser. This information is -- cgit v1.2.3