aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulK <contact@paulk.fr>2012-04-16 15:58:07 +0200
committerPaul Kocialkowski <contact@paulk.fr>2013-05-04 23:11:55 +0200
commitb5624efb5962a0d95ca27a5ae0b9803e1dc93584 (patch)
tree8c2ddc40cb1167fad137b2de1ce5e2c357275d6f
parentcdb702f935c742495bbabc725d1f983546ed5810 (diff)
downloadkernel_goldelico_gta04-b5624efb5962a0d95ca27a5ae0b9803e1dc93584.zip
kernel_goldelico_gta04-b5624efb5962a0d95ca27a5ae0b9803e1dc93584.tar.gz
kernel_goldelico_gta04-b5624efb5962a0d95ca27a5ae0b9803e1dc93584.tar.bz2
TSC2007: Inverted Y axis to have min Y matching screen top
-rw-r--r--drivers/input/touchscreen/tsc2007.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c
index ca9b6f3..ca4979c 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -238,6 +238,9 @@ static void tsc2007_work(struct work_struct *work)
tsc2007_range_values(ts, &tc, &rt);
+ /* Invert Y to have ts->min_y to match the top. */
+ tc.y = (ts->max_y - tc.y) + ts->min_y;
+
input_report_abs(input, ABS_X, tc.x);
input_report_abs(input, ABS_Y, tc.y);
input_report_abs(input, ABS_PRESSURE, rt);