[PATCH] Added device to hid-ff

STALE7108d

13 messages, 5 authors, 2007-02-16 · open the first message on its own page

[PATCH] Added device to hid-ff

From: johann deneux <hidden>
Date: 2007-02-15 18:56:18

This patch (initially submitted by Valentin Zagura) adds the Logitech
Formula Force EX to the list of devices handled by hid-lgff.
Also updated the text of the Kconfig entry.

Signed-off-by: Johann Deneux <redacted>
--- linux-2.6.20.orig/drivers/usb/input/Kconfig    2007-02-04 19:44:
54.000000000 +0100
+++ linux-2.6.20/drivers/usb/input/Kconfig    2007-02-15 12:27:42.000000000+0100
@@ -56,17 +56,21 @@ config HID_PID
       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
       devices.

 config LOGITECH_FF
-    bool "Logitech WingMan *3D support"
+    bool "Logitech devices support"
     depends on HID_FF
     select INPUT_FF_MEMLESS if USB_HID
     help
       Say Y here if you have one of these devices:
       - Logitech WingMan Cordless RumblePad
+      - Logitech WingMan Cordless RumblePad 2
       - Logitech WingMan Force 3D
+      - Logitech Formula Force EX
+      - Logitech MOMO Force wheel
+
       and if you want to enable force feedback for them.
       Note: if you say N here, this device will still be supported, but
without
       force feedback.

 config THRUSTMASTER_FF
