linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ilya Yanok <yanok@emcraft.com>,
	linux-input@vger.kernel.org, wd@denx.de, dzu@denx.de,
	sasha_d@emcraft.com
Subject: Re: [PATCH] edt_ts: EDT Touchscreen driver
Date: Tue, 15 Nov 2011 10:17:15 +0100	[thread overview]
Message-ID: <20111115101715.7b330e1d@wker> (raw)
In-Reply-To: <20111114213241.GA26418@core.coreip.homeip.net>

Hi Dmitry,

On Mon, 14 Nov 2011 13:32:42 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:

> On Tue, Nov 15, 2011 at 01:07:57AM +0400, Ilya Yanok wrote:
> > Hi Dmitry,
> > 
> > On 14.11.2011 21:28, Dmitry Torokhov wrote:
> > >> +	irq = gpio_to_irq(pdata->irq_gpio);
> > >> +	if (irq < 0) {
> > >> +		dev_err(&client->dev, "can't get IRQ for GPIO\n");
> > >> +		error = -EINVAL;
> > >> +		goto err0;
> > >> +	}
> > > 
> > > Why can't we use client->irq?
> > 
> > Well, my idea was to avoid duplication (passing both GPIO and IRQ
> > numbers) and I can't pass only client->irq as we need GPIO number also
> > and irq_to_gpio is not guaranteed to work with arbitrary IRQ number.
> 
> Do you really need to read gpio state in IRQ? Can't you simply rely on
> 'event' do decide whether to emit input events?

We can't rely on the 'event' only. The peculiar behaviour of the
touch controller enforces this. The touch controller toggles the
interrupt line when you keep the finger down. The rate is not exactly
specified by the the manufacturer (~80/sec). Measured rate deviates
from this specified rate. Valid touch packet data can be read when
interrupt line is pulled down. The designer of the target device
insisted on driver implementation reading touch packet data only
when irq line is pulled down.

> Also:
> 
> - please do not report fake pressure events since the device does
> not seem to support true pressure reading (tslib has been fixed ages
> ago).

Many projects still use tslib-1.0 (e.g. distributions based on
recent yoctoproject releases). Removing pressure event reporting
will certainly break touch screen support there.

Thanks,

Anatolij

  reply	other threads:[~2011-11-15  9:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 23:34 [PATCH] edt_ts: EDT Touchscreen driver Ilya Yanok
2011-11-14 17:28 ` Dmitry Torokhov
2011-11-14 21:07   ` Ilya Yanok
2011-11-14 21:32     ` Dmitry Torokhov
2011-11-15  9:17       ` Anatolij Gustschin [this message]
2011-11-15  9:30         ` Dmitry Torokhov
2011-11-15 17:41         ` Dmitry Torokhov
2011-11-16 20:44           ` Ilya Yanok
2011-11-17 12:20             ` Anatolij Gustschin
2011-11-20 18:09   ` Ilya Yanok
2011-11-20 18:36     ` Dmitry Torokhov
2011-11-20 19:22       ` Ilya Yanok
     [not found] ` <CAM=Q2cuv_OFdrHpmf-fSRkiaz0X07vHpbpWH=MzfR_3S4OADjg@mail.gmail.com>
2011-11-21  9:24   ` Anatolij Gustschin
2011-11-30  9:34 ` Simon Budig
2011-12-14 23:49   ` Ilya Yanok

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=20111115101715.7b330e1d@wker \
    --to=agust@denx.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dzu@denx.de \
    --cc=linux-input@vger.kernel.org \
    --cc=sasha_d@emcraft.com \
    --cc=wd@denx.de \
    --cc=yanok@emcraft.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).