HID: multitouch: fix LG Melfas touchscreen
PATCH 1/1 HID: multitouch: fix LG Melfas touchscreen
The LG Melfas touchscreen has a bad firmware where it declares the Contact ID field as constant while it shouldn't. This messes up the autodetection and the reporting of the events by hid-multitouch given that hid-input ignores constant fields.
The autodetection is simply worked around by manually adding the device to hid_have_special_driver.
The processing of the events requires either a report fixup, either some specific case handling. Given that the report fixup would require to basically rewrite all the report descriptor, I went for the programatic way of fixing that after the report descriptors are loaded.
--- drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-multitouch.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+)
drivers/hid/hid-core.c +1 -0
@@ -1930,6 +1930,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CBTKBD) }, { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPPRODOCK) }, #endif + { HID_USB_DEVICE(USB_VENDOR_ID_LG, USB_DEVICE_ID_LG_MELFAS_MT) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) },
drivers/hid/hid-ids.h +1 -0
@@ -632,6 +632,7 @@#define USB_VENDOR_ID_LG 0x1fd2#define USB_DEVICE_ID_LG_MULTITOUCH 0x0064 +#define USB_DEVICE_ID_LG_MELFAS_MT 0x6007#define USB_VENDOR_ID_LOGITECH 0x046d#define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e
drivers/hid/hid-multitouch.c +44 -0
80 lines not on this page · raw message
Signature · 1 line
2.9.3
Jiri Kosina
maintainerQuoted 9 lines · Benjamin Tissoires
The LG Melfas touchscreen has a bad firmware where it declares the Contact ID field as constant while it shouldn't. This messes up the autodetection and the reporting of the events by hid-multitouch given that hid-input ignores constant fields.
The autodetection is simply worked around by manually adding the device to
hid_have_special_driver.The processing of the events requires either a report fixup, either some
I've fixed the grammar here ...
Quoted 6 lines
specific case handling. Given that the report fixup would require to basically rewrite all the report descriptor, I went for the programatic way of fixing that after the report descriptors are loaded.
... and applied to for-4.10/upstream-fixes; I don't think this patch itself would justify a -rc7 merge by itself, therefore either something else accumulates in for-4.10 branch, or this will go in during 4.11 merge window.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs