summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorSimon Wood <gitsend@mungewell.org>2016-09-18 10:55:40 -0600
committerJiri Kosina <jkosina@suse.cz>2016-09-26 15:39:55 +0200
commit7363b25af33251d036a4bedb7daed1e6bc395142 (patch)
treeaeba90c0fda2b17ed9263d688153578b83bcf206 /drivers/hid
parentb456634b8d08b184a437bba55ac0efe7ef02d3b3 (diff)
downloadlinux-7363b25af33251d036a4bedb7daed1e6bc395142.tar.bz2
HID: hid-logitech: Rewrite of descriptor for all DF wheels
Rewrite the HID descriptor for _all_ Driving Force wheels (real or emulated) so that they can report separate Accelerator and Brake axis. If the user wants a combined accel/brake axis, they can use the 'combined pedals' feature. $ echo 1 > /sys/bus/hid/devices/<device-id>/combine_pedals Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-lg.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index 06f8a5e0fc8f..ffcf4f162ea5 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -343,8 +343,6 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
- struct usb_device_descriptor *udesc;
- __u16 bcdDevice, rev_maj, rev_min;
if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 &&
rdesc[84] == 0x8c && rdesc[85] == 0x02) {
@@ -365,18 +363,7 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
/* Several wheels report as this id when operating in emulation mode. */
case USB_DEVICE_ID_LOGITECH_WHEEL:
- udesc = &(hid_to_usb_dev(hdev)->descriptor);
- if (!udesc) {
- hid_err(hdev, "NULL USB device descriptor\n");
- break;
- }
- bcdDevice = le16_to_cpu(udesc->bcdDevice);
- rev_maj = bcdDevice >> 8;
- rev_min = bcdDevice & 0xff;
-
- /* Update the report descriptor for only the Driving Force wheel */
- if (rev_maj == 1 && rev_min == 2 &&
- *rsize == DF_RDESC_ORIG_SIZE) {
+ if (*rsize == DF_RDESC_ORIG_SIZE) {
hid_info(hdev,
"fixing up Logitech Driving Force report descriptor\n");
rdesc = df_rdesc_fixed;