diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2012-05-11 15:35:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-14 13:25:33 -0700 |
commit | 67b5d7b3e2ce01c091c8adb120b9fffcb2dddc0a (patch) | |
tree | e2c6026fc0bb6f74454373849725978a38d9f829 /arch/arm/mach-at91/board-sam9g20ek.c | |
parent | 0e589d5fb3172b0dde7fdad3a4829ce5352dd30d (diff) | |
download | talos-obmc-linux-67b5d7b3e2ce01c091c8adb120b9fffcb2dddc0a.tar.gz talos-obmc-linux-67b5d7b3e2ce01c091c8adb120b9fffcb2dddc0a.zip |
ARM: AT91: Add the ADC to the sam9g20ek board
This patch adds platform data for the AT91 ADC driver support for
the AT91SAM9G20-EK board.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mach-at91/board-sam9g20ek.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9g20ek.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 8923ec9f5831..291b0fe9172f 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c @@ -32,6 +32,8 @@ #include <linux/regulator/fixed.h> #include <linux/regulator/consumer.h> +#include <linux/platform_data/at91_adc.h> + #include <mach/hardware.h> #include <asm/setup.h> #include <asm/mach-types.h> @@ -318,6 +320,16 @@ static void __init ek_add_device_buttons(void) static void __init ek_add_device_buttons(void) {} #endif +/* + * ADCs + */ + +static struct at91_adc_data ek_adc_data = { + .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3), + .use_external_triggers = true, + .vref = 3300, +}; + #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) static struct regulator_consumer_supply ek_audio_consumer_supplies[] = { REGULATOR_SUPPLY("AVDD", "0-001b"), @@ -393,6 +405,8 @@ static void __init ek_board_init(void) ek_add_device_gpio_leds(); /* Push Buttons */ ek_add_device_buttons(); + /* ADCs */ + at91_add_device_adc(&ek_adc_data); /* PCK0 provides MCLK to the WM8731 */ at91_set_B_periph(AT91_PIN_PC1, 0); /* SSC (for WM8731) */ |