linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@enac.fr>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>,
	Jiri Kosina <jkosina@suse.cz>, Stephane Chatty <chatty@enac.fr>,
	Mohamed Ikbel Boulabiar <boulabiar@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] hid-multitouch: add support for trackpads
Date: Tue, 24 Jan 2012 15:34:12 +0100	[thread overview]
Message-ID: <CAN+gG=HsiGyCMVHbWm1ri5q5_s8L0Af76B9R8gJVHhKMa8t1FQ@mail.gmail.com> (raw)
In-Reply-To: <20120120164849.GA6520@core.coreip.homeip.net>

Hi Dmitry and Henrik,

Thanks Dmitry for the comment.

I'll do the change as you mentioned and will also remove the
input_mt_report_finger_count call.

Cheers,
Benjamin

On Fri, Jan 20, 2012 at 17:48, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Fri, Jan 20, 2012 at 05:09:48PM +0100, Henrik Rydberg wrote:
>> Hi Benjamin,
>>
>> > @@ -389,9 +404,19 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
>> >                             td->last_field_index = field->index;
>> >                     return -1;
>> >             }
>> > +           case HID_DG_TOUCH:
>> > +                   /* Legacy devices use TIPSWITCH and not TOUCH.
>> > +                    * Let's just ignore this field. */
>> > +                   return -1;
>> >             /* let hid-input decide for the others */
>> >             return 0;
>> >
>> > +   case HID_UP_BUTTON:
>> > +           code = ((usage->hid - 1) & HID_USAGE) + BTN_MOUSE;
>>
>> Why '+' here instead of '|' is  beyond me...
>
> Because it is an offset for the range. The fact that it is on power 2
> boundary and we can use "|" is purely coincidential here.
>
> Maybe we should even write it as:
>
>                code = BTN_MOUSE + ((usage->hid - 1) & HID_USAGE);
>
> Thanks,
> Dmitry
>
> --
> Dmitry
> --
> 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-01-24 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 11:51 [PATCH v2 0/3] Support of Perixx Peripad 701 for hid-multitouch Benjamin Tissoires
2012-01-18 11:51 ` [PATCH v2 1/3] hid-multitouch: add support for trackpads Benjamin Tissoires
2012-01-20 16:09   ` Henrik Rydberg
2012-01-20 16:48     ` Dmitry Torokhov
2012-01-24 14:34       ` Benjamin Tissoires [this message]
2012-02-02  8:36         ` Jiri Kosina
2012-02-03 10:07           ` Benjamin Tissoires
2012-01-18 11:51 ` [PATCH v2 2/3] HID: multitouch: add control of the feature "Maximum Contact Number" Benjamin Tissoires
2012-01-20 16:19   ` Henrik Rydberg
2012-01-24 14:39     ` Benjamin Tissoires
2012-01-18 11:51 ` [PATCH v2 3/3] HID: multitouch: support Perixx PERIPAD 701 Benjamin Tissoires

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='CAN+gG=HsiGyCMVHbWm1ri5q5_s8L0Af76B9R8gJVHhKMa8t1FQ@mail.gmail.com' \
    --to=benjamin.tissoires@enac.fr \
    --cc=boulabiar@gmail.com \
    --cc=chatty@enac.fr \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@euromail.se \
    /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).