1 From c895cecf59190b45b8cfe3ad3f8edf3a7267c7f0 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 12 Mar 2024 16:10:37 +0000
4 Subject: [PATCH 0964/1085] dtoverlays: Fixup pendown gpio polarity for ads7846
7 The driver has been converted to use gpiod, which will normalise
10 The piscreen overlay (and others) incorrectly defines the pendown
11 GPIO as being ACTIVE_HIGH (0), althought triggering on the high-low
12 edge for pen down. It therefore tries reading the pen position when
13 not being touched, and stops when it is touched.
15 Tested with piscreen and ads7846 overlays. Also fixed on others
16 where the interrupt says high->low but the polarity was ACTIVE_HIGH.
18 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
20 arch/arm/boot/dts/overlays/ads7846-overlay.dts | 2 +-
21 arch/arm/boot/dts/overlays/hy28a-overlay.dts | 2 +-
22 arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts | 2 +-
23 arch/arm/boot/dts/overlays/hy28b-overlay.dts | 2 +-
24 arch/arm/boot/dts/overlays/mz61581-overlay.dts | 2 +-
25 arch/arm/boot/dts/overlays/piscreen-overlay.dts | 2 +-
26 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts | 2 +-
27 arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 2 +-
28 8 files changed, 8 insertions(+), 8 deletions(-)
30 --- a/arch/arm/boot/dts/overlays/ads7846-overlay.dts
31 +++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts
33 spi-max-frequency = <2000000>;
34 interrupts = <255 2>; /* high-to-low edge triggered */
35 interrupt-parent = <&gpio>;
36 - pendown-gpio = <&gpio 255 0>;
37 + pendown-gpio = <&gpio 255 1>;
40 ti,x-min = /bits/ 16 <0>;
41 --- a/arch/arm/boot/dts/overlays/hy28a-overlay.dts
42 +++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts
44 spi-max-frequency = <2000000>;
45 interrupts = <17 2>; /* high-to-low edge triggered */
46 interrupt-parent = <&gpio>;
47 - pendown-gpio = <&gpio 17 0>;
48 + pendown-gpio = <&gpio 17 1>;
49 ti,x-plate-ohms = /bits/ 16 <100>;
50 ti,pressure-max = /bits/ 16 <255>;
52 --- a/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
53 +++ b/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
55 spi-max-frequency = <2000000>;
56 interrupts = <17 2>; /* high-to-low edge triggered */
57 interrupt-parent = <&gpio>;
58 - pendown-gpio = <&gpio 17 0>;
59 + pendown-gpio = <&gpio 17 1>;
60 ti,x-plate-ohms = /bits/ 16 <100>;
61 ti,pressure-max = /bits/ 16 <255>;
63 --- a/arch/arm/boot/dts/overlays/hy28b-overlay.dts
64 +++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts
66 spi-max-frequency = <2000000>;
67 interrupts = <17 2>; /* high-to-low edge triggered */
68 interrupt-parent = <&gpio>;
69 - pendown-gpio = <&gpio 17 0>;
70 + pendown-gpio = <&gpio 17 1>;
71 ti,x-plate-ohms = /bits/ 16 <100>;
72 ti,pressure-max = /bits/ 16 <255>;
74 --- a/arch/arm/boot/dts/overlays/mz61581-overlay.dts
75 +++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts
77 spi-max-frequency = <2000000>;
78 interrupts = <4 2>; /* high-to-low edge triggered */
79 interrupt-parent = <&gpio>;
80 - pendown-gpio = <&gpio 4 0>;
81 + pendown-gpio = <&gpio 4 1>;
83 ti,x-plate-ohms = /bits/ 16 <60>;
84 ti,pressure-max = /bits/ 16 <255>;
85 --- a/arch/arm/boot/dts/overlays/piscreen-overlay.dts
86 +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts
88 spi-max-frequency = <2000000>;
89 interrupts = <17 2>; /* high-to-low edge triggered */
90 interrupt-parent = <&gpio>;
91 - pendown-gpio = <&gpio 17 0>;
92 + pendown-gpio = <&gpio 17 GPIO_ACTIVE_LOW>;
94 ti,x-plate-ohms = /bits/ 16 <100>;
95 ti,pressure-max = /bits/ 16 <255>;
96 --- a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
97 +++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
99 spi-max-frequency = <2000000>;
100 interrupts = <17 2>; /* high-to-low edge triggered */
101 interrupt-parent = <&gpio>;
102 - pendown-gpio = <&gpio 17 0>;
103 + pendown-gpio = <&gpio 17 1>;
105 ti,x-plate-ohms = /bits/ 16 <100>;
106 ti,pressure-max = /bits/ 16 <255>;
107 --- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
108 +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
110 spi-max-frequency = <2000000>;
111 interrupts = <5 2>; /* high-to-low edge triggered */
112 interrupt-parent = <&gpio>;
113 - pendown-gpio = <&gpio 5 0>;
114 + pendown-gpio = <&gpio 5 1>;
115 ti,x-plate-ohms = /bits/ 16 <100>;
116 ti,pressure-max = /bits/ 16 <255>;