diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
tree | 3336feaa61324486945816cb52c347733e7c0821 /drivers/input/touchscreen/s3c2410_ts.c | |
parent | 197d4db752e67160d79fed09968c2140376a80a3 (diff) | |
parent | 4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/touchscreen/s3c2410_ts.c')
-rw-r--r-- | drivers/input/touchscreen/s3c2410_ts.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 6386b441ef85..3755a47d053c 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c | |||
@@ -128,27 +128,29 @@ static void touch_timer_fire(unsigned long data) | |||
128 | 128 | ||
129 | down = get_down(data0, data1); | 129 | down = get_down(data0, data1); |
130 | 130 | ||
131 | if (ts.count == (1 << ts.shift)) { | 131 | if (down) { |
132 | ts.xp >>= ts.shift; | 132 | if (ts.count == (1 << ts.shift)) { |
133 | ts.yp >>= ts.shift; | 133 | ts.xp >>= ts.shift; |
134 | ts.yp >>= ts.shift; | ||
134 | 135 | ||
135 | dev_dbg(ts.dev, "%s: X=%lu, Y=%lu, count=%d\n", | 136 | dev_dbg(ts.dev, "%s: X=%lu, Y=%lu, count=%d\n", |
136 | __func__, ts.xp, ts.yp, ts.count); | 137 | __func__, ts.xp, ts.yp, ts.count); |
137 | 138 | ||
138 | input_report_abs(ts.input, ABS_X, ts.xp); | 139 | input_report_abs(ts.input, ABS_X, ts.xp); |
139 | input_report_abs(ts.input, ABS_Y, ts.yp); | 140 | input_report_abs(ts.input, ABS_Y, ts.yp); |
140 | 141 | ||
141 | input_report_key(ts.input, BTN_TOUCH, 1); | 142 | input_report_key(ts.input, BTN_TOUCH, 1); |
142 | input_sync(ts.input); | 143 | input_sync(ts.input); |
143 | 144 | ||
144 | ts.xp = 0; | 145 | ts.xp = 0; |
145 | ts.yp = 0; | 146 | ts.yp = 0; |
146 | ts.count = 0; | 147 | ts.count = 0; |
147 | } | 148 | } |
148 | 149 | ||
149 | if (down) { | ||
150 | s3c_adc_start(ts.client, 0, 1 << ts.shift); | 150 | s3c_adc_start(ts.client, 0, 1 << ts.shift); |
151 | } else { | 151 | } else { |
152 | ts.xp = 0; | ||
153 | ts.yp = 0; | ||
152 | ts.count = 0; | 154 | ts.count = 0; |
153 | 155 | ||
154 | input_report_key(ts.input, BTN_TOUCH, 0); | 156 | input_report_key(ts.input, BTN_TOUCH, 0); |
@@ -401,6 +403,7 @@ static int s3c2410ts_resume(struct device *dev) | |||
401 | struct s3c2410_ts_mach_info *info = pdev->dev.platform_data; | 403 | struct s3c2410_ts_mach_info *info = pdev->dev.platform_data; |
402 | 404 | ||
403 | clk_enable(ts.clock); | 405 | clk_enable(ts.clock); |
406 | enable_irq(ts.irq_tc); | ||
404 | 407 | ||
405 | /* Initialise registers */ | 408 | /* Initialise registers */ |
406 | if ((info->delay & 0xffff) > 0) | 409 | if ((info->delay & 0xffff) > 0) |