diff options
author | Michal Malý <madcatxster@gmail.com> | 2011-08-04 16:16:09 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-08-04 16:45:55 +0200 |
commit | 7362cd2286d2364cca6738b583668f64254fe04b (patch) | |
tree | 471b56ba9b7560387603fe9c9f6ddbd4d1ee9cdb /drivers/hid/hid-lgff.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bro... (diff) | |
download | linux-7362cd2286d2364cca6738b583668f64254fe04b.tar.xz linux-7362cd2286d2364cca6738b583668f64254fe04b.zip |
HID: lg4ff - Move handling of Logitech wheels to lg4ff driver
This is the first out of five patches me and Simon Wood (CC'd) have been
working on. It separates the handling of Logite from the generic lgff driver
and adds additional features specific for the Logitech wheels, namely
- Native mode support for Driving Force GT, Driving Force Pro, G25 and G27
wheels Every Logitech wheel reports itself as generic Logitech Driving Force
wheel (VID 046d, PID c294). This is done to ensu wheel will work on every USB
HID-aware system even when no Logitech driver is available. It however limits
the capabilit wheel - range is limited to 200 degrees, G25/G27 don't report the
clutch pedal and there is only one combined axis for t brake. The switch to
native mode is done via hardware-specific command which is different for each
wheel. When the wheel receives such command, it simulates reconnect and reports
to the OS with its actual PID.
- Adjustable wheel range DFGT, DFP, G25 and G27 have variable range of the
steering wheel. The range is limited by applying a maximum constant when the
wheel is turned beyond the allowed range. The limit as also set by a
hardware-specific command. There is a comm command for DFGT, G25 and G27 and
another one for DFP. It is probably possible to use the DFP command to limit
the range other Logitech wheels too, but this is not supported by the official
Logitech driver for Windows. The patch adds a sysfs interface which allows for
the range to be set from userspace.
- Fixed autocentering command All Logitech wheels support FF_AUTOCENTER effect.
The original implementation in the lgff driver didn't work well with patch
fixes it. According to USB communication sniffs the Formula Force EX (pretty
much rebranded original Driving Force accept the generic autocentering command,
this issue is also addressed by the patch
There are still some features this patch doesn't cover, but since some of them
will most likely require modifications of memless driver we have decided not to
include them yet.
As first we decided to move the handling of Logitech wheels from hid-lgff
driver to hid-lg4ff driver (originally used fo At also adds PID of Logitech
Driving Force GT.
Signed-off-by: Michal Malý <madcatxster@gmail.com>
Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-lgff.c')
-rw-r--r-- | drivers/hid/hid-lgff.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c index 088f85049290..27bc54f92f44 100644 --- a/drivers/hid/hid-lgff.c +++ b/drivers/hid/hid-lgff.c @@ -58,12 +58,6 @@ static const signed short ff_joystick_ac[] = { -1 }; -static const signed short ff_wheel[] = { - FF_CONSTANT, - FF_AUTOCENTER, - -1 -}; - static const struct dev_type devices[] = { { 0x046d, 0xc211, ff_rumble }, { 0x046d, 0xc219, ff_rumble }, @@ -71,14 +65,7 @@ static const struct dev_type devices[] = { { 0x046d, 0xc286, ff_joystick_ac }, { 0x046d, 0xc287, ff_joystick_ac }, { 0x046d, 0xc293, ff_joystick }, - { 0x046d, 0xc294, ff_wheel }, - { 0x046d, 0xc298, ff_wheel }, - { 0x046d, 0xc299, ff_wheel }, - { 0x046d, 0xc29b, ff_wheel }, { 0x046d, 0xc295, ff_joystick }, - { 0x046d, 0xc298, ff_wheel }, - { 0x046d, 0xc299, ff_wheel }, - { 0x046d, 0xca03, ff_wheel }, }; static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *effect) |