aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/s3c2410_ts.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 86086a42d5e3..e0b7c834111d 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -55,6 +55,8 @@
55 S3C2410_ADCTSC_AUTO_PST | \ 55 S3C2410_ADCTSC_AUTO_PST | \
56 S3C2410_ADCTSC_XY_PST(0)) 56 S3C2410_ADCTSC_XY_PST(0))
57 57
58#define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */
59
58/* Per-touchscreen data. */ 60/* Per-touchscreen data. */
59 61
60/** 62/**
@@ -69,6 +71,7 @@
69 * @irq_tc: The interrupt number for pen up/down interrupt 71 * @irq_tc: The interrupt number for pen up/down interrupt
70 * @count: The number of samples collected. 72 * @count: The number of samples collected.
71 * @shift: The log2 of the maximum count to read in one go. 73 * @shift: The log2 of the maximum count to read in one go.
74 * @features: The features supported by the TSADC MOdule.
72 */ 75 */
73struct s3c2410ts { 76struct s3c2410ts {
74 struct s3c_adc_client *client; 77 struct s3c_adc_client *client;
@@ -81,6 +84,7 @@ struct s3c2410ts {
81 int irq_tc; 84 int irq_tc;
82 int count; 85 int count;
83 int shift; 86 int shift;
87 int features;
84}; 88};
85 89
86static struct s3c2410ts ts; 90static struct s3c2410ts ts;
@@ -171,6 +175,11 @@ static irqreturn_t stylus_irq(int irq, void *dev_id)
171 else 175 else
172 dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count); 176 dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count);
173 177
178 if (ts.features & FEAT_PEN_IRQ) {
179 /* Clear pen down/up interrupt */
180 writel(0x0, ts.io + S3C64XX_ADCCLRINTPNDNUP);
181 }
182
174 return IRQ_HANDLED; 183 return IRQ_HANDLED;
175} 184}
176 185
@@ -317,6 +326,7 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev)
317 ts.input->id.version = 0x0102; 326 ts.input->id.version = 0x0102;
318 327
319 ts.shift = info->oversampling_shift; 328 ts.shift = info->oversampling_shift;
329 ts.features = platform_get_device_id(pdev)->driver_data;
320 330
321 ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED, 331 ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED,
322 "s3c2410_ts_pen", ts.input); 332 "s3c2410_ts_pen", ts.input);
@@ -403,15 +413,14 @@ static struct dev_pm_ops s3c_ts_pmops = {
403#endif 413#endif
404 414
405static struct platform_device_id s3cts_driver_ids[] = { 415static struct platform_device_id s3cts_driver_ids[] = {
406 { "s3c2410-ts", 0 }, 416 { "s3c64xx-ts", FEAT_PEN_IRQ },
407 { "s3c2440-ts", 1 },
408 { } 417 { }
409}; 418};
410MODULE_DEVICE_TABLE(platform, s3cts_driver_ids); 419MODULE_DEVICE_TABLE(platform, s3cts_driver_ids);
411 420
412static struct platform_driver s3c_ts_driver = { 421static struct platform_driver s3c_ts_driver = {
413 .driver = { 422 .driver = {
414 .name = "s3c24xx-ts", 423 .name = "samsung-ts",
415 .owner = THIS_MODULE, 424 .owner = THIS_MODULE,
416#ifdef CONFIG_PM 425#ifdef CONFIG_PM
417 .pm = &s3c_ts_pmops, 426 .pm = &s3c_ts_pmops,