diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-04-15 06:28:06 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-05-07 12:28:40 -0400 |
commit | 8be1c477d5c860841298a970ebc102311cc7273a (patch) | |
tree | a88235b4ca9ab05d3ac7492d57eb6f803dcc4534 /arch/arm/mach-at91 | |
parent | 9d9716255f34daf04ab428cab254f8ffbab89fb7 (diff) |
ARM: at91: sam9rl: switch from atmel_tsadcc to at91_adc
atmel_tsadcc is not allowing to use the remaining ADC channels while at91_adc
does. Completely switch to at91_adc and remove the tsadcc platform_data for
at91sam9rl and at91sam9rl based boards.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 50 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9rlek.c | 12 |
2 files changed, 0 insertions, 62 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index a1d5af5e6427..044ad8bc6963 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -610,56 +610,6 @@ static void __init at91_add_device_tc(void) { } | |||
610 | 610 | ||
611 | 611 | ||
612 | /* -------------------------------------------------------------------- | 612 | /* -------------------------------------------------------------------- |
613 | * Touchscreen | ||
614 | * -------------------------------------------------------------------- */ | ||
615 | |||
616 | #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) | ||
617 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); | ||
618 | static struct at91_tsadcc_data tsadcc_data; | ||
619 | |||
620 | static struct resource tsadcc_resources[] = { | ||
621 | [0] = { | ||
622 | .start = AT91SAM9RL_BASE_TSC, | ||
623 | .end = AT91SAM9RL_BASE_TSC + SZ_16K - 1, | ||
624 | .flags = IORESOURCE_MEM, | ||
625 | }, | ||
626 | [1] = { | ||
627 | .start = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, | ||
628 | .end = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, | ||
629 | .flags = IORESOURCE_IRQ, | ||
630 | } | ||
631 | }; | ||
632 | |||
633 | static struct platform_device at91sam9rl_tsadcc_device = { | ||
634 | .name = "atmel_tsadcc", | ||
635 | .id = -1, | ||
636 | .dev = { | ||
637 | .dma_mask = &tsadcc_dmamask, | ||
638 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
639 | .platform_data = &tsadcc_data, | ||
640 | }, | ||
641 | .resource = tsadcc_resources, | ||
642 | .num_resources = ARRAY_SIZE(tsadcc_resources), | ||
643 | }; | ||
644 | |||
645 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) | ||
646 | { | ||
647 | if (!data) | ||
648 | return; | ||
649 | |||
650 | at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ | ||
651 | at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ | ||
652 | at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ | ||
653 | at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ | ||
654 | |||
655 | tsadcc_data = *data; | ||
656 | platform_device_register(&at91sam9rl_tsadcc_device); | ||
657 | } | ||
658 | #else | ||
659 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} | ||
660 | #endif | ||
661 | |||
662 | /* -------------------------------------------------------------------- | ||
663 | * ADC and Touchscreen | 613 | * ADC and Touchscreen |
664 | * -------------------------------------------------------------------- */ | 614 | * -------------------------------------------------------------------- */ |
665 | 615 | ||
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 1db43e32e6c5..b64648b4a1fc 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -231,16 +231,6 @@ static struct gpio_led ek_leds[] = { | |||
231 | 231 | ||
232 | 232 | ||
233 | /* | 233 | /* |
234 | * Touchscreen | ||
235 | */ | ||
236 | static struct at91_tsadcc_data ek_tsadcc_data = { | ||
237 | .adc_clock = 1000000, | ||
238 | .pendet_debounce = 0x0f, | ||
239 | .ts_sample_hold_time = 0x03, | ||
240 | }; | ||
241 | |||
242 | |||
243 | /* | ||
244 | * ADC + Touchscreen | 234 | * ADC + Touchscreen |
245 | */ | 235 | */ |
246 | static struct at91_adc_data ek_adc_data = { | 236 | static struct at91_adc_data ek_adc_data = { |
@@ -323,8 +313,6 @@ static void __init ek_board_init(void) | |||
323 | at91_add_device_lcdc(&ek_lcdc_data); | 313 | at91_add_device_lcdc(&ek_lcdc_data); |
324 | /* AC97 */ | 314 | /* AC97 */ |
325 | at91_add_device_ac97(&ek_ac97_data); | 315 | at91_add_device_ac97(&ek_ac97_data); |
326 | /* Touch Screen Controller */ | ||
327 | at91_add_device_tsadcc(&ek_tsadcc_data); | ||
328 | /* Touch Screen Controller + ADC */ | 316 | /* Touch Screen Controller + ADC */ |
329 | at91_add_device_adc(&ek_adc_data); | 317 | at91_add_device_adc(&ek_adc_data); |
330 | /* LEDs */ | 318 | /* LEDs */ |