linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Przemo Firszt <przemo@firszt.eu>
To: Jason Gerecke <killertofu@gmail.com>
Cc: jkosina@suse.cz, pinglinux@gmail.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxwacom-devel@lists.sourceforge.net
Subject: Re: [Linuxwacom-devel] [PATCH 2/2] HID: wacom: Add reporting of wheel for Intuos4 WL
Date: Fri, 09 Mar 2012 18:11:33 +0000	[thread overview]
Message-ID: <1331316698.28974.13.camel@pldmachine> (raw)
In-Reply-To: <CANRwn3R5fFkujnsPhx++4PSQEwVNnWo_uXa9Zgb6m=SrJPtN0w@mail.gmail.com>

Dnia 2012-03-09, pią o godzinie 09:37 -0800, Jason Gerecke pisze:
> On Fri, Mar 9, 2012 at 5:20 AM, Przemo Firszt <przemo@firszt.eu> wrote:
> > This patch adds reporting of ABS_WHEEL event. Raported walues are 0..71
> > and are related to absolute location of the finger on the wheel.
> >
> > Signed-off-by: Przemo Firszt <przemo@firszt.eu>
> > ---
> >  drivers/hid/hid-wacom.c |   19 +++++++++++++++++++
> >  1 files changed, 19 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
> > index 5c25036..6f65514 100644
> > --- a/drivers/hid/hid-wacom.c
> > +++ b/drivers/hid/hid-wacom.c
> > @@ -36,6 +36,7 @@
> >  struct wacom_data {
> >        __u16 tool;
> >        __u16 butstate;
> > +       __u8 whlstate;
> >        __u8 features;
> >        __u32 id;
> >        __u32 serial;
> > @@ -322,6 +323,16 @@ static void wacom_i4_parse_button_report(struct wacom_data *wdata,
> >                        struct input_dev *input, unsigned char *data)
> >  {
> >        __u16 new_butstate;
> > +       __u8 new_whlstate;
> > +       __u8 sync = 0;
> > +
> > +       new_whlstate = data[1] & 0x7f;
> > +       if (new_whlstate != wdata->whlstate) {
> > +               wdata->whlstate = new_whlstate;
> > +               input_report_key(input, BTN_TOUCH, 1);
> > +               input_report_abs(input, ABS_WHEEL, new_whlstate);
> > +               sync = 1;
> > +       }
> >
> The highest bit of data[1] is a "touched" flag that you'll want to
> check to determine if the wheel is being used. If its unset, you'll
> want to reset ABS_WHEEL and BTN_TOUCH to zero here.
> 
Thanks!
A new patch is on the way...
-- 
Przemo

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-03-09 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 13:20 [PATCH 1/2] HID: wacom: Reset stylus buttons - Intuos4 WL Przemo Firszt
2012-03-09 13:20 ` [PATCH 2/2] HID: wacom: Add reporting of wheel for " Przemo Firszt
2012-03-09 17:37   ` [Linuxwacom-devel] " Jason Gerecke
2012-03-09 18:11     ` Przemo Firszt [this message]
     [not found] ` <1331299252-23699-1-git-send-email-przemo-q9SP4D9nreWHXe+LvDLADg@public.gmane.org>
2012-03-09 16:58   ` [PATCH 1/2] HID: wacom: Reset stylus buttons - " Jason Gerecke
2012-03-12 14:52     ` Jiri Kosina

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=1331316698.28974.13.camel@pldmachine \
    --to=przemo@firszt.eu \
    --cc=jkosina@suse.cz \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxwacom-devel@lists.sourceforge.net \
    --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 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).