From patchwork Wed Sep 25 23:22:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 2945881 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 47E0ABFF05 for ; Wed, 25 Sep 2013 23:29:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DA7020372 for ; Wed, 25 Sep 2013 23:29:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C9E8720360 for ; Wed, 25 Sep 2013 23:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755965Ab3IYXWe (ORCPT ); Wed, 25 Sep 2013 19:22:34 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:59135 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754528Ab3IYXWc (ORCPT ); Wed, 25 Sep 2013 19:22:32 -0400 Received: by mail-pd0-f174.google.com with SMTP id y13so321257pdi.19 for ; Wed, 25 Sep 2013 16:22:31 -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=gz91pM3wMbfAH5DdxAy7Xxn2xktg1UAaHri1wLsvHOU=; b=K7lu9ZUrkRxBjd5kgiMcVMmIaEXaQtbf6AgorWD1mbnex0uTOGQSWuk18hXnDujO5z v95rYn83fB/UiXlHXtWQFySd/Ng8AVDEP+PNz80r+ZXH7RltewYHv00DpUs1dRFfGqVp WwtRm8wKlyuO0j2OiUJL2dxkAg5tIv4zVLzQZ6ZK/uaSIxt3RI07Q/kVn5F42F62NuZG 7DZNI5ObZs1HWXgLGeb7TuLcEWcdGr32JVF/xh5qq8CJR3HIgjzSNhuEHkkHe9QpI+mU l+bqeQsT5WCyi0CeSdhCFsOx7c+W+N5WnVRbgIRq9MCJYpOuQo8WB7PHzBKLIygnydqe 9mqw== X-Received: by 10.68.203.195 with SMTP id ks3mr35625790pbc.83.1380151351668; Wed, 25 Sep 2013 16:22:31 -0700 (PDT) Received: from wacom-arch.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id ry4sm562613pab.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 16:22:30 -0700 (PDT) From: Jason Gerecke To: linuxwacom-devel@lists.sourceforge.net, linux-input@vger.kernel.org, pinglinux@gmail.com, dmitry.torokhov@gmail.com Cc: Jason Gerecke Subject: [PATCH] Scale up touch width and height values for Intuos Pro Date: Wed, 25 Sep 2013 16:22:27 -0700 Message-Id: <1380151347-1031-1-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 1.8.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.8 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 width and height values reported by the Intuos Pro are not in surface units as required by the MT protocol. A simple multiplier of 100x seems to be approximately correct based on my tests. Signed-off-by: Jason Gerecke --- drivers/input/tablet/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 9c8eded..3f75f1d 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1151,8 +1151,8 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data) int width, height; if (features->type >= INTUOSPS && features->type <= INTUOSPL) { - width = data[5]; - height = data[6]; + width = data[5] * 100; + height = data[6] * 100; } else { /* * "a" is a scaled-down area which we assume is