Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192076
b: refs/heads/master
c: 91df77d
h: refs/heads/master
v: v3
  • Loading branch information
Naveen Krishna authored and Ben Dooks committed May 19, 2010
1 parent 5edf726 commit a86cf3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 658ad39ea91d8f0597654032a768930497161a58
refs/heads/master: 91df77d7b550d3c8167c97c6e3b97f2ca4d9f3af
15 changes: 12 additions & 3 deletions trunk/drivers/input/touchscreen/s3c2410_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
S3C2410_ADCTSC_AUTO_PST | \
S3C2410_ADCTSC_XY_PST(0))

#define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */

/* Per-touchscreen data. */

/**
Expand All @@ -69,6 +71,7 @@
* @irq_tc: The interrupt number for pen up/down interrupt
* @count: The number of samples collected.
* @shift: The log2 of the maximum count to read in one go.
* @features: The features supported by the TSADC MOdule.
*/
struct s3c2410ts {
struct s3c_adc_client *client;
Expand All @@ -81,6 +84,7 @@ struct s3c2410ts {
int irq_tc;
int count;
int shift;
int features;
};

static struct s3c2410ts ts;
Expand Down Expand Up @@ -171,6 +175,11 @@ static irqreturn_t stylus_irq(int irq, void *dev_id)
else
dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count);

if (ts.features & FEAT_PEN_IRQ) {
/* Clear pen down/up interrupt */
writel(0x0, ts.io + S3C64XX_ADCCLRINTPNDNUP);
}

return IRQ_HANDLED;
}

Expand Down Expand Up @@ -317,6 +326,7 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev)
ts.input->id.version = 0x0102;

ts.shift = info->oversampling_shift;
ts.features = platform_get_device_id(pdev)->driver_data;

ret = request_irq(ts.irq_tc, stylus_irq, IRQF_DISABLED,
"s3c2410_ts_pen", ts.input);
Expand Down Expand Up @@ -403,15 +413,14 @@ static struct dev_pm_ops s3c_ts_pmops = {
#endif

static struct platform_device_id s3cts_driver_ids[] = {
{ "s3c2410-ts", 0 },
{ "s3c2440-ts", 1 },
{ "s3c64xx-ts", FEAT_PEN_IRQ },
{ }
};
MODULE_DEVICE_TABLE(platform, s3cts_driver_ids);

static struct platform_driver s3c_ts_driver = {
.driver = {
.name = "s3c24xx-ts",
.name = "samsung-ts",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &s3c_ts_pmops,
Expand Down

0 comments on commit a86cf3b

Please sign in to comment.