]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
beagle regulator updates
authorDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 20 Jan 2009 10:53:10 +0000 (02:53 -0800)
committerTony Lindgren <tony@atomide.com>
Wed, 4 Feb 2009 19:22:14 +0000 (11:22 -0800)
For Beagle, link two regulators to the MMC-1 host adapter.

Note:  when MMC1 is used in 8 bit mode (e.g. for an MMCplus card)
DAT4..DAT7 I/O uses a separate supply (VSIM).  But MMC_BUS_WIDTH_8
support isn't yet merged into the MMC framework.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-omap3beagle.c

index 48cfae91509270c77d3909a1d95abd1a5c17ed97..64c76bd145f63d075b7d033907b7468f55fc2cf3 100644 (file)
@@ -127,6 +127,14 @@ static struct twl4030_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
+static struct regulator_consumer_supply beagle_vmmc1_supply = {
+       .supply                 = "vmmc",
+};
+
+static struct regulator_consumer_supply beagle_vsim_supply = {
+       .supply                 = "vmmc_dat4..7",
+};
+
 static struct gpio_led gpio_leds[];
 
 static int beagle_twl_gpio_setup(struct device *dev,
@@ -137,6 +145,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        twl4030_mmc_init(mmc);
 
+       /* link regulators to MMC adapters */
+       beagle_vmmc1_supply.dev = mmc[0].dev;
+       beagle_vsim_supply.dev = mmc[0].dev;
+
        /* REVISIT: need ehci-omap hooks for external VBUS
         * power switch and overcurrent detect
         */
@@ -174,6 +186,8 @@ static struct regulator_init_data beagle_vmmc1 = {
                                | REGULATOR_CHANGE_MODE
                                | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &beagle_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -185,6 +199,8 @@ static struct regulator_init_data beagle_vsim = {
                                | REGULATOR_CHANGE_MODE
                                | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &beagle_vsim_supply,
 };
 
 /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */