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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
0e589d5fb3
commit
67b5d7b3e2
@@ -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) */
|
||||
|
Reference in New Issue
Block a user