aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 0ff8463..7d0a87f 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -223,6 +223,9 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
if (rt <= ts->max_rt) {
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;
+
dev_dbg(&ts->client->dev,
"DOWN point(%4d,%4d), pressure (%4u)\n",
tc.x, tc.y, rt);