HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452
authorJason Gerecke <killertofu@gmail.com>
Wed, 10 Oct 2018 20:40:26 +0000 (13:40 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 11 Oct 2018 12:32:01 +0000 (14:32 +0200)
commit11db8173dbab7a94cf5ba5225fcedbfc0f3b7e54
tree730cbdfdd394e42c10ee407b5a45450f4b2f80a6
parent14f39921c906357391d634864d627c7bf8a18c30
HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452

The DTK-2451 and DTH-2452 have a buggy HID descriptor which incorrectly
contains a Cintiq-like report, complete with pen tilt, rotation, twist, serial
number, etc. The hardware doesn't actually support this data but our driver
duitifully sets up the device as though it does. To ensure userspace has a
correct view of devices without updated firmware, we clean up this incorrect
data in wacom_setup_device_quirks.

We're also careful to clear the WACOM_QUIRK_TOOLSERIAL flag since its presence
causes the driver to wait for serial number information (via
wacom_wac_pen_serial_enforce) that never comes, resulting in
the pen being non-responsive.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Fixes: 8341720642 ("HID: wacom: Queue events with missing type/serial data for later processing")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c