From: "Patil, Rachna" <rachna@ti.com> To: <linux-kernel@vger.kernel.org>, <linux-input@vger.kernel.org>, <linux-iio@vger.kernel.org> Cc: Samuel Ortiz <sameo@linux.intel.com>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Dmitry Torokhov <dtor@mail.ru>, Jonathan Cameron <jic23@cam.ac.uk>, "Patil, Rachna" <rachna@ti.com> Subject: [PATCH RESEND 3/8] input: TSC: ti_tscadc: set FIFO0 threshold Interrupt Date: Tue, 16 Oct 2012 12:55:40 +0530 [thread overview] Message-ID: <1350372345-27108-4-git-send-email-rachna@ti.com> (raw) In-Reply-To: <1350372345-27108-1-git-send-email-rachna@ti.com> Code currently uses FIFO1 threshold interrupt. since this is a MFD, Dedicating FIFO0 to touchscreen and making way for other devices to use FIFO1 as well. The FIFO can be shared between 2 devices but since the interrupt used is threshold interrupt on FIFO1, we would end up having wrong interrupts. Hence changing the same. Signed-off-by: Patil, Rachna <rachna@ti.com> --- drivers/input/touchscreen/ti_tscadc.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c index c1bd8e5..2cc19b0 100644 --- a/drivers/input/touchscreen/ti_tscadc.c +++ b/drivers/input/touchscreen/ti_tscadc.c @@ -42,6 +42,7 @@ #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) #define REG_FIFO0CNT 0xE4 +#define REG_FIFO0THR 0xE8 #define REG_FIFO1THR 0xF4 #define REG_FIFO0 0x100 #define REG_FIFO1 0x200 @@ -55,6 +56,7 @@ #define STPENB_STEPENB STEPENB(0x7FFF) /* IRQ enable */ +#define IRQENB_FIFO0THRES BIT(2) #define IRQENB_FIFO1THRES BIT(5) #define IRQENB_PENUP BIT(9) @@ -277,7 +279,7 @@ static irqreturn_t tscadc_irq(int irq, void *dev) unsigned int fsm; status = tscadc_readl(ts_dev, REG_IRQSTATUS); - if (status & IRQENB_FIFO1THRES) { + if (status & IRQENB_FIFO0THRES) { tscadc_read_coordinates(ts_dev, &x, &y); z1 = tscadc_readl(ts_dev, REG_FIFO0) & 0xfff; @@ -303,7 +305,7 @@ static irqreturn_t tscadc_irq(int irq, void *dev) input_sync(input_dev); } } - irqclr |= IRQENB_FIFO1THRES; + irqclr |= IRQENB_FIFO0THRES; } /* @@ -446,9 +448,9 @@ static int __devinit tscadc_probe(struct platform_device *pdev) tscadc_writel(ts_dev, REG_CTRL, ctrl); tscadc_idle_config(ts_dev); - tscadc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO1THRES); + tscadc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES); tscadc_step_config(ts_dev); - tscadc_writel(ts_dev, REG_FIFO1THR, ts_dev->steps_to_configure); + tscadc_writel(ts_dev, REG_FIFO0THR, ts_dev->steps_to_configure); ctrl |= CNTRLREG_TSCSSENB; tscadc_writel(ts_dev, REG_CTRL, ctrl); -- 1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: "Patil, Rachna" <rachna-l0cyMroinI0@public.gmane.org> To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>, Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Dmitry Torokhov <dtor-JGs/UdohzUI@public.gmane.org>, Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>, "Patil, Rachna" <rachna-l0cyMroinI0@public.gmane.org> Subject: [PATCH RESEND 3/8] input: TSC: ti_tscadc: set FIFO0 threshold Interrupt Date: Tue, 16 Oct 2012 12:55:40 +0530 [thread overview] Message-ID: <1350372345-27108-4-git-send-email-rachna@ti.com> (raw) In-Reply-To: <1350372345-27108-1-git-send-email-rachna-l0cyMroinI0@public.gmane.org> Code currently uses FIFO1 threshold interrupt. since this is a MFD, Dedicating FIFO0 to touchscreen and making way for other devices to use FIFO1 as well. The FIFO can be shared between 2 devices but since the interrupt used is threshold interrupt on FIFO1, we would end up having wrong interrupts. Hence changing the same. Signed-off-by: Patil, Rachna <rachna-l0cyMroinI0@public.gmane.org> --- drivers/input/touchscreen/ti_tscadc.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c index c1bd8e5..2cc19b0 100644 --- a/drivers/input/touchscreen/ti_tscadc.c +++ b/drivers/input/touchscreen/ti_tscadc.c @@ -42,6 +42,7 @@ #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) #define REG_FIFO0CNT 0xE4 +#define REG_FIFO0THR 0xE8 #define REG_FIFO1THR 0xF4 #define REG_FIFO0 0x100 #define REG_FIFO1 0x200 @@ -55,6 +56,7 @@ #define STPENB_STEPENB STEPENB(0x7FFF) /* IRQ enable */ +#define IRQENB_FIFO0THRES BIT(2) #define IRQENB_FIFO1THRES BIT(5) #define IRQENB_PENUP BIT(9) @@ -277,7 +279,7 @@ static irqreturn_t tscadc_irq(int irq, void *dev) unsigned int fsm; status = tscadc_readl(ts_dev, REG_IRQSTATUS); - if (status & IRQENB_FIFO1THRES) { + if (status & IRQENB_FIFO0THRES) { tscadc_read_coordinates(ts_dev, &x, &y); z1 = tscadc_readl(ts_dev, REG_FIFO0) & 0xfff; @@ -303,7 +305,7 @@ static irqreturn_t tscadc_irq(int irq, void *dev) input_sync(input_dev); } } - irqclr |= IRQENB_FIFO1THRES; + irqclr |= IRQENB_FIFO0THRES; } /* @@ -446,9 +448,9 @@ static int __devinit tscadc_probe(struct platform_device *pdev) tscadc_writel(ts_dev, REG_CTRL, ctrl); tscadc_idle_config(ts_dev); - tscadc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO1THRES); + tscadc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES); tscadc_step_config(ts_dev); - tscadc_writel(ts_dev, REG_FIFO1THR, ts_dev->steps_to_configure); + tscadc_writel(ts_dev, REG_FIFO0THR, ts_dev->steps_to_configure); ctrl |= CNTRLREG_TSCSSENB; tscadc_writel(ts_dev, REG_CTRL, ctrl); -- 1.7.0.4
next prev parent reply other threads:[~2012-10-16 7:42 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-16 7:25 [PATCH RESEND 0/8] TI Touchscreen driver updates and Support for TSC/ADC MFD driver Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 1/8] input: TSC: ti_tscadc: Correct register usage Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 2/8] input: TSC: ti_tscadc: Add Step configuration as platform data Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna [this message] 2012-10-16 7:25 ` [PATCH RESEND 3/8] input: TSC: ti_tscadc: set FIFO0 threshold Interrupt Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 4/8] input: TSC: ti_tscadc: Remove definition of End Of Interrupt register Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 5/8] input: TSC: ti_tscadc: Rename the existing touchscreen driver Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 6/8] MFD: ti_tscadc: Add support for TI's TSC/ADC MFDevice Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 7/8] input: TSC: ti_tsc: Convert TSC into a MFDevice Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 7:25 ` [PATCH RESEND 8/8] IIO : ADC: tiadc: Add support of TI's ADC driver Patil, Rachna 2012-10-16 7:25 ` Patil, Rachna 2012-10-16 17:42 ` [PATCH RESEND 0/8] TI Touchscreen driver updates and Support for TSC/ADC MFD driver Dmitry Torokhov 2012-10-17 6:11 ` Patil, Rachna 2012-10-29 7:13 ` Patil, Rachna 2012-10-29 7:13 ` Patil, Rachna 2012-10-22 10:46 ` Patil, Rachna 2012-11-05 22:55 ` Samuel Ortiz 2012-11-05 22:55 ` Samuel Ortiz 2012-11-06 4:47 ` Patil, Rachna 2012-11-06 4:47 ` Patil, Rachna
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=1350372345-27108-4-git-send-email-rachna@ti.com \ --to=rachna@ti.com \ --cc=dmitry.torokhov@gmail.com \ --cc=dtor@mail.ru \ --cc=jic23@cam.ac.uk \ --cc=linux-iio@vger.kernel.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sameo@linux.intel.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: linkBe 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.