linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Improving drivers for Logitech Driving Force Pro and G25 wheels
@ 2008-03-14 19:52 chris guirl
       [not found] ` <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: chris guirl @ 2008-03-14 19:52 UTC (permalink / raw)
  To: linux-input

On Fri, Mar 14, 2008 at 5:42 AM, Jiri Kosina <jkosina@suse.cz> wrote:
>  thanks for your mail, I have added Jean-Philippe to CC, who has sent me
>  some time ago debugging information for this wheel, but I unfortunately
>  didn't yet had time to look into that in more detail.

Which wheel, the DFP or the G25? Either way they are similar in many
ways so better support for one would improve support for the other.
I'm interested to see this information. There has been some discussion
of the G25 on the forums at vdrift.net.

>  Regarding the HID code -- currently, all device-specific stuff for HID
>  devices is implemented as quirks in hid code -- please see
>  drivers/hid/hid-*quirks* and drivers/hid/usbhid/hid-quirks*. This is not a
>  solution that works well in long-term though, and Jiri Slaby (also added
>  to CC) is currently rewriting the HID core code, so that it will work as a
>  proper bus, so individual drivers could work nicely with that. Once this
>  is done, all the current quirks will be converted to HID-bus drivers.

I've looked through the quirks code and I have some suggestions for
things that can be changed. First, the Vendor/product IDs of the
wheels are not present. When the devices power up they assume VID:PID
0x046d:0xc294 which there is a line for in
drivers/hid/usbhid/hid-quirks.c:

#define USB_DEVICE_ID_LOGITECH_WHEEL	0xc294

This is used by the Logitech Formula Force or Driving Force wheel, and
a legacy mode on the DFP & G25. To use the DFP or G25 in their native
modes, they must be sent a command [0xf8, 0x01] or [0xf8, 0x10]
respectively. Once these wheels receive this command, they simulate a
detach and reattach as 0x046d:0xc298 and 0x046d:0xc299 respectively.
These VID:PID combinations are not handled in the kernel at all. At
the very least they need to be assigned the same quirks as the Driving
Force.

When a Driving Force/Formula Force wheel is detected the device needs
to be probed with the native mode commands to see if it will switch
into DFP or G25 mode. If these modes work, then it is possible to send
the wheels some other commands to enable full rotation of the wheel.
By default only 200 degrees of rotation is available, but both the DFP
and G25 can be switched to allow up to 900 degrees of rotation. I
think there should be a user-land tool to change settings on the wheel
such as this.

>  Depends on how massive your changes are going to be, you could either
>  coordinate with Jiri so that no effort is wasted, or you can just send me
>  a patch with simple quirks addition, and it will get converted into hidbus
>  driver later.

If there is a rewrite due then it may be best to work with Jiri so I
can make my changes work with his, no sense in patching twice.

In addition to HID code, I think I'll need to make some changes to the
joydev driver, as some other things need to be addressed (such as
splitting the gas and brake axis up into separate, independent axes).
Currently I am able to send raw commands to my DFP to make it change
modes, but the /dev/input/jsX device disappears when I do this, so
some other tweaks may be needed on the joystick end of things.

I'll be out of town this weekend so not working on anything yet, but
please send any ideas along as I hope to get started next week.
Thanks.

Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Improving drivers for Logitech Driving Force Pro and G25 wheels
@ 2008-03-14  7:23 chris guirl
  0 siblings, 0 replies; 4+ messages in thread
From: chris guirl @ 2008-03-14  7:23 UTC (permalink / raw)
  To: linux-input

I have a Logitech Driving Force Pro and I've been trying to figure out
how to make it work better in Linux. I have recently learned some
things about both wheels that would be nice to incorporate into the
driver. Most of this information was gained through a contact at
Logitech. I intend to investigate making some changes to the kernel to
improve the support for these wheels. Two of the main features I'd
like to incorporate are setting the wheel axis range to different
values so the full 900 degree range of the wheel can be used, and
providing separated axes for the gas and brake pedals.

So, where to start? I'm not very familiar with kernel hacking but I'll
begin doing some research on it soon. Can anyone on the list provide
me with some guidance? I've tried to find some driver hacking
documentation specific to my task but I haven't found much. Something
along the lines of a joystick or USB driver hacking tutorial would
help me a lot. I've also looked through a good bit of the Linux
joystick and USB HID code in the input section and I am unsure where
device specific code goes. I guess I have some more reading to do...
:) Thanks in advance for any tips.

Chris Guirl

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-19 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 19:52 Improving drivers for Logitech Driving Force Pro and G25 wheels chris guirl
     [not found] ` <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com>
2008-03-18  4:30   ` Fwd: " Richie Ward
2008-03-19 17:43     ` chris guirl
  -- strict thread matches above, loose matches on Subject: below --
2008-03-14  7:23 chris guirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).