Thread (10 messages) flat view 10 messages, 3 authors, 2011-10-05

Re: [PATCH V3 1/3] Input: cyttsp - Cypress TTSP capacitive multi-touch screen support

From: Henrik Rydberg <hidden>
Date: 2011-10-05 09:54:05

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help