Skip to content

Commit dfeb977

Browse files
committed
dtoverlays: Fixup pendown gpio polarity for ads7846 users
The driver has been converted to use gpiod, which will normalise polarity based on DT. The piscreen overlay (and others) incorrectly defines the pendown GPIO as being ACTIVE_HIGH (0), althought triggering on the high-low edge for pen down. It therefore tries reading the pen position when not being touched, and stops when it is touched. Tested with piscreen and ads7846 overlays. Also fixed on others where the interrupt says high->low but the polarity was ACTIVE_HIGH. Signed-off-by: Dave Stevenson <[email protected]>
1 parent 13c3fb1 commit dfeb977

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
spi-max-frequency = <2000000>;
5858
interrupts = <255 2>; /* high-to-low edge triggered */
5959
interrupt-parent = <&gpio>;
60-
pendown-gpio = <&gpio 255 0>;
60+
pendown-gpio = <&gpio 255 1>;
6161

6262
/* driver defaults */
6363
ti,x-min = /bits/ 16 <0>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
spi-max-frequency = <2000000>;
7474
interrupts = <17 2>; /* high-to-low edge triggered */
7575
interrupt-parent = <&gpio>;
76-
pendown-gpio = <&gpio 17 0>;
76+
pendown-gpio = <&gpio 17 1>;
7777
ti,x-plate-ohms = /bits/ 16 <100>;
7878
ti,pressure-max = /bits/ 16 <255>;
7979
};

arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
spi-max-frequency = <2000000>;
133133
interrupts = <17 2>; /* high-to-low edge triggered */
134134
interrupt-parent = <&gpio>;
135-
pendown-gpio = <&gpio 17 0>;
135+
pendown-gpio = <&gpio 17 1>;
136136
ti,x-plate-ohms = /bits/ 16 <100>;
137137
ti,pressure-max = /bits/ 16 <255>;
138138
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
spi-max-frequency = <2000000>;
129129
interrupts = <17 2>; /* high-to-low edge triggered */
130130
interrupt-parent = <&gpio>;
131-
pendown-gpio = <&gpio 17 0>;
131+
pendown-gpio = <&gpio 17 1>;
132132
ti,x-plate-ohms = /bits/ 16 <100>;
133133
ti,pressure-max = /bits/ 16 <255>;
134134
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
spi-max-frequency = <2000000>;
100100
interrupts = <4 2>; /* high-to-low edge triggered */
101101
interrupt-parent = <&gpio>;
102-
pendown-gpio = <&gpio 4 0>;
102+
pendown-gpio = <&gpio 4 1>;
103103

104104
ti,x-plate-ohms = /bits/ 16 <60>;
105105
ti,pressure-max = /bits/ 16 <255>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
spi-max-frequency = <2000000>;
8888
interrupts = <17 2>; /* high-to-low edge triggered */
8989
interrupt-parent = <&gpio>;
90-
pendown-gpio = <&gpio 17 0>;
90+
pendown-gpio = <&gpio 17 GPIO_ACTIVE_LOW>;
9191
ti,swap-xy;
9292
ti,x-plate-ohms = /bits/ 16 <100>;
9393
ti,pressure-max = /bits/ 16 <255>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
spi-max-frequency = <2000000>;
8989
interrupts = <17 2>; /* high-to-low edge triggered */
9090
interrupt-parent = <&gpio>;
91-
pendown-gpio = <&gpio 17 0>;
91+
pendown-gpio = <&gpio 17 1>;
9292
ti,swap-xy;
9393
ti,x-plate-ohms = /bits/ 16 <100>;
9494
ti,pressure-max = /bits/ 16 <255>;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
spi-max-frequency = <2000000>;
122122
interrupts = <5 2>; /* high-to-low edge triggered */
123123
interrupt-parent = <&gpio>;
124-
pendown-gpio = <&gpio 5 0>;
124+
pendown-gpio = <&gpio 5 1>;
125125
ti,x-plate-ohms = /bits/ 16 <100>;
126126
ti,pressure-max = /bits/ 16 <255>;
127127
};

0 commit comments

Comments
 (0)