aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9g20ek.c
diff options
context:
space:
mode:
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 3d615532ae5c..6860d3451100 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>
@@ -304,6 +306,16 @@ static void __init ek_add_device_buttons(void)
304static void __init ek_add_device_buttons(void) {} 306static void __init ek_add_device_buttons(void) {}
305#endif 307#endif
306 308
309/*
310 * ADCs
311 */
312
313static struct at91_adc_data ek_adc_data = {
314 .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3),
315 .use_external_triggers = true,
316 .vref = 3300,
317};
318
307#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 319#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
308static struct regulator_consumer_supply ek_audio_consumer_supplies[] = { 320static struct regulator_consumer_supply ek_audio_consumer_supplies[] = {
309 REGULATOR_SUPPLY("AVDD", "0-001b"), 321 REGULATOR_SUPPLY("AVDD", "0-001b"),
@@ -389,6 +401,8 @@ static void __init ek_board_init(void)
389 ek_add_device_gpio_leds(); 401 ek_add_device_gpio_leds();
390 /* Push Buttons */ 402 /* Push Buttons */
391 ek_add_device_buttons(); 403 ek_add_device_buttons();
404 /* ADCs */
405 at91_add_device_adc(&ek_adc_data);
392 /* PCK0 provides MCLK to the WM8731 */ 406 /* PCK0 provides MCLK to the WM8731 */
393 at91_set_B_periph(AT91_PIN_PC1, 0); 407 at91_set_B_periph(AT91_PIN_PC1, 0);
394 /* SSC (for WM8731) */ 408 /* SSC (for WM8731) */