From: Jason Gerecke <killertofu@gmail.com>
To: linux-input@vger.kernel.org,
linuxwacom-devel@lists.sourceforge.net, pinglinux@gmail.com,
skomra@gmail.com, dmitry.torokhov@gmail.com
Cc: Jason Gerecke <killertofu@gmail.com>
Subject: [PATCH 4/4] Input: wacom: Handle 1024 pressure levels in wacom_tpc_pen
Date: Thu, 30 Jan 2014 10:48:48 -0800 [thread overview]
Message-ID: <1391107728-1306-4-git-send-email-killertofu@gmail.com> (raw)
In-Reply-To: <1391107728-1306-1-git-send-email-killertofu@gmail.com>
Some tablet PC sensors (e.g. the 0xEC found in the Thinkpad
Yoga) report more than 256 pressure levels and will experience
wraparound unless the full range is read.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 9ff5613..ae1437b 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1087,7 +1087,7 @@ static int wacom_tpc_pen(struct wacom_wac *wacom)
input_report_key(input, BTN_STYLUS2, data[1] & 0x10);
input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
- input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x01) << 8) | data[6]);
+ input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x03) << 8) | data[6]);
input_report_key(input, BTN_TOUCH, data[1] & 0x05);
input_report_key(input, wacom->tool[0], prox);
return 1;
--
1.8.5.3
next prev parent reply other threads:[~2014-01-30 18:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 18:48 [PATCH 1/4] Input: wacom: Use full 32-bit HID Usage value in switch statement Jason Gerecke
2014-01-30 18:48 ` [PATCH 2/4] Input: wacom: Override 'pressure_max' with value from HID_USAGE_PRESSURE Jason Gerecke
[not found] ` <1391107728-1306-2-git-send-email-killertofu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-27 18:27 ` Aaron Armstrong Skomra
2014-02-27 18:39 ` Aaron Armstrong Skomra
2014-01-30 18:48 ` [PATCH 3/4] Input: wacom: References to 'wacom->data' should use 'unsigned char*' Jason Gerecke
[not found] ` <1391107728-1306-3-git-send-email-killertofu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-27 18:28 ` Aaron Armstrong Skomra
2014-02-27 18:40 ` Aaron Armstrong Skomra
2014-01-30 18:48 ` Jason Gerecke [this message]
[not found] ` <1391107728-1306-4-git-send-email-killertofu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-27 18:28 ` [PATCH 4/4] Input: wacom: Handle 1024 pressure levels in wacom_tpc_pen Aaron Armstrong Skomra
2014-02-27 18:40 ` Aaron Armstrong Skomra
2014-02-27 18:37 ` [PATCH 1/4] Input: wacom: Use full 32-bit HID Usage value in switch statement Aaron Armstrong Skomra
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=1391107728-1306-4-git-send-email-killertofu@gmail.com \
--to=killertofu@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linuxwacom-devel@lists.sourceforge.net \
--cc=pinglinux@gmail.com \
--cc=skomra@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.