All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dirk Behme <dirk.behme@de.bosch.com>
Cc: linux-input@vger.kernel.org, Henrik Rydberg <rydberg@bitmath.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Knut Wohlrab <Knut.Wohlrab@de.bosch.com>,
	Oleksij Rempel <linux@rempel-privat.de>
Subject: Re: [PATCH 5/5] Input: zforce_ts: Fix dual touch recognition
Date: Mon, 25 Apr 2016 14:08:43 -0700	[thread overview]
Message-ID: <20160425210843.GC26059@dtor-ws> (raw)
In-Reply-To: <1461135285-17582-5-git-send-email-dirk.behme@de.bosch.com>

On Wed, Apr 20, 2016 at 08:54:45AM +0200, Dirk Behme wrote:
> From: Knut Wohlrab <Knut.Wohlrab@de.bosch.com>
> 
> A wrong decoding of the touch coordinate message causes a wrong touch
> ID. Touch ID for dual touch must be 0 or 1.
> 
> According to the actual Neonode nine byte touch coordinate coding,
> the state is transported in the lower nibble and the touch ID in
> the higher nibble of payload byte five.
> 
> Signed-off-by: Knut Wohlrab <Knut.Wohlrab@de.bosch.com>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>

Applied, thank you.

> ---
>  drivers/input/touchscreen/zforce_ts.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
> index fd435fe..9790d7a 100644
> --- a/drivers/input/touchscreen/zforce_ts.c
> +++ b/drivers/input/touchscreen/zforce_ts.c
> @@ -412,8 +412,8 @@ static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
>  			point.coord_x = point.coord_y = 0;
>  		}
>  
> -		point.state = payload[9 * i + 5] & 0x03;
> -		point.id = (payload[9 * i + 5] & 0xfc) >> 2;
> +		point.state = payload[9 * i + 5] & 0x0f;
> +		point.id = (payload[9 * i + 5] & 0xf0) >> 4;
>  
>  		/* determine touch major, minor and orientation */
>  		point.area_major = max(payload[9 * i + 6],
> -- 
> 2.8.0
> 

-- 
Dmitry

      reply	other threads:[~2016-04-25 21:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20  6:54 [PATCH 1/5] Input: zforce_ts: Reinitialize touch controller when BOOT_COMPLETE received Dirk Behme
2016-04-20  6:54 ` [PATCH 2/5] Input: zforce_ts: Reject open if initialization not finished Dirk Behme
2016-04-20  6:54 ` [PATCH 3/5] Input: zforce_ts: Add device tree support for scanning frequency Dirk Behme
2016-04-25 21:11   ` Dmitry Torokhov
2016-04-27 13:32     ` fixed-term.Oleksij.Rempel
2016-04-27 14:44     ` Rob Herring
2016-04-28  7:11       ` fixed-term.Oleksij.Rempel
2016-04-20  6:54 ` [PATCH 4/5] Input: zforce_ts: Add support for minimum touch size limit Dirk Behme
2016-04-25 21:12   ` Dmitry Torokhov
2016-04-20  6:54 ` [PATCH 5/5] Input: zforce_ts: Fix dual touch recognition Dirk Behme
2016-04-25 21:08   ` Dmitry Torokhov [this message]

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=20160425210843.GC26059@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Knut.Wohlrab@de.bosch.com \
    --cc=dirk.behme@de.bosch.com \
    --cc=javier@osg.samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=rydberg@bitmath.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 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.