linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@euromail.se>
To: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Kevin McNeely <kev@cypress.com>,
	Mohan Pallaka <mpallaka@codeaurora.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH V3 1/3] Input: cyttsp - Cypress TTSP capacitive multi-touch screen support
Date: Wed, 5 Oct 2011 12:00:09 +0200	[thread overview]
Message-ID: <20111005100009.GA7288@polaris.bitmath.org> (raw)
In-Reply-To: <CAAwP0s1hEOkidUK48cDf4DhSKN=PwxkLmHHpAVSZ6kPp7bhE=A@mail.gmail.com>

> To be more precise, the correct approach is:
> 
> 	for (i = 0; i < CY_MAX_ID; i++)
> 		if (!(used & (1 << i)))
> 			cyttsp_report_slot_empty(ts->input, i);
> 
> or
> 
> 	for (i = 0; i < CY_MAX_ID; i++)
> 		if (previous & (1 << i) &&
> 		    !(used & (1 << i)))
> 			cyttsp_report_slot_empty(ts->input, i);
> 
> where used is a bitmask to store each contact state for this event and
> previous is a bitmask to store the state for the previous event.
> 
> I looked at input_mt_report_slot_state() and it seems that it only
> checks whether the active parameter to send an ABS_MT_TRACKING_ID -1
> input event, so I think that I should use the latter.

Please implement the first version; the event never gets sent unless
there is an actual change, which you can see by following the code
deeper. If/when there are more drivers in need of a similar approach,
I might integrate the logic in the input-mt core instead.

Thanks,
Henrik

  reply	other threads:[~2011-10-05  9:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18  2:01 [PATCH V3 0/3] Input: Cypress TTSP device driver Javier Martinez Canillas
2011-09-18  2:01 ` [PATCH V3 1/3] Input: cyttsp - Cypress TTSP capacitive multi-touch screen support Javier Martinez Canillas
2011-09-27 11:52   ` Henrik Rydberg
2011-09-28 23:22     ` Javier Martinez Canillas
2011-09-28 23:50       ` Kevin McNeely
2011-10-03 21:38     ` Javier Martinez Canillas
2011-10-05 10:00       ` Henrik Rydberg [this message]
2011-09-18  2:01 ` [PATCH V3 2/3] Input: cyttsp - add support for Cypress TTSP touchscreen I2C bus interface Javier Martinez Canillas
2011-09-18  2:01 ` [PATCH V3 3/3] Input: cyttsp - add support for Cypress TTSP touchscreen SPI " Javier Martinez Canillas
2011-09-26 21:06 ` [PATCH V3 0/3] Input: Cypress TTSP device driver Javier Martinez Canillas

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=20111005100009.GA7288@polaris.bitmath.org \
    --to=rydberg@euromail.se \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kev@cypress.com \
    --cc=linux-input@vger.kernel.org \
    --cc=martinez.javier@gmail.com \
    --cc=mpallaka@codeaurora.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).