From: "Henrik Rydberg" <rydberg@euromail.se>
To: Ping Cheng <pinglinux@gmail.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
Ping Cheng <pingc@wacom.com>
Subject: Re: [v2] input: wacom - Pass touch resolution to clients through input_absinfo
Date: Tue, 25 Jan 2011 11:02:38 +0100 [thread overview]
Message-ID: <20110125100238.GA5837@polaris.bitmath.org> (raw)
In-Reply-To: <1295910373-2450-1-git-send-email-pinglinux@gmail.com>
On Mon, Jan 24, 2011 at 11:06:13PM -0000, Ping Cheng wrote:
> Fixed the workaround used for kernels older than 2.6.35.
>
> Signed-off-by: Ping Cheng <pingc@wacom.com>
>
> ---
> drivers/input/tablet/wacom_wac.c | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
A define or a function would have been nicer than "100", but since
this wasn't obvious from the comments,
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Thanks,
Henrik
>
> 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);
next prev parent reply other threads:[~2011-01-25 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 23:06 [PATCH v2] input: wacom - Pass touch resolution to clients through input_absinfo Ping Cheng
2011-01-25 10:02 ` Henrik Rydberg [this message]
2011-01-25 17:59 ` [v2] " Ping Cheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110125100238.GA5837@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=pingc@wacom.com \
--cc=pinglinux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.