From patchwork Mon Jan 24 23:06:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 503281 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0ON6k10007478 for ; Mon, 24 Jan 2011 23:06:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840Ab1AXXGl (ORCPT ); Mon, 24 Jan 2011 18:06:41 -0500 Received: from mail-pz0-f46.google.com ([209.85.210.46]:61425 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752596Ab1AXXGk (ORCPT ); Mon, 24 Jan 2011 18:06:40 -0500 Received: by pzk35 with SMTP id 35so767094pzk.19 for ; Mon, 24 Jan 2011 15:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=9R+RFEXyL8J9GE8Pf8okI0L/zW8NVrjuxJbqc6mruyo=; b=a22UyroVm9x08X3AEAyzTkb3kEDciZGrFweVMR5Emsr3yObY7NgqVYcj/0b55d5ZXy KC3C3j5V07RETW3l8BxyQeiJiFE1mGbkhTBVbF4u/FXmC+NzhZpIjMt+uEaRZFhBxRs8 ov+wsz3YOV62VzaH10QIzA8N0epcQue0k2ZcA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=onCSqpisa/GqmriHDkU6ZtheBVXsNe3K/pevYJOEnW8Sn17Uf9BgLvsIQAvnIurGDR 4Km4fB1G7e3E/+uVuX/IhUknutsH3l85Omu5e1mpl/RC9yuVdkdhlNz1okl1X1u70Wc0 wBhvvOMFhrzw/lcfzIfncaSXcTUXhUIAljByM= Received: by 10.142.128.3 with SMTP id a3mr1273251wfd.233.1295910400380; Mon, 24 Jan 2011 15:06:40 -0800 (PST) Received: from localhost.localdomain (71-214-82-169.ptld.qwest.net [71.214.82.169]) by mx.google.com with ESMTPS id x18sm18029853wfa.23.2011.01.24.15.06.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 15:06:39 -0800 (PST) From: Ping Cheng To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, Ping Cheng , Ping Cheng Subject: [PATCH v2] input: wacom - Pass touch resolution to clients through input_absinfo Date: Mon, 24 Jan 2011 15:06:13 -0800 Message-Id: <1295910373-2450-1-git-send-email-pinglinux@gmail.com> X-Mailer: git-send-email 1.7.3.4 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]); Mon, 24 Jan 2011 23:06:46 +0000 (UTC) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index f44c822..12d5ccf 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1228,8 +1228,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, case TABLETPC: if (features->device_type == BTN_TOOL_DOUBLETAP || features->device_type == BTN_TOOL_TRIPLETAP) { - input_set_abs_params(input_dev, ABS_RX, 0, features->x_phy, 0, 0); - input_set_abs_params(input_dev, ABS_RY, 0, features->y_phy, 0, 0); + /* set touch resolution in points/mm */ + input_abs_set_res(input_dev, ABS_X, + 100 * features->x_max / features->x_phy); + input_abs_set_res(input_dev, ABS_Y, + 100 * features->y_max / features->y_phy); __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); } @@ -1272,6 +1275,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, features->pressure_max, features->pressure_fuzz, 0); + /* set touch resolution in points/mm */ + input_abs_set_res(input_dev, ABS_X, + 100 * features->x_max / features->x_phy); + input_abs_set_res(input_dev, ABS_Y, + 100 * features->y_max / features->y_phy); } else if (features->device_type == BTN_TOOL_PEN) { __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); __set_bit(BTN_TOOL_PEN, input_dev->keybit);