summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-03-24 00:44:46 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-03-24 00:44:46 +0100
commit704a6aed9d13aa5ac0ea30cc0e5b9db48bfdf751 (patch)
tree72316f972209e5dcc9498d74dc83fa19e4efb246 /drivers/input/touchscreen
parent3111b4ef1e8ac6f1dda92b74b2a46191b498bb1d (diff)
input: touchscreen: wm97xx-core: android orientation hack
Rotate touch for now due to missing resistive touch calibration integration. This makes our 5.7 inch EDT ET057090DHU panel usable.
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/wm97xx-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index 2cca5b5e0b1a..9a1e3d582600 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -446,8 +446,18 @@ static int wm97xx_read_samples(struct wm97xx *wm)
"pen down: x=%x:%d, y=%x:%d, pressure=%x:%d\n",
data.x >> 12, data.x & 0xfff, data.y >> 12,
data.y & 0xfff, data.p >> 12, data.p & 0xfff);
+#ifndef CONFIG_ANDROID
input_report_abs(wm->input_dev, ABS_X, data.x & 0xfff);
input_report_abs(wm->input_dev, ABS_Y, data.y & 0xfff);
+#else /* !CONFIG_ANDROID */
+ /* Hack: rotate touch for now due to missing calibration
+ integration
+ Note: 12-bit touch resolution */
+ input_report_abs(wm->input_dev, ABS_X, 4096 - (data.x & 0xfff));
+ input_report_abs(wm->input_dev, ABS_Y, 4096 - (data.y & 0xfff));
+#endif /* !CONFIG_ANDROID */
+
+
input_report_abs(wm->input_dev, ABS_PRESSURE, data.p & 0xfff);
input_report_key(wm->input_dev, BTN_TOUCH, 1);
input_sync(wm->input_dev);