From e41b3cdafed777f8e927db01c2fab5ae9c95055c Mon Sep 17 00:00:00 2001 From: Jarrad Whitaker Date: Thu, 24 Jan 2019 22:40:50 +1100 Subject: HID: fix Logitech WingMan Formula GP joined axes The Logitech WingMan Formula GP by default presents a combined accelerate/brake axis, so this patch assigns it to hid-logitech in order to benefit from the axis-splitting logic in lg4ff. There is also a fixed report descriptor for the resulting report. Signed-off-by: Jarrad Whitaker Signed-off-by: Jiri Kosina --- drivers/hid/hid-lg4ff.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/hid/hid-lg4ff.c') diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c index 512d67e1aae3..a299c9d1605f 100644 --- a/drivers/hid/hid-lg4ff.c +++ b/drivers/hid/hid-lg4ff.c @@ -103,6 +103,10 @@ static const signed short lg4ff_wheel_effects[] = { -1 }; +static const signed short no_wheel_effects[] = { + -1 +}; + struct lg4ff_wheel { const u32 product_id; const signed short *ff_effects; @@ -137,6 +141,7 @@ struct lg4ff_alternate_mode { }; static const struct lg4ff_wheel lg4ff_devices[] = { + {USB_DEVICE_ID_LOGITECH_WINGMAN_FG, no_wheel_effects, 40, 180, NULL}, {USB_DEVICE_ID_LOGITECH_WINGMAN_FFG, lg4ff_wheel_effects, 40, 180, NULL}, {USB_DEVICE_ID_LOGITECH_WHEEL, lg4ff_wheel_effects, 40, 270, NULL}, {USB_DEVICE_ID_LOGITECH_MOMO_WHEEL, lg4ff_wheel_effects, 40, 270, NULL}, @@ -346,6 +351,7 @@ int lg4ff_raw_event(struct hid_device *hdev, struct hid_report *report, rd[5] = rd[3]; rd[6] = 0x7F; return 1; + case USB_DEVICE_ID_LOGITECH_WINGMAN_FG: case USB_DEVICE_ID_LOGITECH_WINGMAN_FFG: case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL: case USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2: -- cgit v1.2.3-58-ga151