mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
136 lines
5.9 KiB
Diff
136 lines
5.9 KiB
Diff
From c895cecf59190b45b8cfe3ad3f8edf3a7267c7f0 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Tue, 12 Mar 2024 16:10:37 +0000
|
|
Subject: [PATCH 0964/1002] 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 <dave.stevenson@raspberrypi.com>
|
|
---
|
|
arch/arm/boot/dts/overlays/ads7846-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/hy28a-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/hy28b-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/mz61581-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/piscreen-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/piscreen2r-overlay.dts | 2 +-
|
|
arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 2 +-
|
|
8 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/arch/arm/boot/dts/overlays/ads7846-overlay.dts b/arch/arm/boot/dts/overlays/ads7846-overlay.dts
|
|
index 1c5c9b6bb6ff..211a002c0b34 100644
|
|
--- a/arch/arm/boot/dts/overlays/ads7846-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts
|
|
@@ -57,7 +57,7 @@ ads7846: ads7846@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <255 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 255 0>;
|
|
+ pendown-gpio = <&gpio 255 1>;
|
|
|
|
/* driver defaults */
|
|
ti,x-min = /bits/ 16 <0>;
|
|
diff --git a/arch/arm/boot/dts/overlays/hy28a-overlay.dts b/arch/arm/boot/dts/overlays/hy28a-overlay.dts
|
|
index 5843a5e9c86a..d0d52ebd9bd5 100644
|
|
--- a/arch/arm/boot/dts/overlays/hy28a-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts
|
|
@@ -73,7 +73,7 @@ hy28a_ts: hy28a-ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <17 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 17 0>;
|
|
+ pendown-gpio = <&gpio 17 1>;
|
|
ti,x-plate-ohms = /bits/ 16 <100>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
};
|
|
diff --git a/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts b/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
|
|
index 95bfb1eadc20..9df33c5d95bb 100644
|
|
--- a/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
|
|
@@ -132,7 +132,7 @@ hy28b_ts: hy28b-ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <17 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 17 0>;
|
|
+ pendown-gpio = <&gpio 17 1>;
|
|
ti,x-plate-ohms = /bits/ 16 <100>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
};
|
|
diff --git a/arch/arm/boot/dts/overlays/hy28b-overlay.dts b/arch/arm/boot/dts/overlays/hy28b-overlay.dts
|
|
index 9edd0848d555..421bde94a4a0 100644
|
|
--- a/arch/arm/boot/dts/overlays/hy28b-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts
|
|
@@ -128,7 +128,7 @@ hy28b_ts: hy28b-ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <17 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 17 0>;
|
|
+ pendown-gpio = <&gpio 17 1>;
|
|
ti,x-plate-ohms = /bits/ 16 <100>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
};
|
|
diff --git a/arch/arm/boot/dts/overlays/mz61581-overlay.dts b/arch/arm/boot/dts/overlays/mz61581-overlay.dts
|
|
index 6e00e8b2ddf2..101ad21d8093 100644
|
|
--- a/arch/arm/boot/dts/overlays/mz61581-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts
|
|
@@ -99,7 +99,7 @@ mz61581_ts: mz61581_ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <4 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 4 0>;
|
|
+ pendown-gpio = <&gpio 4 1>;
|
|
|
|
ti,x-plate-ohms = /bits/ 16 <60>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
diff --git a/arch/arm/boot/dts/overlays/piscreen-overlay.dts b/arch/arm/boot/dts/overlays/piscreen-overlay.dts
|
|
index 8fa2426f7114..29bcd41f39cf 100644
|
|
--- a/arch/arm/boot/dts/overlays/piscreen-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts
|
|
@@ -87,7 +87,7 @@ piscreen_ts: piscreen-ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <17 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 17 0>;
|
|
+ pendown-gpio = <&gpio 17 GPIO_ACTIVE_LOW>;
|
|
ti,swap-xy;
|
|
ti,x-plate-ohms = /bits/ 16 <100>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
diff --git a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
|
|
index 9d2b51101969..4468f4a54bf7 100644
|
|
--- a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
|
|
@@ -88,7 +88,7 @@ piscreen2_ts: piscreen2-ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <17 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 17 0>;
|
|
+ pendown-gpio = <&gpio 17 1>;
|
|
ti,swap-xy;
|
|
ti,x-plate-ohms = /bits/ 16 <100>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
|
|
index a102b09e3ab5..edc5889b6f5f 100644
|
|
--- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
|
|
@@ -121,7 +121,7 @@ tinylcd35_ts: tinylcd35_ts@1 {
|
|
spi-max-frequency = <2000000>;
|
|
interrupts = <5 2>; /* high-to-low edge triggered */
|
|
interrupt-parent = <&gpio>;
|
|
- pendown-gpio = <&gpio 5 0>;
|
|
+ pendown-gpio = <&gpio 5 1>;
|
|
ti,x-plate-ohms = /bits/ 16 <100>;
|
|
ti,pressure-max = /bits/ 16 <255>;
|
|
};
|
|
--
|
|
2.44.0
|
|
|