From dde5845a529ff753364a6d1aea61180946270bfa Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 8 Dec 2006 18:40:44 +0100 Subject: [PATCH] Generic HID layer - code split The "big main" split of USB HID code into generic HID code and USB-transport specific HID handling. Signed-off-by: Jiri Kosina Signed-off-by: Marcel Holtmann Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/hid-ff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/input/hid-ff.c') diff --git a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c index a8fc46c721c..4187f4ee9a9 100644 --- a/drivers/usb/input/hid-ff.c +++ b/drivers/usb/input/hid-ff.c @@ -32,7 +32,7 @@ #undef DEBUG #include -#include "hid.h" +#include /* * This table contains pointers to initializers. To add support for new -- cgit v1.2.3 From 229695e51efc4ed5e04ab471c82591d0f432909d Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 8 Dec 2006 18:40:53 +0100 Subject: [PATCH] Generic HID layer - API - fixed generic API (added neccessary EXPORT_SYMBOL, fixed hid.h to provide correct prototypes) - extended hid_device with open/close/event function pointers to driver-specific functions - added driver specific driver_data to hid_device Signed-off-by: Jiri Kosina Signed-off-by: Marcel Holtmann Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/hid-ff.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/usb/input/hid-ff.c') diff --git a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c index 4187f4ee9a9..7ecdafa8eb7 100644 --- a/drivers/usb/input/hid-ff.c +++ b/drivers/usb/input/hid-ff.c @@ -79,3 +79,5 @@ int hid_ff_init(struct hid_device* hid) return init->init(hid); } +EXPORT_SYMBOL_GPL(hid_ff_init); + -- cgit v1.2.3 From 4916b3a57fc94664677d439b911b8aaf86c7ec23 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 8 Dec 2006 18:41:03 +0100 Subject: [PATCH] Generic HID layer - USB API - 'dev' in struct hid_device changed from struct usb_device to struct device and fixed all the users - renamed functions which are part of USB HID API from 'hid_*' to 'usbhid_*' - force feedback initialization moved from common part into USB-specific driver - added usbhid.h header for USB HID API users - removed USB-specific fields from struct hid_device and moved them to new usbhid_device, which is pointed to by hid_device->driver_data - fixed all USB users to use this new structure Signed-off-by: Jiri Kosina Signed-off-by: Marcel Holtmann Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/hid-ff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/input/hid-ff.c') diff --git a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c index 7ecdafa8eb7..f8f660ee3fa 100644 --- a/drivers/usb/input/hid-ff.c +++ b/drivers/usb/input/hid-ff.c @@ -70,8 +70,8 @@ static struct hid_ff_initializer inits[] = { int hid_ff_init(struct hid_device* hid) { struct hid_ff_initializer *init; - int vendor = le16_to_cpu(hid->dev->descriptor.idVendor); - int product = le16_to_cpu(hid->dev->descriptor.idProduct); + int vendor = le16_to_cpu(to_usb_device(hid->dev)->descriptor.idVendor); + int product = le16_to_cpu(to_usb_device(hid->dev)->descriptor.idProduct); for (init = inits; init->idVendor; init++) if (init->idVendor == vendor && init->idProduct == product) -- cgit v1.2.3 From be8209753b014f2d7a92b2ec3ff82db478fc86d1 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Fri, 19 Jan 2007 19:28:17 +0200 Subject: HID: put usb_interface instead of usb_device into hid->dev to fix udevinfo breakage The commit 4916b3a57fc94664677d439b911b8aaf86c7ec23 introduced a hid regression between 2.6.19 and 2.6.20-rc1. The device put in input_dev->cdev is now of type usb_device instead of usb_interface. Before: > # readlink -f /sys/class/input/input6/event4/device > /sys/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.1 After: > # readlink -f /sys/class/input/input3/event3/device > /sys/devices/pci0000:00/0000:00:10.0/usb1/1-1 This causes breakage: > # udevinfo -q all -n /dev/input/event3 > P: /class/input/input3/event3 > N: input/event3 > S: input/by-path/pci-1-1--event- > E: ID_SERIAL=noserial > E: ID_PATH=pci-1-1- No ID_MODEL, ID_VENDOR, ID_REVISION, ID_TYPE etc etc. Fix this by assigning the intf->dev into hid->dev, and fixing all the users. Signed-off-by: Anssi Hannula Signed-off-by: Jiri Kosina --- drivers/usb/input/hid-ff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/usb/input/hid-ff.c') diff --git a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c index f8f660ee3fa..59ed65e7a62 100644 --- a/drivers/usb/input/hid-ff.c +++ b/drivers/usb/input/hid-ff.c @@ -33,6 +33,7 @@ #include #include +#include "usbhid.h" /* * This table contains pointers to initializers. To add support for new @@ -70,8 +71,8 @@ static struct hid_ff_initializer inits[] = { int hid_ff_init(struct hid_device* hid) { struct hid_ff_initializer *init; - int vendor = le16_to_cpu(to_usb_device(hid->dev)->descriptor.idVendor); - int product = le16_to_cpu(to_usb_device(hid->dev)->descriptor.idProduct); + int vendor = le16_to_cpu(hid_to_usb_dev(hid)->descriptor.idVendor); + int product = le16_to_cpu(hid_to_usb_dev(hid)->descriptor.idProduct); for (init = inits; init->idVendor; init++) if (init->idVendor == vendor && init->idProduct == product) -- 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 --- drivers/usb/input/hid-ff.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb/input/hid-ff.c') diff --git a/drivers/usb/input/hid-ff.c b/drivers/usb/input/hid-ff.c index 59ed65e7a62..5d145058a5c 100644 --- a/drivers/usb/input/hid-ff.c +++ b/drivers/usb/input/hid-ff.c @@ -58,6 +58,9 @@ static struct hid_ff_initializer inits[] = { { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */ { 0x46d, 0xc219, hid_lgff_init }, /* Logitech Cordless rumble pad 2 */ #endif +#ifdef CONFIG_PANTHERLORD_FF + { 0x810, 0x0001, hid_plff_init }, +#endif #ifdef CONFIG_THRUSTMASTER_FF { 0x44f, 0xb304, hid_tmff_init }, #endif -- cgit v1.2.3