Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226515
b: refs/heads/master
c: da07c0c
h: refs/heads/master
i:
  226513: 248365e
  226511: 60256e9
v: v3
  • Loading branch information
Marc Zyngier authored and Tony Lindgren committed Dec 21, 2010
1 parent 69b9893 commit 05627df
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd303e1712e3ebdf174bb378bb8df851eac2701a
refs/heads/master: da07c0cff295d887427ad2519e452ee3c27e47ff
61 changes: 51 additions & 10 deletions trunk/arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/interrupt.h>

#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/i2c/twl.h>
#include <linux/mmc/host.h>

Expand Down Expand Up @@ -246,9 +247,8 @@ static inline void __init igep2_init_smsc911x(void)
static inline void __init igep2_init_smsc911x(void) { }
#endif

static struct regulator_consumer_supply igep2_vmmc1_supply = {
.supply = "vmmc",
};
static struct regulator_consumer_supply igep2_vmmc1_supply =
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");

/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
static struct regulator_init_data igep2_vmmc1 = {
Expand All @@ -265,6 +265,52 @@ static struct regulator_init_data igep2_vmmc1 = {
.consumer_supplies = &igep2_vmmc1_supply,
};

static struct regulator_consumer_supply igep2_vio_supply =
REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");

static struct regulator_init_data igep2_vio = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = 1,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &igep2_vio_supply,
};

static struct regulator_consumer_supply igep2_vmmc2_supply =
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");

static struct regulator_init_data igep2_vmmc2 = {
.constraints = {
.valid_modes_mask = REGULATOR_MODE_NORMAL,
.always_on = 1,
},
.num_consumer_supplies = 1,
.consumer_supplies = &igep2_vmmc2_supply,
};

static struct fixed_voltage_config igep2_vwlan = {
.supply_name = "vwlan",
.microvolts = 3300000,
.gpio = -EINVAL,
.enabled_at_boot = 1,
.init_data = &igep2_vmmc2,
};

static struct platform_device igep2_vwlan_device = {
.name = "reg-fixed-voltage",
.id = 0,
.dev = {
.platform_data = &igep2_vwlan,
},
};

static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
Expand Down Expand Up @@ -361,12 +407,6 @@ static int igep2_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);

/*
* link regulators to MMC adapters ... we "know" the
* regulators will be set up only *after* we return.
*/
igep2_vmmc1_supply.dev = mmc[0].dev;

/*
* REVISIT: need ehci-omap hooks for external VBUS
* power switch and overcurrent detect
Expand Down Expand Up @@ -478,6 +518,7 @@ static void __init igep2_display_init(void)

static struct platform_device *igep2_devices[] __initdata = {
&igep2_dss_device,
&igep2_vwlan_device,
};

static void __init igep2_init_irq(void)
Expand Down Expand Up @@ -505,7 +546,7 @@ static struct twl4030_platform_data igep2_twldata = {
.gpio = &igep2_twl4030_gpio_pdata,
.vmmc1 = &igep2_vmmc1,
.vpll2 = &igep2_vpll2,

.vio = &igep2_vio,
};

static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {
Expand Down

0 comments on commit 05627df

Please sign in to comment.