* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support @ 2010-07-08 20:49 pieterg 2010-07-08 23:03 ` Marek Vasut 2010-07-09 7:18 ` Daniel Mack 0 siblings, 2 replies; 10+ messages in thread From: pieterg @ 2010-07-08 20:49 UTC (permalink / raw) To: linux-arm-kernel An embedded and charset-unspecified text was scrubbed... Name: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100708/e131b414/attachment.ksh> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-08 20:49 [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support pieterg @ 2010-07-08 23:03 ` Marek Vasut 2010-07-09 7:03 ` pieterg 2010-07-09 7:18 ` Daniel Mack 1 sibling, 1 reply; 10+ messages in thread From: Marek Vasut @ 2010-07-08 23:03 UTC (permalink / raw) To: linux-arm-kernel Dne ?t 8. ?ervence 2010 22:49:59 pieterg napsal(a): > Signed-off-by: pieter <p.grimmerink@inepro.com> > --- > 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(-) > > diff --git a/arch/arm/mach-pxa/colibri-pxa300.c > b/arch/arm/mach-pxa/colibri-pxa300.c > index 27f403d..3e50466 100644 > --- a/arch/arm/mach-pxa/colibri-pxa300.c > +++ b/arch/arm/mach-pxa/colibri-pxa300.c > @@ -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(); > } > > MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c > b/arch/arm/mach-pxa/colibri-pxa320.c > index 0755087..43fadf6 100644 > --- a/arch/arm/mach-pxa/colibri-pxa320.c > +++ b/arch/arm/mach-pxa/colibri-pxa320.c > @@ -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") > diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c > b/arch/arm/mach-pxa/colibri-pxa3xx.c > index 199afa2..097aef5 100644 > --- a/arch/arm/mach-pxa/colibri-pxa3xx.c > +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c > @@ -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 > diff --git a/arch/arm/mach-pxa/include/mach/colibri.h > b/arch/arm/mach-pxa/include/mach/colibri.h > index 5f2ba8d..299dab9 100644 > --- a/arch/arm/mach-pxa/include/mach/colibri.h > +++ b/arch/arm/mach-pxa/include/mach/colibri.h > @@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void); > static inline void colibri_pxa3xx_init_nand(void) {} > #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 */ What will happen if both of the TS devices are selected? You'd better figure out a way to enable that particular TSC chip based on hardware revision (the new colibri 320 v2.0 will have this information in the CPLD I believe). ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-08 23:03 ` Marek Vasut @ 2010-07-09 7:03 ` pieterg 2010-07-09 13:32 ` Marek Vasut 2010-07-09 16:14 ` Arnd Bergmann 0 siblings, 2 replies; 10+ messages in thread From: pieterg @ 2010-07-09 7:03 UTC (permalink / raw) To: linux-arm-kernel On Friday 09 July 2010 01:03:14 Marek Vasut wrote: > Dne ?t 8. ?ervence 2010 22:49:59 pieterg napsal(a): > > Signed-off-by: pieter <p.grimmerink@inepro.com> > > --- > > 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(-) > > > > diff --git a/arch/arm/mach-pxa/colibri-pxa300.c > > b/arch/arm/mach-pxa/colibri-pxa300.c > > index 27f403d..3e50466 100644 > > --- a/arch/arm/mach-pxa/colibri-pxa300.c > > +++ b/arch/arm/mach-pxa/colibri-pxa300.c > > @@ -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(); > > } > > > > MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") > > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c > > b/arch/arm/mach-pxa/colibri-pxa320.c > > index 0755087..43fadf6 100644 > > --- a/arch/arm/mach-pxa/colibri-pxa320.c > > +++ b/arch/arm/mach-pxa/colibri-pxa320.c > > @@ -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") > > diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c > > b/arch/arm/mach-pxa/colibri-pxa3xx.c > > index 199afa2..097aef5 100644 > > --- a/arch/arm/mach-pxa/colibri-pxa3xx.c > > +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c > > @@ -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 > > diff --git a/arch/arm/mach-pxa/include/mach/colibri.h > > b/arch/arm/mach-pxa/include/mach/colibri.h > > index 5f2ba8d..299dab9 100644 > > --- a/arch/arm/mach-pxa/include/mach/colibri.h > > +++ b/arch/arm/mach-pxa/include/mach/colibri.h > > @@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void); > > static inline void colibri_pxa3xx_init_nand(void) {} > > #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 */ > > What will happen if both of the TS devices are selected? That's no problem. I actually have both configs enabled, so I can run the same kernel on the 310 (which is using wm97 for a while now) and the 320 (which still has ucb1400 at the moment) Rgds, Pieter ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-09 7:03 ` pieterg @ 2010-07-09 13:32 ` Marek Vasut 2010-07-09 16:14 ` Arnd Bergmann 1 sibling, 0 replies; 10+ messages in thread From: Marek Vasut @ 2010-07-09 13:32 UTC (permalink / raw) To: linux-arm-kernel Dne P? 9. ?ervence 2010 09:03:50 pieterg napsal(a): > On Friday 09 July 2010 01:03:14 Marek Vasut wrote: > > Dne ?t 8. ?ervence 2010 22:49:59 pieterg napsal(a): > > > Signed-off-by: pieter <p.grimmerink@inepro.com> > > > --- > > > > > > 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(-) > > > > > > diff --git a/arch/arm/mach-pxa/colibri-pxa300.c > > > b/arch/arm/mach-pxa/colibri-pxa300.c > > > index 27f403d..3e50466 100644 > > > --- a/arch/arm/mach-pxa/colibri-pxa300.c > > > +++ b/arch/arm/mach-pxa/colibri-pxa300.c > > > @@ -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(); > > > > > > } > > > > > > MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") > > > > > > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c > > > b/arch/arm/mach-pxa/colibri-pxa320.c > > > index 0755087..43fadf6 100644 > > > --- a/arch/arm/mach-pxa/colibri-pxa320.c > > > +++ b/arch/arm/mach-pxa/colibri-pxa320.c > > > @@ -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") > > > > > > diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c > > > b/arch/arm/mach-pxa/colibri-pxa3xx.c > > > index 199afa2..097aef5 100644 > > > --- a/arch/arm/mach-pxa/colibri-pxa3xx.c > > > +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c > > > @@ -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 > > > diff --git a/arch/arm/mach-pxa/include/mach/colibri.h > > > b/arch/arm/mach-pxa/include/mach/colibri.h > > > index 5f2ba8d..299dab9 100644 > > > --- a/arch/arm/mach-pxa/include/mach/colibri.h > > > +++ b/arch/arm/mach-pxa/include/mach/colibri.h > > > @@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void); > > > > > > static inline void colibri_pxa3xx_init_nand(void) {} > > > #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 */ > > > > What will happen if both of the TS devices are selected? > > That's no problem. > I actually have both configs enabled, so I can run the same kernel on the > 310 (which is using wm97 for a while now) and the 320 (which still has > ucb1400 at the moment) Ah ok then! Acked-by: Marek Vasut <marek.vasut@gmail.com> > > Rgds, Pieter ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-09 7:03 ` pieterg 2010-07-09 13:32 ` Marek Vasut @ 2010-07-09 16:14 ` Arnd Bergmann 2010-07-09 16:47 ` pieterg 1 sibling, 1 reply; 10+ messages in thread From: Arnd Bergmann @ 2010-07-09 16:14 UTC (permalink / raw) To: linux-arm-kernel On Friday 09 July 2010, pieterg wrote: > > > --- a/arch/arm/mach-pxa/include/mach/colibri.h > > > +++ b/arch/arm/mach-pxa/include/mach/colibri.h > > > @@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void); > > > static inline void colibri_pxa3xx_init_nand(void) {} > > > #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 */ > > > > What will happen if both of the TS devices are selected? > > That's no problem. > I actually have both configs enabled, so I can run the same kernel on the > 310 (which is using wm97 for a while now) and the 320 (which still has > ucb1400 at the moment) But doesn't the code still create both devices in /sys/devices/platform then? AFAICT, there is no runtime probing support to make sure you only register the device that is there. Arnd ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-09 16:14 ` Arnd Bergmann @ 2010-07-09 16:47 ` pieterg 2010-07-09 16:53 ` Arnd Bergmann 0 siblings, 1 reply; 10+ messages in thread From: pieterg @ 2010-07-09 16:47 UTC (permalink / raw) To: linux-arm-kernel On Friday 09 July 2010 18:14:24 Arnd Bergmann wrote: > On Friday 09 July 2010, pieterg wrote: > > > > --- a/arch/arm/mach-pxa/include/mach/colibri.h > > > > +++ b/arch/arm/mach-pxa/include/mach/colibri.h > > > > @@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void); > > > > static inline void colibri_pxa3xx_init_nand(void) {} > > > > #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 */ > > > > > > What will happen if both of the TS devices are selected? > > > > That's no problem. > > I actually have both configs enabled, so I can run the same kernel on > > the 310 (which is using wm97 for a while now) and the 320 (which still > > has ucb1400 at the moment) > > But doesn't the code still create both devices in /sys/devices/platform > then? AFAICT, there is no runtime probing support to make sure you only > register the device that is there. Yes, they both show up. But at least the do not conflict, and only the detected device will register an input device. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-09 16:47 ` pieterg @ 2010-07-09 16:53 ` Arnd Bergmann 2010-07-09 17:21 ` pieterg 0 siblings, 1 reply; 10+ messages in thread From: Arnd Bergmann @ 2010-07-09 16:53 UTC (permalink / raw) To: linux-arm-kernel On Friday 09 July 2010, pieterg wrote: > > > > But doesn't the code still create both devices in /sys/devices/platform > > then? AFAICT, there is no runtime probing support to make sure you only > > register the device that is there. > > Yes, they both show up. But at least the do not conflict, and only the > detected device will register an input device. That's still putting the logic into the wrong place. If you have a way to detect the hardware, that should be done before creating the device, otherwise there is no point in having a platform device to start with and you could just detect it in your module_init function. Arnd ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-09 16:53 ` Arnd Bergmann @ 2010-07-09 17:21 ` pieterg 2010-07-09 17:25 ` Arnd Bergmann 0 siblings, 1 reply; 10+ messages in thread From: pieterg @ 2010-07-09 17:21 UTC (permalink / raw) To: linux-arm-kernel On Friday 09 July 2010 18:53:41 Arnd Bergmann wrote: > On Friday 09 July 2010, pieterg wrote: > > > But doesn't the code still create both devices in > > > /sys/devices/platform then? AFAICT, there is no runtime probing > > > support to make sure you only register the device that is there. > > > > Yes, they both show up. But at least the do not conflict, and only the > > detected device will register an input device. > > That's still putting the logic into the wrong place. If you have a way > to detect the hardware, that should be done before creating the device, > otherwise there is no point in having a platform device to start with > and you could just detect it in your module_init function. Note that this would not happen normally. The concern was raised as to what would happen if the user accidentally put two different AC97/touchscreen controllers in the kernelconfig, while there is only one AC97 interface. And my observation is that nothing serious happens in that case. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-09 17:21 ` pieterg @ 2010-07-09 17:25 ` Arnd Bergmann 0 siblings, 0 replies; 10+ messages in thread From: Arnd Bergmann @ 2010-07-09 17:25 UTC (permalink / raw) To: linux-arm-kernel On Friday 09 July 2010, pieterg wrote: > Note that this would not happen normally. > The concern was raised as to what would happen if the user accidentally put > two different AC97/touchscreen controllers in the kernelconfig, while there > is only one AC97 interface. > And my observation is that nothing serious happens in that case. Yes, I understand that it's not serious. I'm arguing instead that it's still wrong. If you ship a kernel with support for two dozen different controllers, you certainly wouldn't want to list them all as present devices and have to go through loading each driver at boot time, just to find that they are not actually present. Arnd ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support 2010-07-08 20:49 [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support pieterg 2010-07-08 23:03 ` Marek Vasut @ 2010-07-09 7:18 ` Daniel Mack 1 sibling, 0 replies; 10+ messages in thread From: Daniel Mack @ 2010-07-09 7:18 UTC (permalink / raw) To: linux-arm-kernel On Thu, Jul 08, 2010 at 10:49:59PM +0200, pieterg wrote: > Signed-off-by: pieter <p.grimmerink@inepro.com> Acked-by: Daniel Mack <daniel@caiaq.de> > --- > 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(-) > > diff --git a/arch/arm/mach-pxa/colibri-pxa300.c > b/arch/arm/mach-pxa/colibri-pxa300.c > index 27f403d..3e50466 100644 > --- a/arch/arm/mach-pxa/colibri-pxa300.c > +++ b/arch/arm/mach-pxa/colibri-pxa300.c > @@ -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(); > } > > MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") > diff --git a/arch/arm/mach-pxa/colibri-pxa320.c > b/arch/arm/mach-pxa/colibri-pxa320.c > index 0755087..43fadf6 100644 > --- a/arch/arm/mach-pxa/colibri-pxa320.c > +++ b/arch/arm/mach-pxa/colibri-pxa320.c > @@ -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") > diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c > b/arch/arm/mach-pxa/colibri-pxa3xx.c > index 199afa2..097aef5 100644 > --- a/arch/arm/mach-pxa/colibri-pxa3xx.c > +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c > @@ -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 > diff --git a/arch/arm/mach-pxa/include/mach/colibri.h > b/arch/arm/mach-pxa/include/mach/colibri.h > index 5f2ba8d..299dab9 100644 > --- a/arch/arm/mach-pxa/include/mach/colibri.h > +++ b/arch/arm/mach-pxa/include/mach/colibri.h > @@ -30,6 +30,12 @@ extern void colibri_pxa3xx_init_nand(void); > static inline void colibri_pxa3xx_init_nand(void) {} > #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 */ > > -- > 1.6.5.rc1.44.ga1675 > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-07-09 17:25 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-08 20:49 [PATCH v2 5/5] colibri-pxa3xx: add touchscreen support pieterg 2010-07-08 23:03 ` Marek Vasut 2010-07-09 7:03 ` pieterg 2010-07-09 13:32 ` Marek Vasut 2010-07-09 16:14 ` Arnd Bergmann 2010-07-09 16:47 ` pieterg 2010-07-09 16:53 ` Arnd Bergmann 2010-07-09 17:21 ` pieterg 2010-07-09 17:25 ` Arnd Bergmann 2010-07-09 7:18 ` Daniel Mack
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).