Skip to contentSkip to conversation

pdm360ng and touchscreen set up

PATCH Dmitry Torokhov 2 participants 2 messages Jul 2, 2024 – Jul 4, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Anatolij, Michael,

I hope you can shed some light for me: why does pdm360ng have very elaborate set up for the "pendown" GPIO of the touchscreen? Can we simply fix the DTS in arch/powerpc/boot/dts/pdm360ng.dts and specify correct pendown GPIO there, as well as correct interrupt trigger, and remove most of arch/powerpc/platforms/512x/pdm360ng.c ?

Something like this:

arch/powerpc/boot/dts/pdm360ng.dts +3 -2
index 67c3b9db75d7..5651bd9d9db3 100644
@@ -176,11 +176,12 @@ psc@11900 {
 
 			/* ADS7845 touch screen controller */
 			ts@0 {
-				compatible = "ti,ads7846";
+				compatible = "ti,ads7845";
 				reg = <0x0>;
 				spi-max-frequency = <3000000>;
 				/* pen irq is GPIO25 */
-				interrupts = <78 0x8>;
+				interrupts = <78 IRQ_TYPE_LEVEL_LOW>;
+				pendown-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
 			};
 		};
 

The reason I'm asking is that I want to remove support for platform data in ads7846 driver and pdm360ng is one of the last 3 users of it in the kernel.

Thanks.

Signature · 1 line
Dmitry
#1 lore raw
Quoted 7 lines · Dmitry Torokhov

Hi Anatolij, Michael,

I hope you can shed some light for me: why does pdm360ng have very elaborate set up for the "pendown" GPIO of the touchscreen? Can we simply fix the DTS in arch/powerpc/boot/dts/pdm360ng.dts and specify correct pendown GPIO there, as well as correct interrupt trigger, and remove most of arch/powerpc/platforms/512x/pdm360ng.c ?

Sorry, I don't know anything about this platform.

It looks like it's some sort of embedded display device? It's pretty old and hasn't seen much activity for ~10 years.

Quoted 23 lines

Something like this:

arch/powerpc/boot/dts/pdm360ng.dts +3 -2
index 67c3b9db75d7..5651bd9d9db3 100644
@@ -176,11 +176,12 @@ psc@11900 {
 
 			/* ADS7845 touch screen controller */
 			ts@0 {
-				compatible = "ti,ads7846";
+				compatible = "ti,ads7845";
 				reg = <0x0>;
 				spi-max-frequency = <3000000>;
 				/* pen irq is GPIO25 */
-				interrupts = <78 0x8>;
+				interrupts = <78 IRQ_TYPE_LEVEL_LOW>;
+				pendown-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
 			};
 		};
 
Quoted 3 lines

The reason I'm asking is that I want to remove support for platform data in ads7846 driver and pdm360ng is one of the last 3 users of it in the kernel.

I think go ahead with the change, and if anyone is still using this device they can speak up if there's any problems.

cheers