From patchwork Sat May 10 01:30:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 4145881 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D52219F23C for ; Sat, 10 May 2014 01:30:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08574201C8 for ; Sat, 10 May 2014 01:30:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B48920170 for ; Sat, 10 May 2014 01:30:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750775AbaEJBaY (ORCPT ); Fri, 9 May 2014 21:30:24 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:50895 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbaEJBaY (ORCPT ); Fri, 9 May 2014 21:30:24 -0400 Received: by mail-pd0-f170.google.com with SMTP id v10so4345825pde.1 for ; Fri, 09 May 2014 18:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=dhb7s3VEtQEwI8zaNJa8++VDcpNoiCrhkxGc/8o0jxY=; b=XQCQrC0lXk2ZfkhXtLnXgO2Ybn4PeiR7azVjEjX6NzF2WzYOJ6QmfrWceB1hc5UjQ2 i+N7vsvg3qr6BZbZ/G6cOnI29eupK9fraCgksz88g6ugFPf9e0A/CSijQYRn8Auv+CP2 OcWhU5gyuOupisPP9S8JogN/CIoKiorjO4hbsfDfIaJOEGtoSawF44SfuRAwWP2+ebGm ewyMi+Oq8qQ0ooHO4mMM51kR0fRwzFH49qP6hJO4nRIVM7A1PfvPo9+QKLm631XRAyDp z6kPs8su8w1w5HQeevLqRzOmjp+ZgODQUPCxD3BmEQrCMbLFDkvY5WGqH210IWABhE1t HqMg== X-Received: by 10.66.147.130 with SMTP id tk2mr26737401pab.125.1399685423402; Fri, 09 May 2014 18:30:23 -0700 (PDT) Received: from localhost.localdomain ([67.51.163.2]) by mx.google.com with ESMTPSA id hk5sm9831605pbb.86.2014.05.09.18.30.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 May 2014 18:30:22 -0700 (PDT) From: Jason Gerecke To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, pingc@wacom.com Cc: Jason Gerecke Subject: [PATCH 1/2] Input: wacom: Add support for 0x116 sensor on Win8 Panasonic CF-H2 Date: Fri, 9 May 2014 18:30:16 -0700 Message-Id: <1399685417-2063-1-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 1.9.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ping Cheng --- 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]); } else { prox = data[1] & 0x01; x = le16_to_cpup((__le16 *)&data[2]); @@ -2298,6 +2302,9 @@ static const struct wacom_features wacom_features_0x10E = static const struct wacom_features wacom_features_0x10F = { "Wacom ISDv4 10F", WACOM_PKGLEN_MTTPC, 27760, 15694, 255, 0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; +static const struct wacom_features wacom_features_0x116 = + { "Wacom ISDv4 116", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, + 0, TABLETPCE, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; static const struct wacom_features wacom_features_0x4001 = { "Wacom ISDv4 4001", WACOM_PKGLEN_MTTPC, 26202, 16325, 255, 0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; @@ -2512,6 +2519,7 @@ const struct usb_device_id wacom_ids[] = { { USB_DEVICE_WACOM(0x10D) }, { USB_DEVICE_WACOM(0x10E) }, { USB_DEVICE_WACOM(0x10F) }, + { USB_DEVICE_WACOM(0x116) }, { USB_DEVICE_WACOM(0x300) }, { USB_DEVICE_WACOM(0x301) }, { USB_DEVICE_DETAILED(0x302, USB_CLASS_HID, 0, 0) }, diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 9f947c3..adf73cb 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -22,6 +22,7 @@ #define WACOM_PKGLEN_BBFUN 9 #define WACOM_PKGLEN_INTUOS 10 #define WACOM_PKGLEN_TPC1FG 5 +#define WACOM_PKGLEN_TPC1FG_B 10 #define WACOM_PKGLEN_TPC2FG 14 #define WACOM_PKGLEN_BBTOUCH 20 #define WACOM_PKGLEN_BBTOUCH3 64