History log of /drivers/hid/hid-lgff.c
Revision Date Author Comments
7362cd2286d2364cca6738b583668f64254fe04b 04-Aug-2011 Michal Malý <madcatxster@gmail.com> 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>
fdc6807fcd09416c5537f479e1dcd624118e234c 03-May-2011 Peter Gundermann <slim-one@users.sourceforge.net> HID: add support for Logitech G27 wheel

Gere's a small patch to add support for the Logitech G27 wheel, since
the prior patch only added FF support for the Driving Force Pro and G25.
The patch contains the changes from the G25 and DFP, too.

I tested the changes with wine/LFS and got full support for all axes and
buttons.

Signed-off: Peter Gundermann <slim-one@users.sourceforge.net>

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1478d82df822f5d895d810f2b11ec9d373b63bc0 01-Apr-2011 Simon Wood <simon@mungewell.org> HID: add FF support for Logitech G25/G27

Small patch to add support for the G25/G27 by adding USB ID's
as suggested by Peter.

Boots but otherwise untested as I don't have hardware, .debs for
kernel (2.6.38) here if want to test/run Ubuntu/Debian:
http://www.mungewell.org/Logitech_Wii_Wheel/

Reported-by: Peter Gundermann <slim-one@users.sourceforge.net>
Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4291ee305e9bb0699504a66f0e2b7aefcf0512a5 10-Dec-2010 Joe Perches <joe@perches.com> HID: Add and use hid_<level>: dev_<level> equivalents

Neaten current uses of dev_<level> by adding and using
hid specific hid_<level> macros.

Convert existing uses of dev_<level> uses to hid_<level>.
Convert hid-pidff printk uses to hid_<level>.

Remove err_hid and use hid_err instead.

Add missing newlines to logging messages where necessary.
Coalesce format strings.

Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Other miscellaneous changes:

Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_<level> can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
74f292ca8c7a2b9370f80d97a49e48174f4c7635 13-Jan-2010 Gary Stein <LordCnidarian@gmail.com> HID: add driver for the Logitech Flight System G940

Implements a new USB-HID for Force Feedback based on the normal
Logitech Force Feedback code and FF-Memless.

Currently only supports the FF_CONSTANT effect although the joystick
appears to support additional non-standard ones.

Signed-off-by: Gary Stein <LordCnidarian@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3040c8203d68a9a0564af81729085054fd6b5b03 12-Jul-2009 Julia Lawall <julia@diku.dk> HID: Drop NULL test on list_entry result

list_entry, which is an alias for container_of, cannot return NULL, as
there is no way to add a NULL value to a doubly linked list.

A simplified version of the semantic match that findds this problem is as
follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r@
expression x,E;
statement S1,S2;
position p,p1;
@@

*x = list_entry@p(...)
... when != x = E
*if@p1 (x == NULL) S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
fd30ea8c871552ddd6a5e1c0886de8fef4df53bc 23-Jun-2009 Jiri Kosina <jkosina@suse.cz> HID: add force feedback support for Logitech WingMan Formula Force GP

Add force feedback support for Logitech WingMan Formula Force GP
(0x046d/0xc293).

Reported-by: wylda@volny.cz
Tested-by: wylda@volny.cz
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f0bca459829fd33d659c8cd0369ac86a3924a9bc 15-May-2009 Sergey Belyashov <Sergey.Belyashov@gmail.com> HID: autocentering support for Logitech Force 3D Pro

This patch adds autocentering support for Logitech Force 3D Pro.

Signed-off-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
92e0d896ce3087112602449efd87c6d7f4eae8d0 04-May-2009 Sergey Belyashov <Sergey.Belyashov@gmail.com> HID: autocentering support for Logitech G25 Racing Wheel

Some months ago I send patch which adds autocentering for Logitech MOMO Wheel.
Now I have access to Logitech G25 Racing Wheel and test autocentering for it. I
write patch for current kernel to support autocentering for G25 in legacy mode
(this device supports other modes, but after switching device reconnects with
ID 0xc299 and FF support comes out) and others Logitech (Driving Force,
Formula Force Ex etc) wheels with ID 046d:c294.

Signed-off-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2bea94db87362ad90d0959201f5c401767042be1 02-Sep-2008 Sergey Belyashov <Sergey.Belyashov@gmail.com> HID: Autocentering support for Logitech MOMO Racing Wheel

Current kernel has no support for autocentering for Logitech wheels. By
default autocentering enabled in wheel and constant effect does not work
properly. Using USB sniffer I found command which change autocentering
settings: 0xFE, 0x0D, 0x0R, 0x0L, 0x80, 0x00, 0x00, where R - clockwise force,
L - counter-clockwise (0x0-0xF, 0xC = 100%).

Signed-off-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
606bd0a8616a0e59021cb2997e942513f24f641d 04-Jul-2008 Jiri Slaby <jirislaby@gmail.com> HID: move logitech FF processing

Merge the logitech force feedback processing directly into logitech
driver from the usbhid core.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>