All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
To: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@euromail.se>,
	linux-input <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	silverhammermba@gmail.com
Subject: Re: [PATCH 2/2] input: synaptics - fix width calculation on image sensors
Date: Mon, 5 Jan 2015 13:42:13 -0500	[thread overview]
Message-ID: <CAN+gG=FLOD5C3N0q-i=4Sm6fH+oYTV27nEOKn8nxaw7GvFJbkQ@mail.gmail.com> (raw)
In-Reply-To: <4167786.IbP0CPQIld@xps13>

On Mon, Jan 5, 2015 at 1:37 PM, Gabriele Mazzotta
<gabriele.mzt@gmail.com> wrote:
> On Monday 05 January 2015 13:25:38 Benjamin Tissoires wrote:
>> Hi Gabriele,
>>
>> On Sat, Dec 27, 2014 at 6:31 AM, Gabriele Mazzotta
>> <gabriele.mzt@gmail.com> wrote:
>> > When two or more fingers are on the touchpad, the 'w' slot holds the
>> > finger count rather than the width. Retrieve the correct value encoded
>> > in the lower bits of 'x', 'y' and 'z'.
>> >
>> > The minimum width reported is 8 rather than 4 in this case, while the
>> > maximum remains 15.
>> >
>> > Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
>> > ---
>> >  drivers/input/mouse/synaptics.c | 4 +++-
>> >  1 file changed, 3 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
>> > index ea0563e..5ff4c5b 100644
>> > --- a/drivers/input/mouse/synaptics.c
>> > +++ b/drivers/input/mouse/synaptics.c
>> > @@ -593,7 +593,9 @@ static void synaptics_parse_agm(const unsigned char buf[],
>> >         switch (agm_packet_type) {
>> >         case 1:
>> >                 /* Gesture packet: (x, y, z) half resolution */
>> > -               agm->w = hw->w;
>> > +               agm->w = ((buf[1] & 0x01) |
>> > +                         ((buf[2] & 0x01) << 1) |
>> > +                         ((buf[5] & 0x01) << 2)) + 8;
>> >                 agm->x = (((buf[4] & 0x0f) << 8) | buf[1]) << 1;
>>
>> For completeness, I think, we should also removes the w bits from x, y
>> and z (by masking buf[1], buf[2] and buf[5] with 0xfe).
>
> You are right, I forgot about it.
>
> I was going to re-submit these patches anyway since there have been
> quite a few changes and these can no longer be applied on next.

OK, I am trying to put together my thoughts for 1/2 right now. If you
could just wait a little before resubmitting, I would be grateful.

Thanks,
Benjamin

>
>> Cheers,
>> Benjamin
>>
>> >                 agm->y = (((buf[4] & 0xf0) << 4) | buf[2]) << 1;
>> >                 agm->z = ((buf[3] & 0x30) | (buf[5] & 0x0f)) << 1;
>> > --
>> > 2.1.4
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> > Please read the FAQ at  http://www.tux.org/lkml/
>

  reply	other threads:[~2015-01-05 18:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 11:31 [PATCH 0/2] input: synaptics - make image sensors report finger widths Gabriele Mazzotta
2014-12-27 11:31 ` [PATCH 1/2] input: synaptics - make image sensors report ABS_MT_TOUCH_MAJOR Gabriele Mazzotta
2015-01-05 19:24   ` Benjamin Tissoires
2015-01-05 20:13     ` Gabriele Mazzotta
2015-01-05 20:18       ` Gabriele Mazzotta
2015-01-05 22:00     ` Gabriele Mazzotta
2015-01-05 22:04       ` Benjamin Tissoires
2015-01-07  6:10         ` Peter Hutterer
2015-01-07  7:49         ` Dmitry Torokhov
2015-01-07  6:02     ` Peter Hutterer
2014-12-27 11:31 ` [PATCH 2/2] input: synaptics - fix width calculation on image sensors Gabriele Mazzotta
2015-01-05 18:25   ` Benjamin Tissoires
2015-01-05 18:37     ` Gabriele Mazzotta
2015-01-05 18:42       ` Benjamin Tissoires [this message]
2015-01-05 19:04         ` Dmitry Torokhov
2015-01-05 19:07           ` Benjamin Tissoires
2015-01-05 19:15           ` Gabriele Mazzotta
2015-01-05 19:26             ` 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=FLOD5C3N0q-i=4Sm6fH+oYTV27nEOKn8nxaw7GvFJbkQ@mail.gmail.com' \
    --to=benjamin.tissoires@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gabriele.mzt@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@euromail.se \
    --cc=silverhammermba@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.