From: Aaron Armstrong Skomra <skomra@gmail.com>
To: linux-input@vger.kernel.org
Subject: Re: [PATCH 2/4] Input: wacom: Override 'pressure_max' with value from HID_USAGE_PRESSURE
Date: Thu, 27 Feb 2014 10:39:25 -0800 [thread overview]
Message-ID: <CAEoswT3VMyrzBbhsP7qMFaQxQR4HG=gseRTQA9f97Ou70cXzgw@mail.gmail.com> (raw)
In-Reply-To: <1391107728-1306-2-git-send-email-killertofu@gmail.com>
On Thu, Jan 30, 2014 at 10:48 AM, Jason Gerecke <killertofu@gmail.com> wrote:
> The 0xEC sensor is used in multiple tablet PCs and curiously has
> versions that report 256 levels of pressure (Samsung Slate 7)
> as well as versions that report 1024 levels (Lenovo Thinkpad Yoga).
> To allow both versions to work properly, we allow the value of
> HID_USAGE_PRESSURE reported to override pressure_max.
>
> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
> ---
> drivers/input/tablet/wacom_sys.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
> index 5be6177..611fc39 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -24,6 +24,7 @@
> #define HID_USAGE 0x09
> #define HID_USAGE_X ((HID_USAGE_PAGE_DESKTOP << 16) | 0x30)
> #define HID_USAGE_Y ((HID_USAGE_PAGE_DESKTOP << 16) | 0x31)
> +#define HID_USAGE_PRESSURE ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x30)
> #define HID_USAGE_X_TILT ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x3d)
> #define HID_USAGE_Y_TILT ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x3e)
> #define HID_USAGE_FINGER ((HID_USAGE_PAGE_DIGITIZER << 16) | 0x22)
> @@ -465,6 +466,14 @@ static int wacom_parse_hid(struct usb_interface *intf,
> wacom_retrieve_report_data(intf, features);
> i++;
> break;
> +
> + case HID_USAGE_PRESSURE:
> + if (pen) {
> + features->pressure_max =
> + get_unaligned_le16(&report[i + 3]);
> + i += 4;
> + }
> + break;
> }
> break;
>
> --
> 1.8.5.3
>
Tested-by: Aaron Skomra <Aaron.Skomra@wacom.com>
next prev parent reply other threads:[~2014-02-27 18:39 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 [this message]
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 ` [PATCH 4/4] Input: wacom: Handle 1024 pressure levels in wacom_tpc_pen Jason Gerecke
[not found] ` <1391107728-1306-4-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-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='CAEoswT3VMyrzBbhsP7qMFaQxQR4HG=gseRTQA9f97Ou70cXzgw@mail.gmail.com' \
--to=skomra@gmail.com \
--cc=linux-input@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).