All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large
@ 2018-06-12 20:42 Jason Gerecke
  2018-06-13 13:44 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Gerecke @ 2018-06-12 20:42 UTC (permalink / raw)
  To: linux-input, Jiri Kosina
  Cc: Benjamin Tissoires, Ping Cheng, Aaron Skomra, stable,
	Jason Gerecke, Jason Gerecke

The HID descriptor for the 2nd-gen Intuos Pro large (PTH-860) contains
a typo which defines an incorrect logical maximum Y value. This causes
a small portion of the bottom of the tablet to become unusable (both
because the area is below the "bottom" of the tablet and because
'wacom_wac_event' ignores out-of-range values). It also results in a
skewed aspect ratio.

To fix this, we add a quirk to 'wacom_usage_mapping' which overwrites
the data with the correct value.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
CC: stable@vger.kernel.org # v4.10+
---
 drivers/hid/wacom_sys.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index ee7a37eb159a..545986cfb978 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -395,6 +395,14 @@ static void wacom_usage_mapping(struct hid_device *hdev,
 		}
 	}
 
+	/* 2nd-generation Intuos Pro Large has incorrect Y maximum */
+	if (hdev->vendor == USB_VENDOR_ID_WACOM &&
+	    hdev->product == 0x0358 &&
+	    WACOM_PEN_FIELD(field) &&
+	    wacom_equivalent_usage(usage->hid) == HID_GD_Y) {
+		field->logical_maximum = 43200;
+	}
+
 	switch (usage->hid) {
 	case HID_GD_X:
 		features->x_max = field->logical_maximum;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large
  2018-06-12 20:42 [PATCH] HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large Jason Gerecke
@ 2018-06-13 13:44 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2018-06-13 13:44 UTC (permalink / raw)
  To: Jason Gerecke
  Cc: linux-input, Benjamin Tissoires, Ping Cheng, Aaron Skomra,
	stable, Jason Gerecke

On Tue, 12 Jun 2018, Jason Gerecke wrote:

> The HID descriptor for the 2nd-gen Intuos Pro large (PTH-860) contains
> a typo which defines an incorrect logical maximum Y value. This causes
> a small portion of the bottom of the tablet to become unusable (both
> because the area is below the "bottom" of the tablet and because
> 'wacom_wac_event' ignores out-of-range values). It also results in a
> skewed aspect ratio.
> 
> To fix this, we add a quirk to 'wacom_usage_mapping' which overwrites
> the data with the correct value.
> 
> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
> CC: stable@vger.kernel.org # v4.10+

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-13 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 20:42 [PATCH] HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large Jason Gerecke
2018-06-13 13:44 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.