summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-02-21 08:03:00 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2014-04-02 15:20:05 +0200
commitfbff978ea77f9d0832cc924e91b2497d7cde572c (patch)
tree1c06da71869442d416dbb0f317b9381bcb118114
parentb4f7fa9f273625ee630199f5c9209ae5d46a4de3 (diff)
input: touchscreen: stmpe-ts: android orientation hackApalis_iMX6_LinuxImageV2.2Beta1_20140404
Rotate touch for now due to missing resistive touch calibration integration. This makes our 7 inch EDT ET070080DH6 panel usable.
-rw-r--r--drivers/input/touchscreen/stmpe-ts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index afb030a89c75..dbd94f3c957a 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -138,8 +138,15 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data)
y = ((data_set[1] & 0xf) << 8) | data_set[2];
z = data_set[3];
+#ifndef CONFIG_ANDROID
input_report_abs(ts->idev, ABS_X, x);
input_report_abs(ts->idev, ABS_Y, y);
+#else /* !CONFIG_ANDROID */
+ /* Hack: rotate touch for now due to missing calibration integration
+ Note: 12-bit touch resolution */
+ input_report_abs(ts->idev, ABS_X, 4096 - x);
+ input_report_abs(ts->idev, ABS_Y, 4096 - y);
+#endif /* !CONFIG_ANDROID */
input_report_abs(ts->idev, ABS_PRESSURE, z);
input_report_key(ts->idev, BTN_TOUCH, (z != 0));
input_sync(ts->idev);