Commit 3fb07e86 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Nicolas Ferre

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: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent b8ba9a40
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/platform_data/at91_adc.h>
#include <video/atmel_lcdc.h> #include <video/atmel_lcdc.h>
...@@ -239,6 +240,17 @@ static struct at91_tsadcc_data ek_tsadcc_data = { ...@@ -239,6 +240,17 @@ static struct at91_tsadcc_data ek_tsadcc_data = {
}; };
/*
* ADC + Touchscreen
*/
static struct at91_adc_data ek_adc_data = {
.channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5),
.use_external_triggers = true,
.vref = 3300,
.touchscreen_type = ATMEL_ADC_TOUCHSCREEN_4WIRE,
};
/* /*
* GPIO Buttons * GPIO Buttons
*/ */
...@@ -313,6 +325,8 @@ static void __init ek_board_init(void) ...@@ -313,6 +325,8 @@ static void __init ek_board_init(void)
at91_add_device_ac97(&ek_ac97_data); at91_add_device_ac97(&ek_ac97_data);
/* Touch Screen Controller */ /* Touch Screen Controller */
at91_add_device_tsadcc(&ek_tsadcc_data); at91_add_device_tsadcc(&ek_tsadcc_data);
/* Touch Screen Controller + ADC */
at91_add_device_adc(&ek_adc_data);
/* LEDs */ /* LEDs */
at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
/* Push Buttons */ /* Push Buttons */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment