aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2014-04-15 06:28:04 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-05-07 12:28:40 -0400
commit3fb07e86e4bb2bff8539f4df23fa6b63777367a1 (patch)
tree7d68f67a3dae55e80dbf23a6f31f0cdf0c142240 /arch/arm/mach-at91
parentb8ba9a40a77b8ededd2ebd2136864af779721b3a (diff)
ARM: at91: sam9rlek add touchscreen support through at91_adc
at91_adc now supports reading a touchscreen for ADCs without a TSMR register. Enable touchscreen support through at91_adc. This allows to use both a touchscreen and the remaining ADC channel at the same time. 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/board-sam9rlek.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 6b81e4671646..1db43e32e6c5 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -18,6 +18,7 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/input.h> 19#include <linux/input.h>
20#include <linux/gpio_keys.h> 20#include <linux/gpio_keys.h>
21#include <linux/platform_data/at91_adc.h>
21 22
22#include <video/atmel_lcdc.h> 23#include <video/atmel_lcdc.h>
23 24
@@ -240,6 +241,17 @@ static struct at91_tsadcc_data ek_tsadcc_data = {
240 241
241 242
242/* 243/*
244 * ADC + Touchscreen
245 */
246static struct at91_adc_data ek_adc_data = {
247 .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5),
248 .use_external_triggers = true,
249 .vref = 3300,
250 .touchscreen_type = ATMEL_ADC_TOUCHSCREEN_4WIRE,
251};
252
253
254/*
243 * GPIO Buttons 255 * GPIO Buttons
244 */ 256 */
245#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 257#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
@@ -313,6 +325,8 @@ static void __init ek_board_init(void)
313 at91_add_device_ac97(&ek_ac97_data); 325 at91_add_device_ac97(&ek_ac97_data);
314 /* Touch Screen Controller */ 326 /* Touch Screen Controller */
315 at91_add_device_tsadcc(&ek_tsadcc_data); 327 at91_add_device_tsadcc(&ek_tsadcc_data);
328 /* Touch Screen Controller + ADC */
329 at91_add_device_adc(&ek_adc_data);
316 /* LEDs */ 330 /* LEDs */
317 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); 331 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
318 /* Push Buttons */ 332 /* Push Buttons */