From: Feng Tang <feng.tang@intel.com>
To: Feng Tang <feng.tang@intel.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Clark, Joel" <joel.clark@intel.com>
Subject: Re: [PATCH 2/2] Input: tsc2007 - Add a z1_low_threshhold platform data parameter
Date: Mon, 26 Dec 2011 11:16:17 +0800 [thread overview]
Message-ID: <20111226111617.4523050f@feng-i7> (raw)
In-Reply-To: <20111205133541.74b72788@feng-i7>
Hi Dmitry,
On Mon, 5 Dec 2011 13:35:41 +0800
Feng Tang <feng.tang@intel.com> wrote:
> > > /*
> > > * Sample found inconsistent by debouncing
> > > or pressure is
> > > * beyond the maximum. Don't report it to
> > > user space,
> > > * repeat at least once more the
> > > measurement. */
> > > dev_dbg(&ts->client->dev, "ignored pressure
> > > %d\n", rt); }
> >
> > What I meant that we need to ajust the logic to _exit_ the loop if we
> > receive several samples with rt > max_rt instead of adding a new
> > parameter.
>
> Yes, I did try a similar way to set a retry limit which also works
> basically, code is like this
>
> @@ -169,6 +169,7 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
> struct tsc2007 *ts = handle;
> struct input_dev *input = ts->input;
> struct ts_event tc;
> + u32 max_retry = 2;
> u32 rt;
>
> while (!ts->stopped && tsc2007_is_pen_down(ts)) {
> @@ -206,6 +207,8 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
> * repeat at least once more the measurement.
> */
> dev_dbg(&ts->client->dev, "ignored pressure %d\n",
> rt);
> + if (!--max_retry)
> + break;
> }
>
>
> But I still have some concerns:
> 1. How many retries should we try? the tsc2007_read_values() will take about
> 70 ms on our platform, plus the "poll_period", one retry will take about
> 100ms. 2. I checked the noise data, its z1 value is always in a range from 9
> to 13, while the real data's z1 is always bigger than 300. So I think there
> is a very clear gap to tell the noise data from valid data by z1 value.
>
> How do you think about it?
Any further comments?
Thanks,
Feng
next prev parent reply other threads:[~2011-12-26 3:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 8:12 [PATCH 1/2] Input: tsc2007 - Disable irq when the irq thread is handling data Feng Tang
2011-11-29 8:12 ` [PATCH 2/2] Input: tsc2007 - Add a z1_low_threshhold platform data parameter Feng Tang
2011-11-29 9:23 ` Dmitry Torokhov
2011-11-30 2:34 ` Feng Tang
2011-11-30 2:34 ` Feng Tang
2011-12-01 5:47 ` Dmitry Torokhov
2011-12-01 6:19 ` Feng Tang
2011-12-01 8:45 ` Dmitry Torokhov
2011-12-01 9:04 ` Feng Tang
2011-12-04 8:54 ` Dmitry Torokhov
2011-12-05 5:35 ` Feng Tang
2011-12-26 3:16 ` Feng Tang [this message]
2011-11-29 9:22 ` [PATCH 1/2] Input: tsc2007 - Disable irq when the irq thread is handling data Dmitry Torokhov
2011-11-30 2:08 ` Feng Tang
2011-12-01 6:10 ` Dmitry Torokhov
2011-12-01 6:30 ` Feng Tang
2011-12-01 8:48 ` Dmitry Torokhov
2011-12-01 9:00 ` Feng Tang
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=20111226111617.4523050f@feng-i7 \
--to=feng.tang@intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=joel.clark@intel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.