diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2009-11-19 09:31:20 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-20 00:55:29 -0800 |
commit | 423c9b0dc3d01e50a4df4e48e8477bfb33638d6e (patch) | |
tree | e7bc6d9725bad87619ae6f84488fbea05390a19f /arch/arm/mach-at91/at91sam9rl_devices.c | |
parent | 970435a141b55b2334c6b7e834ed5da7a87daae5 (diff) | |
download | op-kernel-dev-423c9b0dc3d01e50a4df4e48e8477bfb33638d6e.zip op-kernel-dev-423c9b0dc3d01e50a4df4e48e8477bfb33638d6e.tar.gz |
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.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 d345f54..53aaa94 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) { } #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) static u64 tsadcc_dmamask = DMA_BIT_MASK(32); +static struct at91_tsadcc_data tsadcc_data; static struct resource tsadcc_resources[] = { [0] = { @@ -642,22 +643,27 @@ static struct platform_device at91sam9rl_tsadcc_device = { .dev = { .dma_mask = &tsadcc_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = &tsadcc_data, }, .resource = tsadcc_resources, .num_resources = ARRAY_SIZE(tsadcc_resources), }; -void __init at91_add_device_tsadcc(void) +void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) { + if (!data) + return; + at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ + tsadcc_data = *data; platform_device_register(&at91sam9rl_tsadcc_device); } #else -void __init at91_add_device_tsadcc(void) {} +void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} #endif |