Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231116
b: refs/heads/master
c: a271c6c
h: refs/heads/master
v: v3
  • Loading branch information
Enric Balletbo i Serra authored and Tony Lindgren committed Jan 10, 2011
1 parent 9060d3c commit 48b19b2
Show file tree
Hide file tree
Showing 2 changed files with 56 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: 7b0d4b71f5b17f22914bc6b2e36c4cd7cdc56a28
refs/heads/master: a271c6cd209674118e5ec221de922bc59c0c9454
65 changes: 55 additions & 10 deletions trunk/arch/arm/mach-omap2/board-igep0030.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 @@ -140,9 +141,8 @@ static void __init igep3_flash_init(void)
static void __init igep3_flash_init(void) {}
#endif

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

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

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

static struct regulator_init_data igep3_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 = &igep3_vio_supply,
};

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

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

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

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

static struct omap2_hsmmc_info mmc[] = {
[0] = {
.mmc = 1,
Expand Down Expand Up @@ -254,12 +300,6 @@ static int igep3_twl4030_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.
*/
igep3_vmmc1_supply.dev = mmc[0].dev;

/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0)
Expand Down Expand Up @@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};

static struct platform_device *igep3_devices[] __initdata = {
&igep3_vwlan_device,
};

static void __init igep3_init_irq(void)
{
omap2_init_common_infrastructure();
Expand All @@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = {
.usb = &igep3_twl4030_usb_data,
.gpio = &igep3_twl4030_gpio_pdata,
.vmmc1 = &igep3_vmmc1,
.vio = &igep3_vio,
};

static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = {
Expand Down Expand Up @@ -387,7 +432,7 @@ static void __init igep3_init(void)

/* Register I2C busses and drivers */
igep3_i2c_init();

platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices));
omap_serial_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);
Expand Down

0 comments on commit 48b19b2

Please sign in to comment.