From: Anatolij Gustschin <agust@denx.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Detlev Zundel <dzu@denx.de>
Subject: Re: [PATCH v2 2/2] Input: ads7846 - extend the driver for ads7845 controller support
Date: Thu, 1 Jul 2010 13:23:21 +0200 [thread overview]
Message-ID: <20100701132321.5111d872@wker> (raw)
In-Reply-To: <20100630081805.GD4154@core.coreip.homeip.net>
On Wed, 30 Jun 2010 01:18:05 -0700
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Tue, Jun 29, 2010 at 11:29:53AM +0200, Anatolij Gustschin wrote:
> > ADS7845 is a controller for 5-wire touch screens and
> > somewhat different from 7846. It requires three serial
> > communications to accomplish one complete conversion.
> > Unlike 7846 it doesn't allow Z1-/Z2- position measurement.
> >
> > The patch extends the ads7846 driver to also support
> > ads7845. The packet struct is extended to contain
> > needed command and conversion buffers. ads7846_rx()
> > and ads7846_rx_val() now differentiate between 7845
> > and 7846 case. ads7846_probe() is modified to setup
> > ads7845 specific command and conversion messages and
> > to switch ads7845 into power-down mode, since this is
> > needed to be prepared to respond to pendown interrupts.
> >
>
> Thank you for making changes Anatolij, I iwll be applying the patch to
> my 2.6.36 queue.
>
> I just noticed that your previous patch alters pdata which I belive is
> wrong thing to do. Could you please try the following patch and let me
> know if I broke anything?
The patch needs a small fix, please see below.
...
> - if (!pdata->irq_flags)
> - pdata->irq_flags = IRQF_TRIGGER_FALLING;
> + irq_flags = pdata->irq_flags ? : IRQF_TRIGGER_FALLING;
>
> - if (request_irq(spi->irq, ads7846_irq, pdata->irq_flags,
> - spi->dev.driver->name, ts)) {
> + err = request_irq(spi->irq, ads7846_irq, pdata->irq_flags,
> + spi->dev.driver->name, ts);
We should pass previously obtained 'irq_flags' to request_irq(),
not the original 'pdata->irq_flags'. I fixed this and tested the
corrected patch with ads7845, it is okay now. I'll submit the
corrected patch shortly.
Thanks,
Anatolij
next prev parent reply other threads:[~2010-07-01 11:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 12:23 [PATCH 1/2] Input: ads7846 - allow specifying irq trigger type in platform data Anatolij Gustschin
2010-04-30 12:23 ` [PATCH 2/2] Input: ads7846 - extend the driver for ads7845 controller support Anatolij Gustschin
2010-06-29 9:29 ` [PATCH v2 " Anatolij Gustschin
2010-06-30 8:18 ` Dmitry Torokhov
2010-06-30 8:45 ` Anatolij Gustschin
2010-07-01 11:23 ` Anatolij Gustschin [this message]
2010-07-01 11:26 ` [PATCH] Input: ads7846 - do not allow altering platform data Anatolij Gustschin
2010-07-01 16:10 ` Dmitry Torokhov
2010-05-31 19:28 ` [PATCH 1/2] Input: ads7846 - allow specifying irq trigger type in " Anatolij Gustschin
2010-06-25 9:35 ` Anatolij Gustschin
2010-06-28 8:32 ` Dmitry Torokhov
2010-06-29 7:24 ` Anatolij Gustschin
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=20100701132321.5111d872@wker \
--to=agust@denx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=dzu@denx.de \
--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).