linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "chris guirl" <thelusiv@gmail.com>
To: linux-input@vger.kernel.org
Subject: Re: Improving drivers for Logitech Driving Force Pro and G25 wheels
Date: Fri, 14 Mar 2008 15:52:29 -0400	[thread overview]
Message-ID: <9ff0fb570803141252m5bd2dfd6wb0bcfd293a9a79bb@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-03-14 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 19:52 chris guirl [this message]
     [not found] ` <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com>
2008-03-18  4:30   ` Fwd: Improving drivers for Logitech Driving Force Pro and G25 wheels 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ff0fb570803141252m5bd2dfd6wb0bcfd293a9a79bb@mail.gmail.com \
    --to=thelusiv@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).