Skip to contentSkip to conversation

colibri-pxa3xx: add touchscreen support

PATCH New pieterg 2 participants 3 messages Jul 8, 2010

lore
Share & tools
lore
#1 lore raw

PATCH 5/5 colibri-pxa3xx: add touchscreen support

Dne ?t 8. ?ervence 2010 19:04:16 pieterg napsal(a):

Quoted 15 lines
---
 arch/arm/mach-pxa/colibri-pxa300.c       |    2 +
 arch/arm/mach-pxa/colibri-pxa320.c       |    1 +
 arch/arm/mach-pxa/colibri-pxa3xx.c       |   31
++++++++++++++++++++++++++++++
 arch/arm/mach-pxa/include/mach/colibri.h |    6 +++++
 4 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/colibri-pxa300.c +0 -0
index 27f403d..edd48e2 100644

arch/arm/mach-pxa/colibri-pxa300.c void __init colibri_pxa300_init(void) · line 233

Quoted 5 lines
arch/arm/mach-pxa/colibri-pxa300.c +2 -0
@@ -229,6 +229,8 @@ void __init colibri_pxa300_init(void)
 				mfp_to_gpio(MFP_PIN_GPIO13));
 	colibri_pxa300_init_uart();
 	colibri_pxa300_init_i2c();
+	if (cpu_is_pxa310())
+	    colibri_pxa3xx_init_touchscreen();

Is the indent ok here? did you run the patches through checkpatch.pl ?

Quoted 63 lines
arch/arm/mach-pxa/colibri-pxa300.c +0 -0
 }
 
 MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
arch/arm/mach-pxa/colibri-pxa320.c +1 -0
index 0755087..43fadf6 100644
@@ -229,6 +229,7 @@ void __init colibri_pxa320_init(void)
 				mfp_to_gpio(MFP_PIN_GPIO28));
 	colibri_pxa320_init_uart();
 	colibri_pxa320_init_i2c();
+	colibri_pxa3xx_init_touchscreen();
 }
 
 MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
arch/arm/mach-pxa/colibri-pxa3xx.c +31 -0
index 199afa2..097aef5 100644
@@ -198,3 +198,34 @@ void __init colibri_pxa3xx_init_nand(void)
 }
 #endif
 
+#if defined(CONFIG_INPUT_TOUCHSCREEN)
+
+#if defined(CONFIG_TOUCHSCREEN_WM97XX) || \
+	defined(CONFIG_TOUCHSCREEN_WM97XX_MODULE)
+static struct platform_device colibri_ts_wm97xx_device = {
+	.name	= "wm97xx-ts",
+	.id	= -1,
+};
+#endif
+
+#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \
+	defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
+static struct platform_device colibri_ts_ucb1400_device = {
+	.name	= "ucb1400_core",
+	.id	= -1,
+};
+#endif
+
+void __init colibri_pxa3xx_init_touchscreen(void)
+{
+#if defined(CONFIG_TOUCHSCREEN_WM97XX) || \
+	defined(CONFIG_TOUCHSCREEN_WM97XX_MODULE)
+	platform_device_register(&colibri_ts_wm97xx_device);
+#endif
+#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \
+	defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
+	platform_device_register(&colibri_ts_ucb1400_device);
+#endif
+}
+
+#endif
arch/arm/mach-pxa/include/mach/colibri.h +0 -0
index 5f2ba8d..299dab9 100644
@@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void);
 static inline void colibri_pxa3xx_init_nand(void) {}

arch/arm/mach-pxa/include/mach/colibri.h extern void colibri_pxa3xx_init_nand(void); · line 40

Quoted 10 lines
arch/arm/mach-pxa/include/mach/colibri.h +6 -0
 #endif
 
+#if defined(CONFIG_INPUT_TOUCHSCREEN)
+extern void colibri_pxa3xx_init_touchscreen(void);
+#else
+static inline void colibri_pxa3xx_init_touchscreen(void) {}
+#endif
+
 /* physical memory regions */
 #define COLIBRI_SDRAM_BASE	0xa0000000      /* SDRAM region */

It looks correct ...

author
#2 lore raw

PATCH 5/5 colibri-pxa3xx: add touchscreen support

Quoted 10 lines · On Thursday 08 July 2010 22:03:40 Marek Vasut wrote:

Dne ?t 8. ?ervence 2010 19:04:16 pieterg napsal(a):

Quoted 9 lines
---
 arch/arm/mach-pxa/colibri-pxa300.c       |    2 +
 arch/arm/mach-pxa/colibri-pxa320.c       |    1 +
 arch/arm/mach-pxa/colibri-pxa3xx.c       |   31
++++++++++++++++++++++++++++++
 arch/arm/mach-pxa/include/mach/colibri.h |    6 +++++
 4 files changed, 40 insertions(+), 0 deletions(-)
Quoted 13 lines

arch/arm/mach-pxa/colibri-pxa300.c void __init colibri_pxa300_init(void) · line 233

Quoted 11 lines
arch/arm/mach-pxa/colibri-pxa300.c +2 -0
index 27f403d..edd48e2 100644
@@ -229,6 +229,8 @@ void __init colibri_pxa300_init(void)
 				mfp_to_gpio(MFP_PIN_GPIO13));
 	colibri_pxa300_init_uart();
 	colibri_pxa300_init_i2c();
+	if (cpu_is_pxa310())
+	    colibri_pxa3xx_init_touchscreen();

Is the indent ok here? did you run the patches through checkpatch.pl ?

You're right, I'm missing a tab there. Should have used checkpatch... I'll send a v2.

Rds, Pieter