From: Eric Miao <eric.y.miao@gmail.com>
To: David Brownell <david-b@pacbell.net>
Cc: Eric Miao <ymiao3@marvell.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: [patch 22/22] input: ads7846: introduce platform specific way to synchronize sampling
Date: Sat, 14 Mar 2009 11:41:58 +0800 [thread overview]
Message-ID: <f17812d70903132041u5df5d6f7u9cc9577d2dc95a60@mail.gmail.com> (raw)
In-Reply-To: <200903131809.40400.david-b@pacbell.net>
On Sat, Mar 14, 2009 at 9:09 AM, David Brownell <david-b@pacbell.net> wrote:
> On Thursday 12 March 2009, Eric Miao wrote:
>> >
>> > This should be a workaround for broken hardware and I don't expect
>> > this sync time on every boards.
>> >
>>
>> The sync time depends on the moment of this sync between two HSYNC,
>> I don't expect that to be very long,
>
> But how long is that? 1/(50 KHz) or so?
>
For Sharp Zaurus, let's say a poodle, with PXA255 and QVGA LCD
portrait, a typical of 320 lines per frame (although counting in blank
VSYNC will make this a bit larger), and 60Hz frame refresh rate:
1 HSYNC = 1/(60Hz * 320) = 52.08us
An average sync time would be half of this, say, 26us.
Having another interrupt to trigger the sampling will be a bit
trickier and considering this average of 26us on a 400MHz
PXA255, and another interrupt latency, I don't see too much
benefit of doing that.
And my personal feeling of the final result with the GUI seems
quite responsive, though I didn't stress test that.
>
>> yet the hardware is broken enough to
>> endure this latency.
>
> Actually I heard from someone else this morning that it's not just
> "broken" hardware that sees touchscreen ADC sampling noise related
> to hsync. So this patch makes sense ... although there's no way to
> guarantee the SPI requests won't have queueing delays before they
> arrive at the touchscreen controller, possibly hitting the next
> hsync interval.
>
> It seems that it's surprisingly tricky to get clean samples from
> touchscreens. There's physical oscillation to compensate, which
> changes capacitance until it damps down. There's also electrical
> oscillation from charging the various sense lines. Add to that a
> bunch of honest-to-goodness noise associated with hsync and vsync...
> yeech! It would be a Good Thing if someone were to split out the
> sample filtering logic from this driver so it could be used with
> other touchscreen drivers.
>
Yes, sample filtering can actually be made input device wise.
There are actually some user-land solution to this, e.g. tslib.
Yet this sync issue seems annoyingly unavoidable even with
a fine grained filter, or maybe I didn't try my best to tweak those
filters to a maximum potential yet, and I gave up on that finally.
> - Dave
>
>
--
Cheers
- eric
--
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:[~2009-03-14 3:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 19:59 [patch 22/22] input: ads7846: introduce platform specific way to synchronize sampling akpm
2009-03-13 2:34 ` Dmitry Torokhov
2009-03-13 2:42 ` Eric Miao
2009-03-13 2:50 ` Eric Miao
2009-03-14 1:09 ` David Brownell
2009-03-14 3:41 ` Eric Miao [this message]
2009-03-14 12:55 ` Mark Brown
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=f17812d70903132041u5df5d6f7u9cc9577d2dc95a60@mail.gmail.com \
--to=eric.y.miao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david-b@pacbell.net \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=ymiao3@marvell.com \
/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).