Skip to content

Commit d5043aa

Browse files
6by9popcornmix
authored andcommitted
dtoverlays: Add invx and invy overrides to ads7846 touch overlay
It had swapxy, but no way to trigger the X and Y inversions Also use the generic "touchscreen-swapped-x-y" for swapxy instead of the TI specific "ti,swap-xy". Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent e9946b3 commit d5043aa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,8 @@ Params: cs SPI bus Chip Select (default 1)
602602
pmax Maximum reported pressure value (default 65535)
603603
xohms Touchpanel sensitivity (X-plate resistance)
604604
(default 400)
605+
invx Invert x axis
606+
invy Invert y axis
605607

606608
penirq is required and usually xohms (60-100) has to be set as well.
607609
Apart from that, pmax (255) and swapxy are also common.

arch/arm/boot/dts/overlays/ads7846-overlay.dts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@
7777
<&ads7846>,"interrupts:0",
7878
<&ads7846>,"pendown-gpio:4";
7979
penirq_pull = <&ads7846_pins>,"brcm,pull:0";
80-
swapxy = <&ads7846>,"ti,swap-xy?";
80+
swapxy = <&ads7846>,"touchscreen-swapped-x-y?";
8181
xmin = <&ads7846>,"ti,x-min;0";
8282
ymin = <&ads7846>,"ti,y-min;0";
8383
xmax = <&ads7846>,"ti,x-max;0";
8484
ymax = <&ads7846>,"ti,y-max;0";
8585
pmin = <&ads7846>,"ti,pressure-min;0";
8686
pmax = <&ads7846>,"ti,pressure-max;0";
8787
xohms = <&ads7846>,"ti,x-plate-ohms;0";
88+
invx = <&ads7846>,"touchscreen-inverted-x?";
89+
invy = <&ads7846>,"touchscreen-inverted-y?";
8890
};
8991
};

0 commit comments

Comments
 (0)