--- linux-2.6.20.orig/drivers/usb/input/hid-ff.c    2007-02-04 19:44:
54.000000000 +0100
+++ linux-2.6.20/drivers/usb/input/hid-ff.c    2007-02-15
12:16:53.000000000+0100
@@ -53,10 +53,11 @@ struct hid_ff_initializer {
  */
 static struct hid_ff_initializer inits[] = {
 #ifdef CONFIG_LOGITECH_FF
     { 0x46d, 0xc211, hid_lgff_init }, /* Logitech Cordless rumble pad */
     { 0x46d, 0xc283, hid_lgff_init }, /* Logitech Wingman Force 3d */
+    { 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */
     { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */
     { 0x46d, 0xc219, hid_lgff_init }, /* Logitech Cordless rumble pad 2 */
 #endif
 #ifdef CONFIG_THRUSTMASTER_FF
     { 0x44f, 0xb304, hid_tmff_init },

Re: [PATCH] Added device to hid-ff

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-15 19:17:13

On 2/15/07, johann deneux [off-list ref] wrote:
 config LOGITECH_FF
-    bool "Logitech WingMan *3D support"
+    bool "Logitech devices support"
I think I'll change this to "Logitech devices support (WingMan, etc)" and apply.

Thanks!

-- 
Dmitry

Re: [PATCH] Added device to hid-ff

From: STenyaK (Bruno Gonzalez) <hidden>
Date: 2007-02-15 19:40:59

Sorry for not providing a proper patch, could you please also add
         {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.

On Thu, 15 Feb 2007 19:56:18 +0100, johann deneux  
[off-list ref] wrote:
quoted hunk
This patch (initially submitted by Valentin Zagura) adds the Logitech
Formula Force EX to the list of devices handled by hid-lgff.
Also updated the text of the Kconfig entry.

Signed-off-by: Johann Deneux <redacted>
--- linux-2.6.20.orig/drivers/usb/input/Kconfig    2007-02-04 19:44:
54.000000000 +0100
+++ linux-2.6.20/drivers/usb/input/Kconfig    2007-02-15  
12:27:42.000000000+0100
@@ -56,17 +56,21 @@ config HID_PID
       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
       devices.

 config LOGITECH_FF
-    bool "Logitech WingMan *3D support"
+    bool "Logitech devices support"
     depends on HID_FF
     select INPUT_FF_MEMLESS if USB_HID
     help
       Say Y here if you have one of these devices:
       - Logitech WingMan Cordless RumblePad
+      - Logitech WingMan Cordless RumblePad 2
       - Logitech WingMan Force 3D
+      - Logitech Formula Force EX
+      - Logitech MOMO Force wheel
+
       and if you want to enable force feedback for them.
       Note: if you say N here, this device will still be supported, but
without
       force feedback.

 config THRUSTMASTER_FF
--- linux-2.6.20.orig/drivers/usb/input/hid-ff.c    2007-02-04 19:44:
54.000000000 +0100
+++ linux-2.6.20/drivers/usb/input/hid-ff.c    2007-02-15
12:16:53.000000000+0100
@@ -53,10 +53,11 @@ struct hid_ff_initializer {
  */
 static struct hid_ff_initializer inits[] = {
 #ifdef CONFIG_LOGITECH_FF
     { 0x46d, 0xc211, hid_lgff_init }, /* Logitech Cordless rumble pad */
     { 0x46d, 0xc283, hid_lgff_init }, /* Logitech Wingman Force 3d */
+    { 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */
     { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */
     { 0x46d, 0xc219, hid_lgff_init }, /* Logitech Cordless rumble pad 2  
*/
 #endif
 #ifdef CONFIG_THRUSTMASTER_FF
     { 0x44f, 0xb304, hid_tmff_init },


-- 
Saludos,
     STenyaK

_______________________________________________
Site:   http://1ksurvivor.homeip.net  <1kSurvivor>
         http://motorsport-sim.org     <Motorsport>
         http://kwh.iespana.es         <KuantikalWareHouse>
         http://emuletutorial.info     <EmuleTutorial>
ICQ:    153709484
Mail:   stenyak AT gmail DOT net

Re: [PATCH] Added device to hid-ff

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-15 19:42:16

On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.

-- 
Dmitry

Re: [PATCH] Added device to hid-ff

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-15 19:46:38

On 2/15/07, Dmitry Torokhov [off-list ref] wrote:
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Wait, 0x46d:0xc294 is device being added by the original patch as
Formula Force EX... Confused.

-- 
Dmitry

Re: [PATCH] Added device to hid-ff

From: Anssi Hannula <hidden>
Date: 2007-02-15 19:51:07

Dmitry Torokhov wrote:
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Hmm.. Shouldn't an entry also be added to the devices[] list in
hid-lgff.c for these devices? (and it seems one device is already
missing from there in the current kernel).

I'm not able to check right now, but I think some earlier kernels may
have defaulted to ff_joystick if no entry is present in devices[], hence
these devices working for some without the entry.
(so the alternative is to restore that behaviour)

BTW, shouldn't the PID/VID check in hid_lgff_init() do endian conversion?

-- 
Anssi Hannula

Re: [PATCH] Added device to hid-ff

From: STenyaK (Bruno Gonzalez) <hidden>
Date: 2007-02-15 19:53:43

I guess both steering wheels share the same model ID? I don't know, but I  
can tell the FFB didn't work until i added that line and recompiled my  
kernel. I got the ID using the "usbview" tool.

On Thu, 15 Feb 2007 20:46:38 +0100, Dmitry Torokhov  
[off-list ref] wrote:
On 2/15/07, Dmitry Torokhov [off-list ref] wrote:
quoted
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Wait, 0x46d:0xc294 is device being added by the original patch as
Formula Force EX... Confused.


-- 
Saludos,
     STenyaK

_______________________________________________
Site:   http://1ksurvivor.homeip.net  <1kSurvivor>
         http://motorsport-sim.org     <Motorsport>
         http://kwh.iespana.es         <KuantikalWareHouse>
         http://emuletutorial.info     <EmuleTutorial>
ICQ:    153709484
Mail:   stenyak AT gmail DOT net

Re: [PATCH] Added device to hid-ff

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-15 20:09:50

On 2/15/07, Anssi Hannula [off-list ref] wrote:
Dmitry Torokhov wrote:
quoted
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Hmm.. Shouldn't an entry also be added to the devices[] list in
hid-lgff.c for these devices? (and it seems one device is already
missing from there in the current kernel).
Yep. It looks like they should be mapped to ff_joystick, right?
I'm not able to check right now, but I think some earlier kernels may
have defaulted to ff_joystick if no entry is present in devices[], hence
these devices working for some without the entry.
(so the alternative is to restore that behaviour)

BTW, shouldn't the PID/VID check in hid_lgff_init() do endian conversion?
No, because input_id keeps this data in host format. See usb_to_input_id().

-- 
Dmitry

Re: [PATCH] Added device to hid-ff

From: Valentin Zagura <hidden>
Date: 2007-02-16 10:05:41



Wait, 0x46d:0xc294 is device being added by the original patch as
Formula Force EX... Confused.
Here is what I found on the net, maybe it will clear things out:
http://siv.mysite.wanadoo-members.co.uk/downloads/usbdevs.txt

046D:C294=Logitech Driving Force USB (HID)
046D:C294:2000=Logitech Driving Force EX USB (HID)
046D:C294:2100=Logitech Formula Force RX USB (HID)
046D:C294:2200=Logitech Driving Force RX USB (HID)


I have the EX model.

Valentin Zagura

Re: [PATCH] Added device to hid-ff

From: STenyaK (Bruno Gonzalez) <hidden>
Date: 2007-02-16 15:20:38

On Fri, 16 Feb 2007 11:05:41 +0100, Valentin Zagura [off-list ref]  
wrote:
Here is what I found on the net, maybe it will clear things out:
http://siv.mysite.wanadoo-members.co.uk/downloads/usbdevs.txt

046D:C294=Logitech Driving Force USB (HID)
046D:C294:2000=Logitech Driving Force EX USB (HID)
046D:C294:2100=Logitech Formula Force RX USB (HID)
046D:C294:2200=Logitech Driving Force RX USB (HID)
My wheel doesn't appear there. It's a new model (just a few months old).
This is the whole usbview output:

---------------------------------------------------------------------
G25 Racing Wheel
Speed: 12Mb/s (full)
USB Version:  2.00
Device Class: 00(>ifc )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 16
Number of Configurations: 1
Vendor Id: 046d
Product Id: c294
Revision Number: 12.22

Config Number: 1
	Number of Interfaces: 1
	Attributes: 80
	MaxPower Needed:  80mA

	Interface Number: 0
		Name: usbhid
		Alternate Number: 0
		Class: 03(HID  )
		Sub Class: 0
		Protocol: 0
		Number of Endpoints: 2

			Endpoint Address: 81
			Direction: in
			Attribute: 3
			Type: Int.
			Max Packet Size: 8
			Interval: 10ms

			Endpoint Address: 01
			Direction: out
			Attribute: 3
			Type: Int.
			Max Packet Size: 8
			Interval: 10ms
---------------------------------------------------------------------


-- 
Saludos,
     STenyaK

_______________________________________________
Site:   http://1ksurvivor.homeip.net  <1kSurvivor>
         http://motorsport-sim.org     <Motorsport>
         http://kwh.iespana.es         <KuantikalWareHouse>
         http://emuletutorial.info     <EmuleTutorial>
ICQ:    153709484
Mail:   stenyak AT gmail DOT net

Re: [PATCH] Added device to hid-ff

From: johann deneux <hidden>
Date: 2007-02-16 15:43:54

On 2/15/07, Anssi Hannula [off-list ref] wrote:
Dmitry Torokhov wrote:
quoted
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Hmm.. Shouldn't an entry also be added to the devices[] list in
hid-lgff.c for these devices? (and it seems one device is already
missing from there in the current kernel).

I'm not able to check right now, but I think some earlier kernels may
have defaulted to ff_joystick if no entry is present in devices[], hence
these devices working for some without the entry.
(so the alternative is to restore that behaviour)

Yes, defaulting to joystick was the way it was when I wrote hid-lgff.c, and
I guess Valentin made his original patch on a kernel where defaulting was
still there.
I'll send a separate mail with the patch adding the devices there too, but I
personally think defaulting was nice. Was there a reason behind the removal?

-- 
Johann

Re: [PATCH] Added device to hid-ff

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-16 16:03:14

On 2/16/07, johann deneux [off-list ref] wrote:
On 2/15/07, Anssi Hannula [off-list ref] wrote:
quoted
Dmitry Torokhov wrote:
quoted
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Hmm.. Shouldn't an entry also be added to the devices[] list in
hid-lgff.c for these devices? (and it seems one device is already
missing from there in the current kernel).

I'm not able to check right now, but I think some earlier kernels may
have defaulted to ff_joystick if no entry is present in devices[], hence
these devices working for some without the entry.
(so the alternative is to restore that behaviour)
Yes, defaulting to joystick was the way it was when I wrote hid-lgff.c, and
I guess Valentin made his original patch on a kernel where defaulting was
still there.
I'll send a separate mail with the patch adding the devices there too, but I
personally think defaulting was nice. Was there a reason behind the removal?
Simple oversight. I think we should restore defaulting.

-- 
Dmitry

Re: [PATCH] Added device to hid-ff

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-16 17:28:44

On 2/16/07, Dmitry Torokhov [off-list ref] wrote:
On 2/16/07, johann deneux [off-list ref] wrote:
quoted
On 2/15/07, Anssi Hannula [off-list ref] wrote:
quoted
Dmitry Torokhov wrote:
quoted
On 2/15/07, STenyaK (Bruno Gonzalez) [off-list ref] wrote:
quoted
Sorry for not providing a proper patch, could you please also add
        {0x46d, 0xc294, hid_lgff_init}, // Logitech G25 wheel
to the list? I tested it here and that wheel is also working.
OK.
Hmm.. Shouldn't an entry also be added to the devices[] list in
hid-lgff.c for these devices? (and it seems one device is already
missing from there in the current kernel).

I'm not able to check right now, but I think some earlier kernels may
have defaulted to ff_joystick if no entry is present in devices[], hence
these devices working for some without the entry.
(so the alternative is to restore that behaviour)
Yes, defaulting to joystick was the way it was when I wrote hid-lgff.c, and
I guess Valentin made his original patch on a kernel where defaulting was
still there.
I'll send a separate mail with the patch adding the devices there too, but I
personally think defaulting was nice. Was there a reason behind the removal?
Simple oversight. I think we should restore defaulting.
Something like the attached should do I think...

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help