From 36113b0e5262bba23c10599858096e08f1c54110 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 21 Feb 2013 08:03:00 +0100 Subject: 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. --- drivers/input/touchscreen/stmpe-ts.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') 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); -- cgit v1.2.3