From: Henrik Rydberg <rydberg@euromail.se>
To: "Stéphane Chatty" <chatty@enac.fr>
Cc: Stephane Chatty <chatty@lii-enac.fr>,
dmitry.torokhov@gmail.com, jkosina@suse.cz,
linux-input@vger.kernel.org
Subject: Re: [PATCH 3/4] hid-multitouch: added support for Cypress TrueTouch panels
Date: Thu, 14 Oct 2010 14:54:24 +0200 [thread overview]
Message-ID: <4CB6FD80.4030808@euromail.se> (raw)
In-Reply-To: <4BAF2E06-CDEE-4206-ABE7-A0787025BE15@enac.fr>
On 10/14/2010 02:33 PM, Stéphane Chatty wrote:
>
> Le 14 oct. 10 à 14:06, Henrik Rydberg a écrit :
>>>
>>> +static int cypress_compute_slot(struct mt_device *td)
>>> +{
>>> + if (td->curcontactid != 0 || td->curcontact == 0)
>>> + return td->curcontactid;
>>> + else
>>> + return -1;
>>> +}
>>
>>
>> Returned slots should always be valid, since the intent is to actually report
>> data for the contact. If there is additional logic determining whether a touch
>> is valid, like here, it can simply be added to the validity computation.
>
> Then you'd need a second device-specific function, one that determines if a
> contact is valid. I was trying to minimize that, especially because it would be
> for the sake of one device only.
Now that single device clutters the logic for all other devices instead... We
could actually get away with zero device-specific functions, only branching on
the device class at a couple of places in the driver.
> Managing it in the compute_slot function makes
> sense to me, giving this function the semantics of "is this contact a real slot,
> and if yes which is it?".
>
> Maybe we could add somthing like td->curvalid = false to the computation
> function? This would not work in the current code, but maybe we can make it work.
Another thing I forgot about: do all the currently included devices have good
contact ids, in the sense that they handle contacts during their lifetime? Are
there any examples other than ntrig where it does not work that way? I am of
course asking to see if we need to care about non-slotted devices.
Cheers,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-10-14 12:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 22:33 [PATCH 3/4] hid-multitouch: added support for Cypress TrueTouch panels Stephane Chatty
2010-10-14 12:06 ` Henrik Rydberg
2010-10-14 12:33 ` Stéphane Chatty
2010-10-14 12:54 ` Henrik Rydberg [this message]
2010-10-14 15:16 ` Stéphane Chatty
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=4CB6FD80.4030808@euromail.se \
--to=rydberg@euromail.se \
--cc=chatty@enac.fr \
--cc=chatty@lii-enac.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.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).