aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9g20ek.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2012-05-11 09:35:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 16:25:33 -0400
commit67b5d7b3e2ce01c091c8adb120b9fffcb2dddc0a (patch)
treee2c6026fc0bb6f74454373849725978a38d9f829 /arch/arm/mach-at91/board-sam9g20ek.c
parent0e589d5fb3172b0dde7fdad3a4829ce5352dd30d (diff)
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.c14
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 @@
32#include <linux/regulator/fixed.h> 32#include <linux/regulator/fixed.h>
33#include <linux/regulator/consumer.h> 33#include <linux/regulator/consumer.h>
34 34
35#include <linux/platform_data/at91_adc.h>
36
35#include <mach/hardware.h> 37#include <mach/hardware.h>
36#include <asm/setup.h> 38#include <asm/setup.h>
37#include <asm/mach-types.h> 39#include <asm/mach-types.h>
@@ -318,6 +320,16 @@ static void __init ek_add_device_buttons(void)
318static void __init ek_add_device_buttons(void) {} 320static void __init ek_add_device_buttons(void) {}
319#endif 321#endif
320 322
323/*
324 * ADCs
325 */
326
327static struct at91_adc_data ek_adc_data = {
328 .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3),
329 .use_external_triggers = true,
330 .vref = 3300,
331};
332
321#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 333#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
322static struct regulator_consumer_supply ek_audio_consumer_supplies[] = { 334static struct regulator_consumer_supply ek_audio_consumer_supplies[] = {
323 REGULATOR_SUPPLY("AVDD", "0-001b"), 335 REGULATOR_SUPPLY("AVDD", "0-001b"),
@@ -393,6 +405,8 @@ static void __init ek_board_init(void)
393 ek_add_device_gpio_leds(); 405 ek_add_device_gpio_leds();
394 /* Push Buttons */ 406 /* Push Buttons */
395 ek_add_device_buttons(); 407 ek_add_device_buttons();
408 /* ADCs */
409 at91_add_device_adc(&ek_adc_data);
396 /* PCK0 provides MCLK to the WM8731 */ 410 /* PCK0 provides MCLK to the WM8731 */
397 at91_set_B_periph(AT91_PIN_PC1, 0); 411 at91_set_B_periph(AT91_PIN_PC1, 0);
398 /* SSC (for WM8731) */ 412 /* SSC (for WM8731) */