diff options
author | Patil, Rachna <rachna@ti.com> | 2012-10-16 03:25:40 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-05 17:50:26 -0500 |
commit | 30af55f930c2f69d8f3dcd658fb3ee352ebc54c1 (patch) | |
tree | a89a1ee8ee49addf94187f7a5b9da9420bf516bd /drivers | |
parent | d1fb57435c108b8dd66d7f47b4c60c1798dcae4c (diff) |
input: TSC: ti_tscadc: set FIFO0 threshold Interrupt
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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 c1bd8e5c132c..2cc19b09e31c 100644 --- a/drivers/input/touchscreen/ti_tscadc.c +++ b/drivers/input/touchscreen/ti_tscadc.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) | 42 | #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) |
43 | #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) | 43 | #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) |
44 | #define REG_FIFO0CNT 0xE4 | 44 | #define REG_FIFO0CNT 0xE4 |
45 | #define REG_FIFO0THR 0xE8 | ||
45 | #define REG_FIFO1THR 0xF4 | 46 | #define REG_FIFO1THR 0xF4 |
46 | #define REG_FIFO0 0x100 | 47 | #define REG_FIFO0 0x100 |
47 | #define REG_FIFO1 0x200 | 48 | #define REG_FIFO1 0x200 |
@@ -55,6 +56,7 @@ | |||
55 | #define STPENB_STEPENB STEPENB(0x7FFF) | 56 | #define STPENB_STEPENB STEPENB(0x7FFF) |
56 | 57 | ||
57 | /* IRQ enable */ | 58 | /* IRQ enable */ |
59 | #define IRQENB_FIFO0THRES BIT(2) | ||
58 | #define IRQENB_FIFO1THRES BIT(5) | 60 | #define IRQENB_FIFO1THRES BIT(5) |
59 | #define IRQENB_PENUP BIT(9) | 61 | #define IRQENB_PENUP BIT(9) |
60 | 62 | ||
@@ -277,7 +279,7 @@ static irqreturn_t tscadc_irq(int irq, void *dev) | |||
277 | unsigned int fsm; | 279 | unsigned int fsm; |
278 | 280 | ||
279 | status = tscadc_readl(ts_dev, REG_IRQSTATUS); | 281 | status = tscadc_readl(ts_dev, REG_IRQSTATUS); |
280 | if (status & IRQENB_FIFO1THRES) { | 282 | if (status & IRQENB_FIFO0THRES) { |
281 | tscadc_read_coordinates(ts_dev, &x, &y); | 283 | tscadc_read_coordinates(ts_dev, &x, &y); |
282 | 284 | ||
283 | z1 = tscadc_readl(ts_dev, REG_FIFO0) & 0xfff; | 285 | z1 = tscadc_readl(ts_dev, REG_FIFO0) & 0xfff; |
@@ -303,7 +305,7 @@ static irqreturn_t tscadc_irq(int irq, void *dev) | |||
303 | input_sync(input_dev); | 305 | input_sync(input_dev); |
304 | } | 306 | } |
305 | } | 307 | } |
306 | irqclr |= IRQENB_FIFO1THRES; | 308 | irqclr |= IRQENB_FIFO0THRES; |
307 | } | 309 | } |
308 | 310 | ||
309 | /* | 311 | /* |
@@ -446,9 +448,9 @@ static int __devinit tscadc_probe(struct platform_device *pdev) | |||
446 | tscadc_writel(ts_dev, REG_CTRL, ctrl); | 448 | tscadc_writel(ts_dev, REG_CTRL, ctrl); |
447 | 449 | ||
448 | tscadc_idle_config(ts_dev); | 450 | tscadc_idle_config(ts_dev); |
449 | tscadc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO1THRES); | 451 | tscadc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES); |
450 | tscadc_step_config(ts_dev); | 452 | tscadc_step_config(ts_dev); |
451 | tscadc_writel(ts_dev, REG_FIFO1THR, ts_dev->steps_to_configure); | 453 | tscadc_writel(ts_dev, REG_FIFO0THR, ts_dev->steps_to_configure); |
452 | 454 | ||
453 | ctrl |= CNTRLREG_TSCSSENB; | 455 | ctrl |= CNTRLREG_TSCSSENB; |
454 | tscadc_writel(ts_dev, REG_CTRL, ctrl); | 456 | tscadc_writel(ts_dev, REG_CTRL, ctrl); |