summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-02-21 08:03:00 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-02-21 08:03:00 +0100
commit36113b0e5262bba23c10599858096e08f1c54110 (patch)
tree676df5658050da24d526a9c0c56dfa2f0bb51286 /drivers
parentfa236141e8debca1b6f4dabca2481427a57cef31 (diff)
input: touchscreen: stmpe-ts: android orientation hack
Rotate touch for now due to missing resistive touch calibration integration. This makes our 7 inch EDT ET070080DH6 panel usable.
Diffstat (limited to 'drivers')
-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 5ee159a3df5b..502c267255b3 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -149,8 +149,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);