From: Jonathan Cameron <jic23@kernel.org>
To: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Cc: jic23@cam.ac.uk, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
gregkh@linuxfoundation.org, Russ.Dill@ti.com,
Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 1/2] input: ti_tsc: Enable shared IRQ for TSC
Date: Sun, 04 Aug 2013 12:08:11 +0100 [thread overview]
Message-ID: <51FE361B.5030900@kernel.org> (raw)
In-Reply-To: <1374882674-18403-2-git-send-email-zubair.lutfullah@gmail.com>
On 07/27/13 00:51, Zubair Lutfullah wrote:
> From: "Patil, Rachna" <rachna@ti.com>
>
> Touchscreen and ADC share the same IRQ line from parent MFD core.
> Previously only Touchscreen was interrupt based.
> With continuous mode support added in ADC driver, driver requires
> interrupt to process the ADC samples, so enable shared IRQ flag bit for
> touchscreen.
>
> Signed-off-by: Patil, Rachna <rachna@ti.com>
> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I'd rather this went via input independent of the other patch
(if not there all that will happen is one or other driver will
fail to probe if both are attempted?)
Can take it through IIO but only with a Dmitry Ack.
> ---
> drivers/input/touchscreen/ti_am335x_tsc.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
> index e1c5300..68d1250 100644
> --- a/drivers/input/touchscreen/ti_am335x_tsc.c
> +++ b/drivers/input/touchscreen/ti_am335x_tsc.c
> @@ -260,8 +260,18 @@ static irqreturn_t titsc_irq(int irq, void *dev)
> unsigned int fsm;
>
> status = titsc_readl(ts_dev, REG_IRQSTATUS);
> - if (status & IRQENB_FIFO0THRES) {
> -
> + /*
> + * ADC and touchscreen share the IRQ line.
> + * FIFO1 threshold, FIFO1 Overrun and FIFO1 underflow
> + * interrupts are used by ADC,
> + * hence return from touchscreen IRQ handler if FIFO1
> + * related interrupts occurred.
> + */
> + if ((status & IRQENB_FIFO1THRES) ||
> + (status & IRQENB_FIFO1OVRRUN) ||
> + (status & IRQENB_FIFO1UNDRFLW))
> + return IRQ_NONE;
> + else if (status & IRQENB_FIFO0THRES) {
> titsc_read_coordinates(ts_dev, &x, &y, &z1, &z2);
>
> if (ts_dev->pen_down && z1 != 0 && z2 != 0) {
> @@ -315,7 +325,7 @@ static irqreturn_t titsc_irq(int irq, void *dev)
> }
>
> if (irqclr) {
> - titsc_writel(ts_dev, REG_IRQSTATUS, irqclr);
> + titsc_writel(ts_dev, REG_IRQSTATUS, (status | irqclr));
> am335x_tsc_se_update(ts_dev->mfd_tscadc);
> return IRQ_HANDLED;
> }
> @@ -389,7 +399,7 @@ static int titsc_probe(struct platform_device *pdev)
> }
>
> err = request_irq(ts_dev->irq, titsc_irq,
> - 0, pdev->dev.driver->name, ts_dev);
> + IRQF_SHARED, pdev->dev.driver->name, ts_dev);
> if (err) {
> dev_err(&pdev->dev, "failed to allocate irq.\n");
> goto err_free_mem;
>
next prev parent reply other threads:[~2013-08-04 10:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 23:51 [PATCH 0/2] iio: input: ti_am335x_adc: Add continuous sampling and trigger support round 3 Zubair Lutfullah
[not found] ` <1374882674-18403-1-git-send-email-zubair.lutfullah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-26 23:51 ` [PATCH 1/2] input: ti_tsc: Enable shared IRQ for TSC Zubair Lutfullah
2013-08-04 11:08 ` Jonathan Cameron [this message]
2013-08-05 16:12 ` Dmitry Torokhov
[not found] ` <20130805161256.GA8794-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2013-08-05 17:02 ` Zubair Lutfullah :
2013-08-05 17:40 ` Dmitry Torokhov
[not found] ` <20130805174031.GA20093-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2013-08-05 19:21 ` Zubair Lutfullah :
2013-08-05 22:42 ` Russ Dill
2013-07-26 23:51 ` [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling and trigger support Zubair Lutfullah
[not found] ` <1374882674-18403-3-git-send-email-zubair.lutfullah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-08-04 11:05 ` Jonathan Cameron
[not found] ` <51FE357C.2040401-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-08-04 13:11 ` Zubair Lutfullah :
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=51FE361B.5030900@kernel.org \
--to=jic23@kernel.org \
--cc=Russ.Dill@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zubair.lutfullah@gmail.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).