From 704a6aed9d13aa5ac0ea30cc0e5b9db48bfdf751 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sun, 24 Mar 2013 00:44:46 +0100 Subject: 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. --- drivers/input/touchscreen/wm97xx-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/input/touchscreen') 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); -- cgit v1.2.3