From patchwork Sat Aug 13 00:08:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 1062552 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7D06S0R028722 for ; Sat, 13 Aug 2011 00:06:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752601Ab1HMAGx (ORCPT ); Fri, 12 Aug 2011 20:06:53 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:43150 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486Ab1HMAGw (ORCPT ); Fri, 12 Aug 2011 20:06:52 -0400 Received: by gxk21 with SMTP id 21so2319628gxk.19 for ; Fri, 12 Aug 2011 17:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=Glk8rwKx9swicszhwu6HMkT4aeNjK9ZR8m47uRVk7HY=; b=qBNRxNK+rPfO0+zp083RkD9b/XDRlY6EESktasW9e/M+RfqzsmVl8TZHxVCFB6JJxc wsJYvYqI/yC9+1R4hVQ+KP4iUhuidDKr8XT/7j76VMOXbuemkCCUpYh6PntfnCc/BBBY wQ7cgL26Egzy30IvXgc8/ja0Ct8CiIvuw4Qeg= Received: by 10.236.146.100 with SMTP id q64mr4934263yhj.92.1313194012314; Fri, 12 Aug 2011 17:06:52 -0700 (PDT) Received: from localhost.localdomain ([204.119.25.44]) by mx.google.com with ESMTPS id k8sm1364496yhm.17.2011.08.12.17.06.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 17:06:51 -0700 (PDT) From: Ping Cheng To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, Ping Cheng , Ping Cheng Subject: [PATCH 2/5] input: wacom - remove pressure for touch devices Date: Fri, 12 Aug 2011 17:08:29 -0700 Message-Id: <1313194109-4987-1-git-send-email-pinglinux@gmail.com> X-Mailer: git-send-email 1.7.6 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 13 Aug 2011 00:06:53 +0000 (UTC) Touch devices do not report valid pressure or capacitance. Signed-off-by: Ping Cheng --- drivers/input/tablet/wacom_sys.c | 14 -------------- drivers/input/tablet/wacom_wac.c | 6 +++--- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 449c0a4..36001eb 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -228,13 +228,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi get_unaligned_le16(&report[i + 3]); i += 4; } - } else if (usage == WCM_DIGITIZER) { - /* max pressure isn't reported - features->pressure_max = (unsigned short) - (report[i+4] << 8 | report[i + 3]); - */ - features->pressure_max = 255; - i += 4; } break; @@ -290,13 +283,6 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi pen = 1; i++; break; - - case HID_USAGE_UNDEFINED: - if (usage == WCM_DESKTOP && finger) /* capacity */ - features->pressure_max = - get_unaligned_le16(&report[i + 3]); - i += 4; - break; } break; diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index c1c2f7b..3eccf21 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -818,7 +818,6 @@ static int wacom_bpt_touch(struct wacom_wac *wacom) x <<= 5; y <<= 5; } - input_report_abs(input, ABS_MT_PRESSURE, p); input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); } @@ -1056,10 +1055,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, features->x_fuzz, 0); input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, features->y_fuzz, 0); - input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, - features->pressure_fuzz, 0); if (features->device_type == BTN_TOOL_PEN) { + input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, + features->pressure_fuzz, 0); + /* penabled devices have fixed resolution for each model */ input_abs_set_res(input_dev, ABS_X, features->x_resolution); input_abs_set_res(input_dev, ABS_Y, features->y_resolution);