aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/vpac270.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-03-25 23:45:54 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-05-11 11:25:03 -0400
commit1a8fb70e484589105a77f44bcd11e531c5fbe789 (patch)
treee8e4affc77eea545ee70d6f733b4a3f26f0185c5 /arch/arm/mach-pxa/vpac270.c
parent947fb57e3a6be2920423de42a503eea08b0c0763 (diff)
[ARM] pxa/vpac270: Add touchscreen support
This adds support for the UCB1400 touchscreen found in the VPAC270 device. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/vpac270.c')
-rw-r--r--arch/arm/mach-pxa/vpac270.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 56cc24575999..fa428ca54902 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -22,11 +22,13 @@
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/dm9000.h> 24#include <linux/dm9000.h>
25#include <linux/ucb1400.h>
25 26
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
29#include <mach/pxa27x.h> 30#include <mach/pxa27x.h>
31#include <mach/audio.h>
30#include <mach/vpac270.h> 32#include <mach/vpac270.h>
31#include <mach/mmc.h> 33#include <mach/mmc.h>
32#include <mach/pxafb.h> 34#include <mach/pxafb.h>
@@ -121,6 +123,15 @@ static unsigned long vpac270_pin_config[] __initdata = {
121 123
122 /* Ethernet */ 124 /* Ethernet */
123 GPIO114_GPIO, /* IRQ */ 125 GPIO114_GPIO, /* IRQ */
126
127 /* AC97 */
128 GPIO28_AC97_BITCLK,
129 GPIO29_AC97_SDATA_IN_0,
130 GPIO30_AC97_SDATA_OUT,
131 GPIO31_AC97_SYNC,
132 GPIO95_AC97_nRESET,
133 GPIO98_AC97_SYSCLK,
134 GPIO113_GPIO, /* TS IRQ */
124}; 135};
125 136
126/****************************************************************************** 137/******************************************************************************
@@ -357,6 +368,36 @@ static inline void vpac270_eth_init(void) {}
357#endif 368#endif
358 369
359/****************************************************************************** 370/******************************************************************************
371 * Audio and Touchscreen
372 ******************************************************************************/
373#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \
374 defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
375static pxa2xx_audio_ops_t vpac270_ac97_pdata = {
376 .reset_gpio = 95,
377};
378
379static struct ucb1400_pdata vpac270_ucb1400_pdata = {
380 .irq = IRQ_GPIO(113),
381};
382
383static struct platform_device vpac270_ucb1400_device = {
384 .name = "ucb1400_core",
385 .id = -1,
386 .dev = {
387 .platform_data = &vpac270_ucb1400_pdata,
388 },
389};
390
391static void __init vpac270_ts_init(void)
392{
393 pxa_set_ac97_info(&vpac270_ac97_pdata);
394 platform_device_register(&vpac270_ucb1400_device);
395}
396#else
397static inline void vpac270_ts_init(void) {}
398#endif
399
400/******************************************************************************
360 * Framebuffer 401 * Framebuffer
361 ******************************************************************************/ 402 ******************************************************************************/
362#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) 403#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
@@ -439,6 +480,7 @@ static void __init vpac270_init(void)
439 vpac270_uhc_init(); 480 vpac270_uhc_init();
440 vpac270_udc_init(); 481 vpac270_udc_init();
441 vpac270_eth_init(); 482 vpac270_eth_init();
483 vpac270_ts_init();
442} 484}
443 485
444MACHINE_START(VPAC270, "Voipac PXA270") 486MACHINE_START(VPAC270, "Voipac PXA270")