History log of /drivers/hid/hid-lg.c
Revision Date Author Comments
30bb75d71b3732c0adb6297815288ce0fb9cc04c 04-Aug-2011 Michal Malý <madcatxster@gmail.com> HID: lg4ff - Add range setting support and sysfs interface

Wheel range of certain Logitech wheels - namely Driving Force GT, Driving Force
Pro, G25 and G27 can be adjusted. Minimu is 40 degrees, maximum 900. DFGT, G25
and G27 all use a common command, DFP uses another one. Range can be set from
userspace by writing to
"/sys/module/hid_logitech/drivers/hid:logitech/<dev>range". The driver use list
to store range of each connected wheel; it's not possible to use driver_data in
hid_device struct as it's already b hig-lg driver.

Signed-off-by: Michal Malý <madcatxster@gmail.com>
Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
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>
dc0a4f0ce2b1a9ef5947cdb6d62f60008a7e42bf 03-Jun-2011 Michael Bauer <michael@m-bauer.org> HID: Fix Logitech Driving Force Pro wheel

- Add the quirk "NOGET" to make the wheel work at all in native mode.
- Replace the somehow broken report descriptor with a custom one to have
separate throttle and brake axes.

As there are significant differences in the descriptor (original descriptor
"hides" the separate axes in a 24 bit FF00 usagepage, new descripter replaces
that with two individual 8 bit desktop.y and desktop.rz usages) I provided a
complete replacement descriptor instead trying to patch the original one.
Patching the descriptor seems not feasible as the new one is much larger.

Note: To actually test this you have to use the tool "ltwheelconf" to put the
DFP into it's native mode - See below for more info.

Background:
Most Logitech wheels are initially reporting themselves with a "fallback"
deviceID (USB_DEVICE_ID_LOGITECH_WHEEL - 0xc294), in order to make sure they
are working even without having the proper driver installed.

If the Logitech driver is installed it sends a special command to the wheel
which sets the wheel to "native mode", enabling enhance features like:
- Clutch pedal
- extended wheel rotation range (up to 900 degrees)
- H-gate shifter
- separate axis for throttle / brake
- all buttons

When the wheel is set to native mode it basically disconnects and reconnects
with a different deviceID (USB_DEVICE_ID_LOGITECH_DFP_WHEEL - 0xc298 in this
case).

I am working on a userspace tool [1] which does the switching from fallback to
native mode. During development I found out that the Driving Force Pro wheel
is not supported in native mode - quierk NOGET is missing and the throttle and
brake axes are reported in a combined way only.

Signed-off-by: Michael Bauer <michael@m-bauer.org>
Signed-off-by: Simon Wood <simon@mungewell.org>

[1] https://github.com/TripleSpeeder/LTWheelConf
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>
5623a24a80814fe471e777f12b9dbbb0f77e002e 17-Mar-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for Logitech Driving Force Pro wheel

Add force feedback support for Logitech Driving Force Pro wheel.

Device IDs reported by Michal Malý.

Reported-by: Michal Malý <madcatxster@gmail.com>
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>
d8692ac012104ebffb343c0bcb4a2b8642c821a6 23-Oct-2010 Jiri Kosina <jkosina@suse.cz> HID: fix mismerge in hid-lg

Fix wrong merge in hid-lg -- report fixup functions now get
pointer to rdesc.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2c6118e43040034d80894daeba41960bf0035b31 04-Oct-2010 Hendrik Iben <Hendrik_Iben@web.de> HID: force feedback support for Logitech RumblePad gamepad

This patch adds force feedback support for Logitech WingMan RumblePad
gamepads by extending the Logitech Rumblepad 2 force feedback code.

Signed-off-by: Hendrik Iben <Hendrik_Iben@web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
32c88cbc3080f43c429f6456aa9cd845e37f3778 22-Sep-2010 Simon Wood <simon@mungewell.org> HID: Add support for Logitech Speed Force Wireless gaming wheel

The following patch adds support for the Logitech Speed Force Wireless gaming
wheel. Originally designed for the WII console. Details on the protocol:

http://wiibrew.org/wiki/Logitech_USB_steering_wheel

This patch relies on previous patch:
"Don't Send Feature Reports on Interrupt Endpoint"

Logitech as produce a very similar wheel for the PS2/PS3, it is expected that
this patch could also support the PS2/PS3 wheel if the USB ID's are added and
(if required) the HID descriptor is modified.

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
73e4008ddddc84d5f2499c17012b340a0dae153e 06-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: allow resizing and replacing report descriptors

