Skip to content

Commit 778fbf4

Browse files
jigpubentiss
authored andcommitted
HID: wacom: Read HID_DG_CONTACTMAX directly for non-generic devices
We've recently switched from extracting the value of HID_DG_CONTACTMAX at a fixed offset (which may not be correct for all tablets) to injecting the report into the driver for the generic codepath to handle. Unfortunately, this change was made for *all* tablets, even those which aren't generic. Because `wacom_wac_report` ignores reports from non- generic devices, the contact count never gets initialized. Ultimately this results in the touch device itself failing to probe, and thus the loss of touch input. This commit adds back the fixed-offset extraction for non-generic devices. Link: linuxwacom/input-wacom#155 Fixes: 184eccd ("HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report") Signed-off-by: Jason Gerecke <[email protected]> Reviewed-by: Aaron Armstrong Skomra <[email protected]> CC: [email protected] # 5.3+ Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent c101e9b commit 778fbf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/hid/wacom_sys.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,11 @@ static void wacom_feature_mapping(struct hid_device *hdev,
319319
data[0] = field->report->id;
320320
ret = wacom_get_report(hdev, HID_FEATURE_REPORT,
321321
data, n, WAC_CMD_RETRIES);
322-
if (ret == n) {
322+
if (ret == n && features->type == HID_GENERIC) {
323323
ret = hid_report_raw_event(hdev,
324324
HID_FEATURE_REPORT, data, n, 0);
325+
} else if (ret == 2 && features->type != HID_GENERIC) {
326+
features->touch_max = data[1];
325327
} else {
326328
features->touch_max = 16;
327329
hid_warn(hdev, "wacom_feature_mapping: "

0 commit comments

Comments
 (0)