From: Olivier Sobrie <olivier.sobrie@gmail.com>
To: Henrik Rydberg <rydberg@euromail.se>
Cc: Olivier Sobrie <olivier@sobrie.be>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org,
Jan Paesmans <jan.paesmans@gmail.com>
Subject: Re: [PATCH] ili210x: Add support for Ilitek ILI210x based touchscreens
Date: Tue, 6 Mar 2012 14:58:52 +0100 [thread overview]
Message-ID: <20120306135852.GB28206@hposo> (raw)
In-Reply-To: <20120306134252.GA28547@polaris.bitmath.org>
On Tue, Mar 06, 2012 at 02:42:52PM +0100, Henrik Rydberg wrote:
> > I propose to change the handling of the interrupt by the code below.
> >
> > #define POLL_PERIOD msecs_to_jiffies(1)
> >
> > static void ili210x_work(struct work_struct *work)
> > {
> > struct ili210x *priv = container_of(work, struct ili210x,
> > dwork.work);
> > struct input_dev *input = priv->input;
> > struct i2c_client *client = priv->client;
> > struct device *dev = &client->dev;
> > struct touchdata touchdata;
> > int rc;
> >
> > rc = ili210x_read_reg(client, REG_TOUCHDATA, &touchdata,
> > sizeof(touchdata));
> > if (rc < 0) {
> > dev_err(dev, "Unable to get touchdata, err = %d\n",
> > rc);
> > return;
> > }
> >
> > ili210x_report_events(input, &touchdata);
> >
> > if ((touchdata.status & 0xf3) || get_pendown_state(priv))
> > schedule_delayed_work(&priv->dwork, POLL_PERIOD);
> > }
> >
> > static irqreturn_t ili210x_irq(int irq, void *irq_data)
> > {
> > struct ili210x *priv = irq_data;
> >
> > schedule_delayed_work(&priv->dwork, 0);
> >
> > return IRQ_HANDLED;
> > }
> >
> > It removes the timer and handle the case of level triggered and edge
> > triggered interrupts.
> > What do you think about that ?
>
> Looks a lot nicer, thank you!
Ok thanks I'll send a new version of the patch including that and the
changes for the remarks you made before.
--
Olivier Sobrie
next prev parent reply other threads:[~2012-03-06 13:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 13:40 [PATCH] ili210x: Add support for Ilitek ILI210x based touchscreens Olivier Sobrie
2012-03-05 16:48 ` Henrik Rydberg
2012-03-06 7:57 ` Olivier Sobrie
2012-03-06 9:25 ` Henrik Rydberg
2012-03-06 13:20 ` Olivier Sobrie
2012-03-06 13:42 ` Henrik Rydberg
2012-03-06 13:58 ` Olivier Sobrie [this message]
2012-03-06 15:01 ` Olivier Sobrie
2012-03-06 15:51 ` Henrik Rydberg
2012-03-07 7:00 ` Olivier Sobrie
2012-03-07 7:05 ` [PATCH v3] " Olivier Sobrie
2012-03-07 8:44 ` Dmitry Torokhov
2012-03-07 10:11 ` Olivier Sobrie
2012-03-08 9:29 ` [PATCH v4] " Olivier Sobrie
2012-03-17 6:58 ` Dmitry Torokhov
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=20120306135852.GB28206@hposo \
--to=olivier.sobrie@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jan.paesmans@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=olivier@sobrie.be \
--cc=rydberg@euromail.se \
/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).