Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201400
b: refs/heads/master
c: 5e886f6
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Russell King committed Jun 16, 2010
1 parent fc580d7 commit 1f3d971
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f4c5e36e7cd26c9b5bf89d66caeee5fc3d75362
refs/heads/master: 5e886f68e5b1c0a62c64cbc3707304259ba46183
45 changes: 45 additions & 0 deletions trunk/arch/arm/mach-at91/board-sam9g20ek.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/clk.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/consumer.h>

#include <mach/hardware.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -269,6 +272,46 @@ static void __init ek_add_device_buttons(void)
static void __init ek_add_device_buttons(void) {}
#endif

#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"),
REGULATOR_SUPPLY("HPVDD", "0-001b"),
REGULATOR_SUPPLY("DBVDD", "0-001b"),
REGULATOR_SUPPLY("DCVDD", "0-001b"),
};

static struct regulator_init_data ek_avdd_reg_init_data = {
.constraints = {
.name = "3V3",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.consumer_supplies = ek_audio_consumer_supplies,
.num_consumer_supplies = ARRAY_SIZE(ek_audio_consumer_supplies),
};

static struct fixed_voltage_config ek_vdd_pdata = {
.supply_name = "board-3V3",
.microvolts = 3300000,
.gpio = -EINVAL,
.enabled_at_boot = 0,
.init_data = &ek_avdd_reg_init_data,
};
static struct platform_device ek_voltage_regulator = {
.name = "reg-fixed-voltage",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &ek_vdd_pdata,
},
};
static void __init ek_add_regulators(void)
{
platform_device_register(&ek_voltage_regulator);
}
#else
static void __init ek_add_regulators(void) {}
#endif


static struct i2c_board_info __initdata ek_i2c_devices[] = {
{
Expand All @@ -294,6 +337,8 @@ static void __init ek_board_init(void)
ek_add_device_nand();
/* Ethernet */
at91_add_device_eth(&ek_macb_data);
/* Regulators */
ek_add_regulators();
/* MMC */
at91_add_device_mmc(0, &ek_mmc_data);
/* I2C */
Expand Down

0 comments on commit 1f3d971

Please sign in to comment.