From patchwork Tue May 27 23:18:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 4251921 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 2BC13BF90B for ; Tue, 27 May 2014 23:17:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 554B020173 for ; Tue, 27 May 2014 23:17:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 691A52015E for ; Tue, 27 May 2014 23:17:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbaE0XRy (ORCPT ); Tue, 27 May 2014 19:17:54 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:44368 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922AbaE0XRy (ORCPT ); Tue, 27 May 2014 19:17:54 -0400 Received: by mail-pa0-f49.google.com with SMTP id kp14so85710pab.36 for ; Tue, 27 May 2014 16:17:54 -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=50hQd/cJkYkIfjQ9n80Sa57c8VFmOYS+5UNVt2XeBR8=; b=sJyvN9TC3a0ikdrQ0ce/iysGGsv55YGTaCi3M6XEoeFtTJr4kTVfkqFHTQ22fq7jWo dx0CoR4ehXidXvLQctSssKOw3nPVxy9F0ISGr8zo4LA4S7rpzX+OVvkwKCRie9TrsTFN 4EzGRLIzeZrjelTx9Ry5YvVyv7c5/FnuxgvtLZTE+ILwJg8/kqYocJkcXMSqDOS9jL8Q jF9TJxJ/RXZvU1nSbGLnapwHdVyWgvqR33O6AUI+1ZjcFT4nyNvSrF8G7Lv2yQnzkGEg nskA0j1yRwCwYUYnAtCUAiIu9R5YUbMdzI12hmIYRtea7LrVNlW9R6S72Qcya1b88dAN ioxA== X-Received: by 10.69.31.11 with SMTP id ki11mr40537773pbd.88.1401232674109; Tue, 27 May 2014 16:17:54 -0700 (PDT) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id uk1sm79477756pac.26.2014.05.27.16.17.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 May 2014 16:17:53 -0700 (PDT) From: Ping Cheng X-Google-Original-From: Ping Cheng To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, Ping Cheng Subject: [PATCH 2/3] Input: wacom - Don't declare ABS_X/Y for multitouch Date: Tue, 27 May 2014 16:18:07 -0700 Message-Id: <1401232687-9738-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.9.1 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 We use ABS_MT_POSITION_X/Y for multitouch (touch_max > 1) events now. No need to declare ABS_X/Y for touch_max == 2 any more. Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke Tested-by: Jason Gerecke --- drivers/input/tablet/wacom_wac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index c98e51c..0eb9960 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1217,8 +1217,8 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data) * a=(pi*r^2)/C. */ int a = data[5]; - int x_res = input_abs_get_res(input, ABS_X); - int y_res = input_abs_get_res(input, ABS_Y); + int x_res = input_abs_get_res(input, ABS_MT_POSITION_X); + int y_res = input_abs_get_res(input, ABS_MT_POSITION_Y); width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE); height = width * y_res / x_res; } @@ -1587,7 +1587,7 @@ static void wacom_abs_set_axis(struct input_dev *input_dev, input_abs_set_res(input_dev, ABS_X, features->x_resolution); input_abs_set_res(input_dev, ABS_Y, features->y_resolution); } else { - if (features->touch_max <= 2) { + if (features->touch_max == 1) { input_set_abs_params(input_dev, ABS_X, 0, features->x_max, features->x_fuzz, 0); input_set_abs_params(input_dev, ABS_Y, 0,