diff options
author | Gary Stein <LordCnidarian@gmail.com> | 2010-01-12 18:25:58 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-01-12 18:26:31 -0500 |
commit | 74f292ca8c7a2b9370f80d97a49e48174f4c7635 (patch) | |
tree | a42e4260f003aff9ec76e1b80fd09e027cb79e57 /drivers/hid/hid-lg.c | |
parent | d67dec5b2cc208215de21dc7806945bf6a6e85d0 (diff) |
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>
Diffstat (limited to 'drivers/hid/hid-lg.c')
-rw-r--r-- | drivers/hid/hid-lg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 9fcd3d017ab3..3677c9037a11 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #define LG_FF 0x200 | 34 | #define LG_FF 0x200 |
35 | #define LG_FF2 0x400 | 35 | #define LG_FF2 0x400 |
36 | #define LG_RDESC_REL_ABS 0x800 | 36 | #define LG_RDESC_REL_ABS 0x800 |
37 | #define LG_FF3 0x1000 | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * Certain Logitech keyboards send in report #3 keys which are far | 40 | * Certain Logitech keyboards send in report #3 keys which are far |
@@ -266,7 +267,7 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
266 | goto err_free; | 267 | goto err_free; |
267 | } | 268 | } |
268 | 269 | ||
269 | if (quirks & (LG_FF | LG_FF2)) | 270 | if (quirks & (LG_FF | LG_FF2 | LG_FF3)) |
270 | connect_mask &= ~HID_CONNECT_FF; | 271 | connect_mask &= ~HID_CONNECT_FF; |
271 | 272 | ||
272 | ret = hid_hw_start(hdev, connect_mask); | 273 | ret = hid_hw_start(hdev, connect_mask); |
@@ -279,6 +280,8 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
279 | lgff_init(hdev); | 280 | lgff_init(hdev); |
280 | if (quirks & LG_FF2) | 281 | if (quirks & LG_FF2) |
281 | lg2ff_init(hdev); | 282 | lg2ff_init(hdev); |
283 | if (quirks & LG_FF3) | ||
284 | lg3ff_init(hdev); | ||
282 | 285 | ||
283 | return 0; | 286 | return 0; |
284 | err_free: | 287 | err_free: |
@@ -331,6 +334,8 @@ static const struct hid_device_id lg_devices[] = { | |||
331 | .driver_data = LG_FF }, | 334 | .driver_data = LG_FF }, |
332 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), | 335 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), |
333 | .driver_data = LG_FF2 }, | 336 | .driver_data = LG_FF2 }, |
337 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FLIGHT_SYSTEM_G940), | ||
338 | .driver_data = LG_FF3 }, | ||
334 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR), | 339 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR), |
335 | .driver_data = LG_RDESC_REL_ABS }, | 340 | .driver_data = LG_RDESC_REL_ABS }, |
336 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER), | 341 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER), |