HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report
authorAaron Armstrong Skomra <skomra@gmail.com>
Wed, 12 Jun 2019 21:19:29 +0000 (14:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:16:41 +0000 (07:16 +0200)
commit8993c673d6c418d565c47f88201e201759e00ecf
tree652af6b0d8b3e55028d345f5c75f9a3adb0b9140
parent2a0aa8a06aea258fdfba248a3af052ee83a8d45b
HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report

commit 184eccd40389df29abefab88092c4ff33191fd0c upstream.

In the generic code path, HID_DG_CONTACTMAX was previously
only read from the second byte of report 0x23.

Another report (0x82) has the HID_DG_CONTACTMAX in the
higher nibble of the third byte. We should support reading the
value of HID_DG_CONTACTMAX no matter what report we are reading
or which position that value is in.

To do this we submit the feature report as a event report
using hid_report_raw_event(). Our modified finger event path
records the value of HID_DG_CONTACTMAX when it sees that usage.

Fixes: 8ffffd5212846 ("HID: wacom: fix timeout on probe for some wacoms")
Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c