diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 10 |
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) |
624 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); | 624 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); |
625 | static struct at91_tsadcc_data tsadcc_data; | ||
625 | 626 | ||
626 | static struct resource tsadcc_resources[] = { | 627 | static 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 | ||
650 | void __init at91_add_device_tsadcc(void) | 652 | void __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 |
660 | void __init at91_add_device_tsadcc(void) {} | 666 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} |
661 | #endif | 667 | #endif |
662 | 668 | ||
663 | 669 | ||