HID: move pantherlord FF processing
PATCH 1/5 HID: move pantherlord FF processing
Move the force feedback processing into a separate module.
--- drivers/hid/Kconfig | 16 +++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 2 + drivers/hid/hid-dummy.c | 3 + drivers/hid/hid-ids.h | 2 + drivers/hid/hid-pl.c | 205 +++++++++++++++++++++++++++++++++++++++ drivers/hid/usbhid/Kconfig | 8 -- drivers/hid/usbhid/Makefile | 3 - drivers/hid/usbhid/hid-ff.c | 4 - drivers/hid/usbhid/hid-plff.c | 139 -------------------------- drivers/hid/usbhid/hid-quirks.c | 1 - include/linux/hid.h | 1 - 12 files changed, 229 insertions(+), 156 deletions(-) create mode 100644 drivers/hid/hid-pl.c delete mode 100644 drivers/hid/usbhid/hid-plff.c
drivers/hid/Kconfig +16 -0
@@ -199,6 +199,22 @@ config HID_MONTEREY ---help--- Support for Monterey Genius KB29E. +config HID_PANTHERLORD + tristate "Pantherlord" + default m + depends on USB_HID + ---help--- + Support for PantherLord/GreenAsia based device support (including + force feedback). + +config PANTHERLORD_FF + bool "Force feedback support" + depends on HID_PANTHERLORD + select INPUT_FF_MEMLESS + help + Say Y here if you have a PantherLord/GreenAsia based game controller + or adapter and want to enable force feedback support for it. + config HID_PETALYNX tristate "Petalynx" default m
drivers/hid/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_HID_GYRATION) += hid-gyration.o obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o +obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o obj-$(CONFIG_HID_SONY) += hid-sony.o
drivers/hid/hid-core.c +2 -0
@@ -1411,6 +1411,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, + { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) },
@@ -1426,6 +1427,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2) }, { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN) }, { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER) }, + { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, { HID_USB_DEVICE(USB_VENDOR_ID_GRETAGMACBETH, USB_DEVICE_ID_GRETAGMACBETH_HUEY) }, { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE) }, { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB) },
drivers/hid/hid-dummy.c +3 -0
@@ -40,6 +40,9 @@ static int __init hid_dummy_init(void)#ifdef CONFIG_HID_MONTEREY_MODULE HID_COMPAT_CALL_DRIVER (monterey);#endif +#ifdef CONFIG_HID_PANTHERLORD_MODULE +HID_COMPAT_CALL_DRIVER (pantherlord); +#endif #ifdef CONFIG_HID_PETALYNX_MODULE HID_COMPAT_CALL_DRIVER (petalynx);#endif
drivers/hid/hid-ids.h +2 -0
@@ -169,6 +169,8 @@#define USB_DEVICE_ID_GOGOPEN 0x00ce#define USB_DEVICE_ID_PENPOWER 0x00f4 +#define USB_VENDOR_ID_GREENASIA 0x0e8f +#define USB_VENDOR_ID_GRETAGMACBETH 0x0971#define USB_DEVICE_ID_GRETAGMACBETH_HUEY 0x2005
drivers/hid/hid-pl.c new file +205 -0
205 lines not on this page · raw message
drivers/hid/usbhid/Kconfig +0 -8
@@ -44,14 +44,6 @@ config HID_PID feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such devices. -config PANTHERLORD_FF - bool "PantherLord/GreenAsia based device support" - depends on HID_FF - select INPUT_FF_MEMLESS if USB_HID - help - Say Y here if you have a PantherLord/GreenAsia based game controller - or adapter and want to enable force feedback support for it. - config THRUSTMASTER_FF bool "ThrustMaster devices support" depends on HID_FF
drivers/hid/usbhid/Makefile +0 -3
@@ -13,9 +13,6 @@ endif ifeq ($(CONFIG_HID_PID),y) usbhid-objs += hid-pidff.o endif -ifeq ($(CONFIG_PANTHERLORD_FF),y) - usbhid-objs += hid-plff.o -endif ifeq ($(CONFIG_THRUSTMASTER_FF),y) usbhid-objs += hid-tmff.o endif
drivers/hid/usbhid/hid-ff.c +0 -4
@@ -50,10 +50,6 @@ struct hid_ff_initializer {* be a PID device */ static struct hid_ff_initializer inits[] = { -#ifdef CONFIG_PANTHERLORD_FF - { 0x810, 0x0001, hid_plff_init }, /* "Twin USB Joystick" */ - { 0xe8f, 0x0003, hid_plff_init }, /* "GreenAsia Inc. USB Joystick " */ -#endif#ifdef CONFIG_THRUSTMASTER_FF { 0x44f, 0xb300, hid_tmff_init }, { 0x44f, 0xb304, hid_tmff_init },
drivers/hid/usbhid/hid-plff.c deleted +0 -139
139 lines not on this page · raw message
drivers/hid/usbhid/hid-quirks.c +0 -1
@@ -32,7 +32,6 @@ static const struct hid_blacklist { { USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD }, - { USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
include/linux/hid.h +0 -1
@@ -760,7 +760,6 @@ void usbhid_set_leds(struct hid_device *hid);#ifdef CONFIG_HID_FF int hid_ff_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
Signature · 1 line
1.6.0.1
PATCH 2/5 HID: move thrustmaster FF processing
--- drivers/hid/Kconfig | 9 ++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 4 + drivers/hid/hid-dummy.c | 3 + drivers/hid/hid-ids.h | 2 + drivers/hid/hid-tmff.c | 267 +++++++++++++++++++++++++++++++++++++++++ drivers/hid/usbhid/Kconfig | 11 -- drivers/hid/usbhid/Makefile | 3 - drivers/hid/usbhid/hid-ff.c | 6 - drivers/hid/usbhid/hid-tmff.c | 225 ---------------------------------- include/linux/hid.h | 1 - 11 files changed, 286 insertions(+), 246 deletions(-) create mode 100644 drivers/hid/hid-tmff.c delete mode 100644 drivers/hid/usbhid/hid-tmff.c
drivers/hid/Kconfig +9 -0
@@ -243,6 +243,15 @@ config HID_SUNPLUS ---help--- Support for Sunplus WDesktop input device. +config THRUSTMASTER_FF + tristate "ThrustMaster devices support" + default m + depends on USB_HID + select INPUT_FF_MEMLESS + help + Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or + a THRUSTMASTER Ferrari GT Rumble Force or Force Feedback Wheel. + endmenu endif # HID_SUPPORT
drivers/hid/Makefile +1 -0
@@ -37,6 +37,7 @@ obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o obj-$(CONFIG_HID_SONY) += hid-sony.o obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o +obj-$(CONFIG_THRUSTMASTER_FF) += hid-tmff.o obj-$(CONFIG_USB_HID) += usbhid/ obj-$(CONFIG_USB_MOUSE) += usbhid/
drivers/hid/hid-core.c +4 -0
@@ -1516,6 +1516,10 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD) }, { HID_USB_DEVICE(USB_VENDOR_ID_TENX, USB_DEVICE_ID_TENX_IBUDDY1) }, { HID_USB_DEVICE(USB_VENDOR_ID_TENX, USB_DEVICE_ID_TENX_IBUDDY2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, { HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO) }, { HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP) }, { HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) },
drivers/hid/hid-dummy.c +3 -0
@@ -55,6 +55,9 @@ static int __init hid_dummy_init(void)#ifdef CONFIG_HID_SUNPLUS_MODULE HID_COMPAT_CALL_DRIVER (sunplus);#endif +#ifdef CONFIG_THRUSTMASTER_FF_MODULE +HID_COMPAT_CALL_DRIVER (thrustmaster); +#endif return -EIO ; }
drivers/hid/hid-ids.h +2 -0
@@ -357,6 +357,8 @@#define USB_DEVICE_ID_TENX_IBUDDY1 0x0001#define USB_DEVICE_ID_TENX_IBUDDY2 0x0002 +#define USB_VENDOR_ID_THRUSTMASTER 0x044f +#define USB_VENDOR_ID_TOPMAX 0x0663#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
drivers/hid/hid-tmff.c new file +267 -0
267 lines not on this page · raw message
drivers/hid/usbhid/Kconfig +0 -11
@@ -44,17 +44,6 @@ config HID_PID feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such devices. -config THRUSTMASTER_FF - bool "ThrustMaster devices support" - depends on HID_FF - select INPUT_FF_MEMLESS if USB_HID - help - Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or - a THRUSTMASTER Ferrari GT Rumble Force or Force Feedback Wheel, - and want to enable force feedback support for it. - Note: if you say N here, this device will still be supported, but without - force feedback. - config ZEROPLUS_FF bool "Zeroplus based game controller support" depends on HID_FF
drivers/hid/usbhid/Makefile +0 -3
@@ -13,9 +13,6 @@ endif ifeq ($(CONFIG_HID_PID),y) usbhid-objs += hid-pidff.o endif -ifeq ($(CONFIG_THRUSTMASTER_FF),y) - usbhid-objs += hid-tmff.o -endif ifeq ($(CONFIG_ZEROPLUS_FF),y) usbhid-objs += hid-zpff.o endif
drivers/hid/usbhid/hid-ff.c +0 -6
@@ -50,12 +50,6 @@ struct hid_ff_initializer {* be a PID device */ static struct hid_ff_initializer inits[] = { -#ifdef CONFIG_THRUSTMASTER_FF - { 0x44f, 0xb300, hid_tmff_init }, - { 0x44f, 0xb304, hid_tmff_init }, - { 0x44f, 0xb651, hid_tmff_init }, /* FGT Rumble Force Wheel */ - { 0x44f, 0xb654, hid_tmff_init }, /* FGT Force Feedback Wheel */ -#endif#ifdef CONFIG_ZEROPLUS_FF { 0xc12, 0x0005, hid_zpff_init }, { 0xc12, 0x0030, hid_zpff_init },
drivers/hid/usbhid/hid-tmff.c deleted +0 -225
225 lines not on this page · raw message
include/linux/hid.h +0 -1
@@ -760,7 +760,6 @@ void usbhid_set_leds(struct hid_device *hid);#ifdef CONFIG_HID_FF int hid_ff_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 int hid_pidff_init (struct hid_device *hid);
Signature · 1 line
1.6.0.1
PATCH 3/5 HID: move zeroplus FF processing
--- drivers/hid/Kconfig | 8 ++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 2 + drivers/hid/hid-dummy.c | 3 + drivers/hid/hid-ids.h | 2 + drivers/hid/hid-zpff.c | 162 +++++++++++++++++++++++++++++++++++++++++ drivers/hid/usbhid/Kconfig | 8 -- drivers/hid/usbhid/Makefile | 3 - drivers/hid/usbhid/hid-ff.c | 4 - drivers/hid/usbhid/hid-zpff.c | 107 --------------------------- include/linux/hid.h | 1 - 11 files changed, 178 insertions(+), 123 deletions(-) create mode 100644 drivers/hid/hid-zpff.c delete mode 100644 drivers/hid/usbhid/hid-zpff.c
drivers/hid/Kconfig +8 -0
@@ -252,6 +252,14 @@ config THRUSTMASTER_FF Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or a THRUSTMASTER Ferrari GT Rumble Force or Force Feedback Wheel. +config ZEROPLUS_FF + tristate "Zeroplus based game controller support" + default m + depends on USB_HID + select INPUT_FF_MEMLESS + help + Say Y here if you have a Zeroplus based game controller. + endmenu endif # HID_SUPPORT
drivers/hid/Makefile +1 -0
@@ -38,6 +38,7 @@ obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o obj-$(CONFIG_HID_SONY) += hid-sony.o obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o obj-$(CONFIG_THRUSTMASTER_FF) += hid-tmff.o +obj-$(CONFIG_ZEROPLUS_FF) += hid-zpff.o obj-$(CONFIG_USB_HID) += usbhid/ obj-$(CONFIG_USB_MOUSE) += usbhid/
drivers/hid/hid-core.c +2 -0
@@ -1530,6 +1530,8 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20) }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) }, { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) }, { } };
drivers/hid/hid-dummy.c +3 -0
@@ -58,6 +58,9 @@ static int __init hid_dummy_init(void)#ifdef CONFIG_THRUSTMASTER_FF_MODULE HID_COMPAT_CALL_DRIVER (thrustmaster);#endif +#ifdef CONFIG_ZEROPLUS_FF_MODULE +HID_COMPAT_CALL_DRIVER (zeroplus); +#endif return -EIO ; }
drivers/hid/hid-ids.h +2 -0
@@ -388,6 +388,8 @@#define USB_VENDOR_ID_YEALINK 0x6993#define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001 +#define USB_VENDOR_ID_ZEROPLUS 0x0c12 +#define USB_VENDOR_ID_KYE 0x0458#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
drivers/hid/hid-zpff.c new file +162 -0
162 lines not on this page · raw message
drivers/hid/usbhid/Kconfig +0 -8
@@ -44,14 +44,6 @@ config HID_PID feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such devices. -config ZEROPLUS_FF - bool "Zeroplus based game controller support" - depends on HID_FF - select INPUT_FF_MEMLESS if USB_HID - help - Say Y here if you have a Zeroplus based game controller and want to - enable force feedback for it. - config USB_HIDDEV bool "/dev/hiddev raw HID device support" depends on USB_HID
drivers/hid/usbhid/Makefile +0 -3
@@ -13,9 +13,6 @@ endif ifeq ($(CONFIG_HID_PID),y) usbhid-objs += hid-pidff.o endif -ifeq ($(CONFIG_ZEROPLUS_FF),y) - usbhid-objs += hid-zpff.o -endif ifeq ($(CONFIG_HID_FF),y) usbhid-objs += hid-ff.o endif
drivers/hid/usbhid/hid-ff.c +0 -4
@@ -50,10 +50,6 @@ struct hid_ff_initializer {* be a PID device */ static struct hid_ff_initializer inits[] = { -#ifdef CONFIG_ZEROPLUS_FF - { 0xc12, 0x0005, hid_zpff_init }, - { 0xc12, 0x0030, hid_zpff_init }, -#endif {0 ,0 , hid_pidff_init}/* Matches anything */ };
drivers/hid/usbhid/hid-zpff.c deleted +0 -107
107 lines not on this page · raw message
include/linux/hid.h +0 -1
@@ -760,7 +760,6 @@ void usbhid_set_leds(struct hid_device *hid);#ifdef CONFIG_HID_FF int hid_ff_init (struct hid_device *hid); -int hid_zpff_init (struct hid_device *hid);#ifdef CONFIG_HID_PID int hid_pidff_init (struct hid_device *hid);#else
Signature · 1 line
1.6.0.1
PATCH 4/5 HID: remove hid-ff
hid-ff.c now calls only pidff (generic driver), the special ones are now in separate drivers. Invoke pidff on all non-special directly.
--- drivers/hid/usbhid/Kconfig | 13 -------- drivers/hid/usbhid/Makefile | 3 -- drivers/hid/usbhid/hid-core.c | 2 +- drivers/hid/usbhid/hid-ff.c | 69 ----------------------------------------- include/linux/hid.h | 9 +----- 5 files changed, 2 insertions(+), 94 deletions(-) delete mode 100644 drivers/hid/usbhid/hid-ff.c
drivers/hid/usbhid/Kconfig +0 -13
@@ -24,21 +24,8 @@ config USB_HID comment "Input core support is needed for USB HID input layer or HIDBP support" depends on USB_HID && INPUT=n -config HID_FF - bool "Force feedback support (EXPERIMENTAL)" - depends on USB_HID && EXPERIMENTAL - help - Say Y here is you want force feedback support for a few HID devices. - See below for a list of supported devices. - - See <file:Documentation/input/ff.txt> for a description of the force - feedback API. - - If unsure, say N. - config HID_PID bool "PID device support" - depends on HID_FF help Say Y here if you have a PID-compliant device and wish to enable force feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such
drivers/hid/usbhid/Makefile +0 -3
@@ -13,9 +13,6 @@ endif ifeq ($(CONFIG_HID_PID),y) usbhid-objs += hid-pidff.o endif -ifeq ($(CONFIG_HID_FF),y) - usbhid-objs += hid-ff.o -endif obj-$(CONFIG_USB_HID) += usbhid.o obj-$(CONFIG_USB_KBD) += usbkbd.o
drivers/hid/usbhid/hid-core.c +1 -1
@@ -935,7 +935,7 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)usb_set_intfdata (intf, hid); hid->ll_driver = &usb_hid_driver; hid->hid_output_raw_report = usbhid_output_raw_report; - hid->ff_init = hid_ff_init; + hid->ff_init = hid_pidff_init;#ifdef CONFIG_USB_HIDDEV hid->hiddev_connect = hiddev_connect; hid->hiddev_hid_event = hiddev_hid_event;
drivers/hid/usbhid/hid-ff.c deleted +0 -69
69 lines not on this page · raw message
include/linux/hid.h +1 -8
@@ -757,17 +757,10 @@ int usbhid_quirks_init(char **quirks_param);void usbhid_quirks_exit (void );void usbhid_set_leds (struct hid_device *hid); -#ifdef CONFIG_HID_FF -int hid_ff_init (struct hid_device *hid); -#ifdef CONFIG_HID_PID int hid_pidff_init (struct hid_device *hid);#else -static inline int hid_pidff_init (struct hid_device *hid) {return -ENODEV ; } -#endif - -#else -#define hid_ff_init NULL +#define hid_pidff_init NULL#endif #ifdef CONFIG_HID_DEBUG
Signature · 1 line
1.6.0.1
PATCH 5/5 HID: convert to dev_* prints
Since we have a real device bound to a driver, we may use struct device for printing. Use dev_* functions instead of printks in 4 drivers.
--- drivers/hid/hid-lg2ff.c | 8 ++++---- drivers/hid/hid-pl.c | 11 ++++++----- drivers/hid/hid-tmff.c | 26 ++++++++++++++------------ drivers/hid/hid-zpff.c | 6 +++--- 4 files changed, 27 insertions(+), 24 deletions(-)
drivers/hid/hid-lg2ff.c +4 -4
@@ -71,18 +71,18 @@ int lg2ff_init(struct hid_device *hid)int error;if (list_empty (report_list)) { -printk (KERN_ERR "hid-lg2ff: no output report found\n" ); +dev_err (&hid->dev,"no output report found\n" );return -ENODEV ; } report = list_entry(report_list->next, struct hid_report, list);if (report->maxfield <1 ) { -printk (KERN_ERR "hid-lg2ff: output report is empty\n" ); +dev_err (&hid->dev,"output report is empty\n" );return -ENODEV ; }if (report->field[0 ]->report_count <7 ) { -printk (KERN_ERR "hid-lg2ff: not enough values in the field\n" ); +dev_err (&hid->dev,"not enough values in the field\n" );return -ENODEV ; }
@@ -109,7 +109,7 @@ int lg2ff_init(struct hid_device *hid)usbhid_submit_report (hid, report,USB_DIR_OUT ); -printk (KERN_INFO "Force feedback for Logitech Rumblepad 2 by " +dev_info (&hid->dev,"Force feedback for Logitech Rumblepad 2 by " "Anssi Hannula <[email protected]>\n" );return 0 ;
drivers/hid/hid-pl.c +6 -5
@@ -90,7 +90,7 @@ static int plff_init(struct hid_device *hid)currently unknown. */ if (list_empty (report_list)) { -printk (KERN_ERR "hid-plff: no output reports found\n" ); +dev_err (&hid->dev,"no output reports found\n" );return -ENODEV ; }
@@ -99,18 +99,19 @@ static int plff_init(struct hid_device *hid) report_ptr = report_ptr->next;if (report_ptr == report_list) { -printk (KERN_ERR "hid-plff: required output report is missing\n" ); +dev_err (&hid->dev,"required output report is " +"missing\n" );return -ENODEV ; } report = list_entry(report_ptr, struct hid_report, list);if (report->maxfield <1 ) { -printk (KERN_ERR "hid-plff: no fields in the report\n" ); +dev_err (&hid->dev,"no fields in the report\n" );return -ENODEV ; }if (report->field[0 ]->report_count <4 ) { -printk (KERN_ERR "hid-plff: not enough values in the field\n" ); +dev_err (&hid->dev,"not enough values in the field\n" );return -ENODEV ; }
@@ -136,7 +137,7 @@ static int plff_init(struct hid_device *hid)usbhid_submit_report (hid, plff->report,USB_DIR_OUT ); } -printk (KERN_INFO "hid-plff: Force feedback for PantherLord/GreenAsia " +dev_info (&hid->dev,"Force feedback for PantherLord/GreenAsia " "devices by Anssi Hannula <[email protected]>\n" );return 0 ;
drivers/hid/hid-tmff.c +14 -12
@@ -149,27 +149,28 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)switch (field->usage[0 ].hid) {case THRUSTMASTER_USAGE_FF :if (field->report_count <2 ) { -warn ("ignoring FF field with " -"report_count < 2" ); +dev_warn (&hid->dev,"ignoring FF field " +"with report_count < 2\n" );continue ; }if (field->logical_maximum == field->logical_minimum) { -warn ("ignoring FF field with " -"logical_maximum == " -"logical_minimum" ); +dev_warn (&hid->dev,"ignoring FF field " +"with logical_maximum " +"== logical_minimum\n" );continue ; }if (tmff->report && tmff->report != report) { -warn ("ignoring FF field in other " -"report" ); +dev_warn (&hid->dev,"ignoring FF field " +"in other report\n" );continue ; }if (tmff->ff_field && tmff->ff_field != field) { -warn ("ignoring duplicate FF field" ); +dev_warn (&hid->dev,"ignoring " +"duplicate FF field\n" );continue ; }
@@ -182,7 +183,8 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)break ;default : -warn ("ignoring unknown output usage %08x" , +dev_warn (&hid->dev,"ignoring unknown output " +"usage %08x\n" , field->usage[0 ].hid);continue ; }
@@ -190,7 +192,7 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits) }if (!tmff->report) { -err ("cant find FF field in output reports\n" ); +dev_err (&hid->dev,"can't find FF field in output reports\n" ); error = -ENODEV ; goto fail; }
@@ -199,8 +201,8 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)if (error) goto fail; -info ("Force feedback for ThrustMaster devices by Zinx Verituse " -"<[email protected]>" ); +dev_info (&hid->dev,"force feedback for ThrustMaster devices by Zinx " +"Verituse <[email protected]>" );return 0 ; fail:
drivers/hid/hid-zpff.c +3 -3
@@ -73,14 +73,14 @@ static int zpff_init(struct hid_device *hid)int error;if (list_empty (report_list)) { -printk (KERN_ERR "hid-zpff: no output report found\n" ); +dev_err (&hid->dev,"no output report found\n" );return -ENODEV ; } report = list_entry(report_list->next, struct hid_report, list);if (report->maxfield <4 ) { -printk (KERN_ERR "hid-zpff: not enough fields in report\n" ); +dev_err (&hid->dev,"not enough fields in report\n" );return -ENODEV ; }
@@ -103,7 +103,7 @@ static int zpff_init(struct hid_device *hid) zpff->report->field[3 ]->value[0 ] =0x00 ;usbhid_submit_report (hid, zpff->report,USB_DIR_OUT ); -printk (KERN_INFO "Force feedback for Zeroplus based devices by " +dev_info (&hid->dev,"force feedback for Zeroplus based devices by " "Anssi Hannula <[email protected]>\n" );return 0 ;
Signature · 1 line
1.6.0.1
drivers/hid/Kconfig config HID_MONTEREY · line 208
Quoted 7 lines · Jiri Slaby
drivers/hid/Kconfig +7
-0+config HID_PANTHERLORD + tristate "Pantherlord" + default m + depends on USB_HID + ---help--- + Support for PantherLord/GreenAsia based device support (including + force feedback).
This comment is a little bit misleading -- it says that CONFIG_HID_PANTHERLORD includes force feedback support, but you have to turn that on explicitly by:
drivers/hid/Kconfig config HID_MONTEREY · line 211
Quoted 2 lines
drivers/hid/Kconfig +2
-0+config PANTHERLORD_FF + bool "Force feedback support"
Also, mentioning "Pantherlord" here might make things more clear, this way it looks like this enables generic force feedback.
I will fix that up in the patchset, if you don't mind, and apply.
Signature · 2 lines
Jiri Kosina SUSE Labs