diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2011-11-24 13:16:50 +0530 |
---|---|---|
committer | Angus Ainslie <angus.ainslie@linaro.org> | 2011-11-24 07:48:23 -0700 |
commit | 035a0a58ec51928b99dd5e8eeb9c7351899dc5f0 (patch) | |
tree | 4d3a7178899aa9bb3b818e6ce41536a90cf6d960 | |
parent | 18d1cda3e43f4858b5887a0dae431d4775b7c307 (diff) |
Touch: Added support to enable touch on Android ICSandroid-release-2011-11.2
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
-rw-r--r-- | drivers/input/touchscreen/unidisplay_ts.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/unidisplay_ts.c b/drivers/input/touchscreen/unidisplay_ts.c index 0b4aa519adc9..d9c84be9f265 100644 --- a/drivers/input/touchscreen/unidisplay_ts.c +++ b/drivers/input/touchscreen/unidisplay_ts.c @@ -33,11 +33,13 @@ #define DEBUG_PRINT(fmt, args...) #endif -#define INPUT_REPORT(x, y, p) \ +#define INPUT_REPORT(x, y, p, val1, val2) \ { \ input_report_abs(tsdata->input, ABS_MT_POSITION_X, x); \ input_report_abs(tsdata->input, ABS_MT_POSITION_Y, y); \ input_report_abs(tsdata->input, ABS_MT_TOUCH_MAJOR, p); \ + input_report_abs(tsdata->input, ABS_PRESSURE, val1); \ + input_report_key(tsdata->input, BTN_TOUCH, val2); \ input_mt_sync(tsdata->input); \ } @@ -171,7 +173,7 @@ static int unidisplay_ts_thread(void *kthread) y1 = buf[4]; y1 <<= 8; y1 |= buf[3]; - INPUT_REPORT(x1, y1, 1); + INPUT_REPORT(x1, y1, 1, 255, 1); } if (type & 0x2) { x1 = buf[6]; @@ -180,13 +182,13 @@ static int unidisplay_ts_thread(void *kthread) y1 = buf[8]; y1 <<= 8; y1 |= buf[7]; - INPUT_REPORT(x1, y1, 2); + INPUT_REPORT(x1, y1, 2, 255, 1); } input_sync(tsdata->input); timeout = msecs_to_jiffies(20); } else { - INPUT_REPORT(0, 0, 0); - INPUT_REPORT(0, 0, 0); + INPUT_REPORT(0, 0, 0, 0 ,0); + INPUT_REPORT(0, 0, 0, 0, 0); input_sync(tsdata->input); timeout = MAX_SCHEDULE_TIMEOUT; } |