From: Alexandre Belloni <alexandre.belloni@free-electrons.com> To: Nicolas Ferre <nicolas.ferre@atmel.com>, Jonathan Cameron <jic23@kernel.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Maxime Ripard <maxime.ripard@free-electrons.com>, Gregory Clement <gregory.clement@free-electrons.com>, Alexandre Belloni <alexandre.belloni@free-electrons.com> Subject: [PATCH 11/15] ARM: at91: sam9rl: switch from atmel_tsadcc to at91_adc Date: Wed, 5 Mar 2014 18:35:36 +0100 [thread overview] Message-ID: <1394040940-18246-12-git-send-email-alexandre.belloni@free-electrons.com> (raw) In-Reply-To: <1394040940-18246-1-git-send-email-alexandre.belloni@free-electrons.com> 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> --- arch/arm/configs/at91sam9rl_defconfig | 3 +- arch/arm/mach-at91/at91sam9rl_devices.c | 50 --------------------------------- arch/arm/mach-at91/board-sam9rlek.c | 12 -------- 3 files changed, 2 insertions(+), 63 deletions(-) diff --git a/arch/arm/configs/at91sam9rl_defconfig b/arch/arm/configs/at91sam9rl_defconfig index 85f846ae9ff2..5d7797d43d23 100644 --- a/arch/arm/configs/at91sam9rl_defconfig +++ b/arch/arm/configs/at91sam9rl_defconfig @@ -45,7 +45,6 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y # CONFIG_SERIO is not set CONFIG_SERIAL_ATMEL=y CONFIG_SERIAL_ATMEL_CONSOLE=y @@ -65,6 +64,8 @@ CONFIG_MMC=y CONFIG_MMC_ATMELMCI=m CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_AT91SAM9=y +CONFIG_IIO=y +CONFIG_AT91_ADC=y CONFIG_EXT2_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index b836dada942c..9ccae034119c 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c @@ -608,56 +608,6 @@ static void __init at91_add_device_tc(void) { } /* -------------------------------------------------------------------- - * Touchscreen - * -------------------------------------------------------------------- */ - -#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] = { - .start = AT91SAM9RL_BASE_TSC, - .end = AT91SAM9RL_BASE_TSC + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, - .end = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device at91sam9rl_tsadcc_device = { - .name = "atmel_tsadcc", - .id = -1, - .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(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(struct at91_tsadcc_data *data) {} -#endif - -/* -------------------------------------------------------------------- * ADC and Touchscreen * -------------------------------------------------------------------- */ diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 35d420247e25..6ae90e312ce0 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c @@ -230,16 +230,6 @@ static struct gpio_led ek_leds[] = { /* - * Touchscreen - */ -static struct at91_tsadcc_data ek_tsadcc_data = { - .adc_clock = 1000000, - .pendet_debounce = 0x0f, - .ts_sample_hold_time = 0x03, -}; - - -/* * ADC + Touchscreen */ static struct at91_adc_data ek_adc_data = { @@ -322,8 +312,6 @@ static void __init ek_board_init(void) at91_add_device_lcdc(&ek_lcdc_data); /* AC97 */ at91_add_device_ac97(&ek_ac97_data); - /* Touch Screen Controller */ - at91_add_device_tsadcc(&ek_tsadcc_data); /* Touch Screen Controller + ADC */ at91_add_device_adc(&ek_adc_data); /* LEDs */ -- 1.8.3.2
WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 11/15] ARM: at91: sam9rl: switch from atmel_tsadcc to at91_adc Date: Wed, 5 Mar 2014 18:35:36 +0100 [thread overview] Message-ID: <1394040940-18246-12-git-send-email-alexandre.belloni@free-electrons.com> (raw) In-Reply-To: <1394040940-18246-1-git-send-email-alexandre.belloni@free-electrons.com> 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> --- arch/arm/configs/at91sam9rl_defconfig | 3 +- arch/arm/mach-at91/at91sam9rl_devices.c | 50 --------------------------------- arch/arm/mach-at91/board-sam9rlek.c | 12 -------- 3 files changed, 2 insertions(+), 63 deletions(-) diff --git a/arch/arm/configs/at91sam9rl_defconfig b/arch/arm/configs/at91sam9rl_defconfig index 85f846ae9ff2..5d7797d43d23 100644 --- a/arch/arm/configs/at91sam9rl_defconfig +++ b/arch/arm/configs/at91sam9rl_defconfig @@ -45,7 +45,6 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y # CONFIG_SERIO is not set CONFIG_SERIAL_ATMEL=y CONFIG_SERIAL_ATMEL_CONSOLE=y @@ -65,6 +64,8 @@ CONFIG_MMC=y CONFIG_MMC_ATMELMCI=m CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_AT91SAM9=y +CONFIG_IIO=y +CONFIG_AT91_ADC=y CONFIG_EXT2_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index b836dada942c..9ccae034119c 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c @@ -608,56 +608,6 @@ static void __init at91_add_device_tc(void) { } /* -------------------------------------------------------------------- - * Touchscreen - * -------------------------------------------------------------------- */ - -#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] = { - .start = AT91SAM9RL_BASE_TSC, - .end = AT91SAM9RL_BASE_TSC + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, - .end = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device at91sam9rl_tsadcc_device = { - .name = "atmel_tsadcc", - .id = -1, - .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(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(struct at91_tsadcc_data *data) {} -#endif - -/* -------------------------------------------------------------------- * ADC and Touchscreen * -------------------------------------------------------------------- */ diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 35d420247e25..6ae90e312ce0 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c @@ -230,16 +230,6 @@ static struct gpio_led ek_leds[] = { /* - * Touchscreen - */ -static struct at91_tsadcc_data ek_tsadcc_data = { - .adc_clock = 1000000, - .pendet_debounce = 0x0f, - .ts_sample_hold_time = 0x03, -}; - - -/* * ADC + Touchscreen */ static struct at91_adc_data ek_adc_data = { @@ -322,8 +312,6 @@ static void __init ek_board_init(void) at91_add_device_lcdc(&ek_lcdc_data); /* AC97 */ at91_add_device_ac97(&ek_ac97_data); - /* Touch Screen Controller */ - at91_add_device_tsadcc(&ek_tsadcc_data); /* Touch Screen Controller + ADC */ at91_add_device_adc(&ek_adc_data); /* LEDs */ -- 1.8.3.2
next prev parent reply other threads:[~2014-03-05 17:37 UTC|newest] Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-05 17:35 [PATCH 00/15] iio: adc: at91 cleanups and atmel_tsadcc removal Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 01/15] ARM: at91: sam9g45: remove unused platform_data Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-16 17:49 ` Jonathan Cameron 2014-03-16 17:49 ` Jonathan Cameron 2014-03-16 17:49 ` Jonathan Cameron 2014-03-05 17:35 ` [PATCH 02/15] ARM: at91: sam9260: " Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-16 17:49 ` Jonathan Cameron 2014-03-16 17:49 ` Jonathan Cameron 2014-03-16 17:49 ` Jonathan Cameron 2014-03-05 17:35 ` [PATCH 03/15] iio: adc: at91: cleanup platform_data Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-16 17:55 ` Jonathan Cameron 2014-03-16 17:55 ` Jonathan Cameron 2014-03-05 17:35 ` [PATCH 04/15] iio: adc: at91_adc: Add support for touchscreens without TSMR Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 18:27 ` Thomas Petazzoni 2014-03-05 18:27 ` Thomas Petazzoni 2014-03-05 18:50 ` Dmitry Torokhov 2014-03-05 18:50 ` Dmitry Torokhov 2014-03-16 18:16 ` Jonathan Cameron 2014-03-16 18:16 ` Jonathan Cameron 2014-03-16 19:16 ` Alexandre Belloni 2014-03-16 19:16 ` Alexandre Belloni 2014-03-16 19:16 ` Alexandre Belloni 2014-03-16 20:28 ` Jonathan Cameron 2014-03-16 20:28 ` Jonathan Cameron 2014-03-16 20:28 ` Jonathan Cameron 2014-03-05 17:35 ` [PATCH 05/15] ARM: at91: sam9m10g45ek: Add touchscreen support through at91_adc Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-16 18:18 ` Jonathan Cameron 2014-03-16 18:18 ` Jonathan Cameron 2014-03-16 20:00 ` Alexandre Belloni 2014-03-16 20:00 ` Alexandre Belloni 2014-03-16 20:00 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 06/15] iio: adc: at91: remove unused include from include/mach Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 07/15] iio: adc: at91: add sam9rl support Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 08/15] ARM: at91: sam9rl: add at91_adc to support adc and touchscreen Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 09/15] ARM: at91: sam9rlek add touchscreen support through at91_adc Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 10/15] ARM: at91: sam9g45: switch from atmel_tsadcc to at91_adc Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni [this message] 2014-03-05 17:35 ` [PATCH 11/15] ARM: at91: sam9rl: " Alexandre Belloni 2014-03-05 17:35 ` [PATCH 12/15] ARM: at91: remove atmel_tsadcc platform_data Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 13/15] ARM: at91: remove atmel_tsadcc from sama5_defconfig Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 17:35 ` [PATCH 14/15] Input: atmel_tsadcc: remove driver Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-05 18:46 ` Dmitry Torokhov 2014-03-05 18:46 ` Dmitry Torokhov 2014-03-16 18:26 ` Jonathan Cameron 2014-03-16 18:26 ` Jonathan Cameron 2014-03-16 19:26 ` Dmitry Torokhov 2014-03-16 19:26 ` Dmitry Torokhov 2014-03-16 19:26 ` Dmitry Torokhov 2014-03-05 17:35 ` [PATCH 15/15] ARM: at91/dt: at91-cosino_mega2560 remove useless tsadcc node Alexandre Belloni 2014-03-05 17:35 ` Alexandre Belloni 2014-03-16 18:30 ` [PATCH 00/15] iio: adc: at91 cleanups and atmel_tsadcc removal Jonathan Cameron 2014-03-16 18:30 ` Jonathan Cameron 2014-03-16 18:30 ` Jonathan Cameron 2014-03-16 19:29 ` Alexandre Belloni 2014-03-16 19:29 ` Alexandre Belloni 2014-03-19 10:19 ` Nicolas Ferre 2014-03-19 10:19 ` Nicolas Ferre 2014-03-19 10:19 ` Nicolas Ferre 2014-03-22 12:31 ` Jonathan Cameron 2014-03-22 12:31 ` Jonathan Cameron 2014-03-24 9:00 ` Nicolas Ferre 2014-03-24 9:00 ` Nicolas Ferre 2014-03-24 9:00 ` Nicolas Ferre
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1394040940-18246-12-git-send-email-alexandre.belloni@free-electrons.com \ --to=alexandre.belloni@free-electrons.com \ --cc=dmitry.torokhov@gmail.com \ --cc=gregory.clement@free-electrons.com \ --cc=jic23@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maxime.ripard@free-electrons.com \ --cc=nicolas.ferre@atmel.com \ --cc=plagnioj@jcrosoft.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.