Thread (6 messages) 6 messages, 3 authors, 2014-05-14

Re: [PATCH 1/2] Input: wacom: Add support for 0x116 sensor on Win8 Panasonic CF-H2

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2014-05-14 18:47:18

On Wed, May 14, 2014 at 11:27:27AM -0700, Ping Cheng wrote:
On Fri, May 9, 2014 at 6:30 PM, Jason Gerecke [off-list ref] wrote:
quoted
The Win8 version of the Panasonic CF-H2 includes a new Wacom device.
The pen interface appears to use the same protocol as before, but the
touch interface has been tweaked to send Win8-compatible reports.

Signed-off-by: Jason Gerecke <redacted>
---
 drivers/input/tablet/wacom_wac.c | 8 ++++++++
 drivers/input/tablet/wacom_wac.h | 1 +
 2 files changed, 9 insertions(+)
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index a4d8f1d..e4566c3 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1107,6 +1107,10 @@ static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len)
                        prox = data[0] & 0x01;
                        x = get_unaligned_le16(&data[1]);
                        y = get_unaligned_le16(&data[3]);
+               } else if (len == WACOM_PKGLEN_TPC1FG_B) {
+                       prox = data[2] & 0x01;
+                       x = le16_to_cpup((__le16 *)&data[3]);
+                       y = le16_to_cpup((__le16 *)&data[5]);
Above two lines should use get_unaligned_le16() instead.
wacom_mt_touch() needs some cleanup too.

Except that, the whole patchset looks good to me.

Reviewed-by: Ping Cheng <redacted>
I changed le16_to_cpup to get_unaligned_le16 locally and applied, thank
you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help