aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9rl_devices.c
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2009-11-19 12:31:20 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-20 03:55:29 -0500
commit423c9b0dc3d01e50a4df4e48e8477bfb33638d6e (patch)
treee7bc6d9725bad87619ae6f84488fbea05390a19f /arch/arm/mach-at91/at91sam9rl_devices.c
parent970435a141b55b2334c6b7e834ed5da7a87daae5 (diff)
AT91: add platform parameters for atmel_tsadcc in at91sam9rlek
Setup platform parameters in at91sam9rl-ek board to be passed to atmel_tsadcc touchscreen. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index d345f5453dbe..53aaa94df75a 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -622,6 +622,7 @@ static void __init at91_add_device_tc(void) { }
622 622
623#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) 623#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
624static u64 tsadcc_dmamask = DMA_BIT_MASK(32); 624static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
625static struct at91_tsadcc_data tsadcc_data;
625 626
626static struct resource tsadcc_resources[] = { 627static struct resource tsadcc_resources[] = {
627 [0] = { 628 [0] = {
@@ -642,22 +643,27 @@ static struct platform_device at91sam9rl_tsadcc_device = {
642 .dev = { 643 .dev = {
643 .dma_mask = &tsadcc_dmamask, 644 .dma_mask = &tsadcc_dmamask,
644 .coherent_dma_mask = DMA_BIT_MASK(32), 645 .coherent_dma_mask = DMA_BIT_MASK(32),
646 .platform_data = &tsadcc_data,
645 }, 647 },
646 .resource = tsadcc_resources, 648 .resource = tsadcc_resources,
647 .num_resources = ARRAY_SIZE(tsadcc_resources), 649 .num_resources = ARRAY_SIZE(tsadcc_resources),
648}; 650};
649 651
650void __init at91_add_device_tsadcc(void) 652void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
651{ 653{
654 if (!data)
655 return;
656
652 at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ 657 at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */
653 at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ 658 at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */
654 at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ 659 at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */
655 at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ 660 at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */
656 661
662 tsadcc_data = *data;
657 platform_device_register(&at91sam9rl_tsadcc_device); 663 platform_device_register(&at91sam9rl_tsadcc_device);
658} 664}
659#else 665#else
660void __init at91_add_device_tsadcc(void) {} 666void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
661#endif 667#endif
662 668
663 669