Update hid_driver's report_fixup prototype to allow changing report
descriptor size and/or returning completely different report descriptor.
Update existing usage accordingly.

This is to give more freedom in descriptor fixup and to allow having a whole
fixed descriptor in the code for the sake of readability.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
18392212932ecbdc71bc6a298ad301328eefb09d 16-Apr-2010 Lorenzo Castelli <lcastelli@gmail.com> HID: add mappings for a few keys found on Logitech MX3200

The keys are added to the generic wireless mappings in case other
keyboards use them. Note that the product ID for the MX3200 is the same
as USB_DEVICE_ID_S510_RECEIVER_2.

Signed-off-by: Lorenzo Castelli <lcastelli@gmail.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>
66d61bec697e99476c2fb095f9a6ead3be2e1c21 24-Nov-2009 Jiri Kosina <jkosina@suse.cz> HID: make Media key on Logitech DiNovo Mini work

Put proper mapping of Media key on Logitech DiNovo Mini.

According to the specification from Logitech webpage, this
key is intended to launch a Media center.

Reported-by: Stefan Plattner <Stefan.Plattner@ilogs.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
24985cf68612a5617d396b0b188cec807641cde1 13-Nov-2009 Jiri Kosina <jkosina@suse.cz> HID: support Logitech/3DConnexion SpaceTraveler and SpaceNavigator

These devices wrongly report their axes as relative instead of absolute.

Fix this in up report descriptor of the device before it enters the parser.

Reported-by: simon.windows@gmail.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a24f423bdf253ccee369adc6c5451b40a0716fbb 02-Jul-2009 Peter Huewe <peterhuewe@gmx.de> HID: adding __init/__exit macros to module init/exit functions

Trivial patch which adds the __init and __exit macros to the module_init /
module_exit functions of several HID drivers from drivers/hid/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
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>
243b706d8a71364ad6080328d45b73516c8af5f3 17-Apr-2009 Christophe Borivant <christophe.borivant@wanadoo.fr> HID: Add support for the G25 force feedback wheel in native mode

Add Product Id 0xc299 for the Logitech G25 force feedback wheel
The Logitech G25 force feedback wheel, is first recognize by the kernel
with the product id "0xc294". In this mode, we can't use all the axes
and buttons of the wheel.

Using a userland utility, it is possible to make the wheel switch to native
mode -- http://svn.vdrift.net/viewvc.cgi/trunk/tools/G25manage/?root=VDrift
In native mode, the wheel change its id number to "0xc299".

The packet that needs to be sent to the wheel to swtich to native mode and
change its PID is

{ 0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 }

Signed-off-by: Christophe Borivant <christophe.borivant@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
afa5eb7c68689ced4284f01c96feed44a2d0a127 18-Mar-2009 Jiri Slaby <jirislaby@gmail.com> HID: remove compat stuff

This removal was scheduled and there is no problem with later
distros to adapt for the new bus, thanks to aliases.

module-init-tools map files are deprecated nowadays, so that
the patch which introduced hid ones into the m-i-t won't be
accepted and hence there is no reason for leaving compat stuff in.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
08ef08ee8c5a8d538ca9a3c433d4213c128af863 30-Oct-2008 Alan Stern <stern@rowland.harvard.edu> HID: automatically call usbhid_set_leds in usbhid driver

This patch (as1146c) makes usbhid automatically call usbhid_set_leds()
for any device that supports the keyboard boot protocol.

In theory this should be perfectly safe. BIOSes send the LED output
report as part of their normal device initialization, so any keyboard
device supporting the boot protocol has to be able to handle it.

As a side effect, the hid-dell and hid-bright drivers are no longer
needed, and the Logitech keyboard driver can be removed from hid-lg.

CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
022b7024d4bb1f9a2f30021a2672a0f940ebfa7a 17-Oct-2008 Dan Nicholson <dbn.lists@gmail.com> Revert "HID: Invert HWHEEL mappings for some Logitech mice"

This reverts commit 740f370dc61dc478d891d7d47660bb3ae39ddb4f.

It turned out to be correct in the first place: a positive value should
be sent when the wheel is moved to the right, and a negative value when
moved to the left. This is the behavior expected by the Xorg evdev
driver. I must have had a remapping somewhere else in my system when
originally testing this. Testing on another system shows that the
unpatched kernel is correct.

Here is a bug report from Mandriva that brought the problem to my
attention:

https://qa.mandriva.com/show_bug.cgi?id=44309#c19

Signed-off-by: Dan Nicholson <dbn.lists@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>