From: "Patil, Rachna" <rachna@ti.com>
To: linux-input@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Dmitry Torokhov <dtor@mail.ru>, "Patil, Rachna" <rachna@ti.com>
Subject: [PATCH 3/4] input: TSC: ti_tscadc: set FIFO0 threshold Interrupt
Date: Wed, 22 Aug 2012 16:49:25 +0530 [thread overview]
Message-ID: <1345634365-29893-1-git-send-email-rachna@ti.com> (raw)
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.1
reply other threads:[~2012-08-22 11:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1345634365-29893-1-git-send-email-rachna@ti.com \
--to=rachna@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dtor@mail.ru \
--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).