diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2016-01-25 14:35:16 -0800 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 09:55:28 +0100 |
commit | 7c31decdf4965604791d5d066a3eef044bf37de6 (patch) | |
tree | 3888e78d2f9dbb1b29a619ca395a85b5a07f5840 /drivers | |
parent | baf5ea9d5b80694cedb52cb22ce6f443e02340b9 (diff) |
input: touchscreen: ad7879: fix default x/y axis assignment
The measurements read from the controller which are temporarly stored
in conversion_data, are interpreted wrong. The first measurement X+
contains the Y position, and the second measurement Y+ the X position
(see also Table 11 Register Table in the data sheet).
The problem is already known, the change 6680884a4420 ("Input: ad7879
- add option to correct xy axis") introduced a swap option. However,
the meaning of this boolean was inverted since the underlaying values
were already swapped. With this change, swap_xy = true actually swaps
the two axis.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/ad7879.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index fce590677b7b..6dee810c8304 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c @@ -94,8 +94,8 @@ #define AD7879_TEMP_BIT (1<<1) enum { - AD7879_SEQ_XPOS = 0, - AD7879_SEQ_YPOS = 1, + AD7879_SEQ_YPOS = 0, + AD7879_SEQ_XPOS = 1, AD7879_SEQ_Z1 = 2, AD7879_SEQ_Z2 = 3, AD7879_NR_SENSE = 4, |