linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH v2 2/3] Input: add support for the STMicroelectronics FingerTip touchscreen
Date: Fri, 10 Mar 2017 20:43:29 +0900	[thread overview]
Message-ID: <20170310114329.qpspk32hkrt2v5gq@gangnam.samsung> (raw)
In-Reply-To: <58BF450C.8070000@samsung.com>

Hi Chanwoo,

> > +			input_mt_slot(sdata->input, t_id);
> > +			input_report_abs(sdata->input, ABS_MT_POSITION_X, x);
> > +			input_report_abs(sdata->input, ABS_MT_POSITION_Y, y);
> > +			input_report_abs(sdata->input, ABS_MT_TOUCH_MAJOR, maj);
> > +			input_report_abs(sdata->input, ABS_MT_TOUCH_MINOR, min);
> > +			input_report_abs(sdata->input, ABS_MT_PRESSURE, area);
> > +			input_report_abs(sdata->input, ABS_MT_ORIENTATION,
> > +								orientation);
> > +			input_sync(sdata->input);
> > +
> 
> When I tested this patch on TM2 board, It looks like it is not well working.
> So, I tried to check the input event by using the evtest tool.
> But, the result don't show the proper ABS_MT_TRACKING_ID event.
> [1] https://cgit.freedesktop.org/evtest/
> 
> According to the mutlti-touch-protocol.txt[2], there are two multi-touch protocol.
> As far as I knew, this driver supports the Protocol B which needs
> the ABS_MT_TRACKING_ID according to the multi-touch-protocol.txt[2].
> [2] Documentation/input/mutlti-touch-protocol.txt
>  
> In our test, the ABS_MT_TRACKING_ID is showed only one time.
> After pressing/releasing finger from touchscreen on first time,
> there are no ABS_MT_TRACKING_ID information from second try with finger.
> 
> I guess that input_mt_report_slot_state() is not calling properly.

Thanks for testing it, with my own tests indeed I didn't check on
that, there is a logical mistake here:

> > +			if (id == STMFTS_EV_MULTI_TOUCH_ENTER) {
> > +				if (!(sdata->in_touch++))
> > +					input_mt_report_slot_state(
> > +							sdata->input,
> > +							MT_TOOL_FINGER, true);
> > +			} else if (id == STMFTS_EV_MULTI_TOUCH_LEAVE) {
> > +				if (!(--sdata->in_touch))
> > +					input_mt_report_slot_state(
> > +							sdata->input,
> > +							MT_TOOL_FINGER, false);
> > +			}

the inner ifs should be removed, they prevent the
ABS_MT_TRACKING_ID to be sent.

I will fix it.

Thanks a lot,
Andi

  reply	other threads:[~2017-03-10 11:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170210021728epcas1p3864184ab4ffe6e4cf6614984e83e307a@epcas1p3.samsung.com>
2017-02-10  2:17 ` [PATCH v2 0/3] STM FingerTip S touchscreen support for TM2 board Andi Shyti
     [not found]   ` <CGME20170210021728epcas5p46d0256d507157cd4387b707ec616c1d1@epcas5p4.samsung.com>
2017-02-10  2:17     ` [PATCH v2 1/3] Input: add STMicroelectronics FingerTip touchscreen driver Andi Shyti
2017-02-16  2:13       ` Rob Herring
     [not found]   ` <CGME20170210021729epcas1p3e11cade2daa21d2dd23839975e29acb6@epcas1p3.samsung.com>
2017-02-10  2:17     ` [PATCH v2 2/3] Input: add support for the STMicroelectronics FingerTip touchscreen Andi Shyti
2017-03-07 23:41       ` Chanwoo Choi
2017-03-10 11:43         ` Andi Shyti [this message]
2017-03-16  8:22       ` Andrzej Hajda
     [not found]   ` <CGME20170210021729epcas5p4101902873e65e0a8faeb2f9cbea5843c@epcas5p4.samsung.com>
2017-02-10  2:17     ` [PATCH v2 3/3] arm64: dts: exynos: Add stmfts touchscreen node for TM2 and TM2E Andi Shyti
     [not found]       ` <20170210021721.12218-4-andi.shyti-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-02-10 13:39         ` Krzysztof Kozlowski
2017-03-07 19:55         ` Krzysztof Kozlowski

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=20170310114329.qpspk32hkrt2v5gq@gangnam.samsung \
    --to=andi.shyti@samsung.com \
    --cc=andi@etezian.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robh+dt@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).