public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: OMAP <linux-omap@vger.kernel.org>
Subject: [patch 2.6.29-rc2-omap1-git 6/7] beagle regulator updates
Date: Tue, 20 Jan 2009 02:53:10 -0800	[thread overview]
Message-ID: <200901200253.10350.david-b@pacbell.net> (raw)
In-Reply-To: <200901200244.36238.david-b@pacbell.net>

From: David Brownell <dbrownell@users.sourceforge.net>

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>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -126,6 +126,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,
@@ -136,6 +144,10 @@ static int beagle_twl_gpio_setup(struct 
 	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
 	 */
@@ -173,6 +185,8 @@ static struct regulator_init_data beagle
 				| 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) */
@@ -184,6 +198,8 @@ static struct regulator_init_data beagle
 				| 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) */

  parent reply	other threads:[~2009-01-20 11:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20 10:44 [patch 2.6.29-rc2-omap1-git 0/7] regulator and MMC updates David Brownell
2009-01-20 10:45 ` [patch 2.6.29-rc2-omap1-git 1/7] regulator get_status() David Brownell
2009-01-20 10:48 ` [patch 2.6.29-rc2-omap1-git 2/7] twl4030 regulator uses new get_status() op David Brownell
2009-01-20 10:49 ` [patch 2.6.29-rc2-omap1-git 3/7] 3430SDP init updates David Brownell
2009-01-20 10:51 ` [patch 2.6.29-rc2-omap1-git 4/7] minor overo init update David Brownell
2009-01-20 10:52 ` [patch 2.6.29-rc2-omap1-git 5/7] hsmmc init passes device nodes back David Brownell
2009-01-20 10:53 ` David Brownell [this message]
2009-01-20 10:54 ` [patch 2.6.29-rc2-omap1-git 7/7] 3430SDP regulator updates David Brownell
2009-02-04 19:27 ` [patch 2.6.29-rc2-omap1-git 0/7] regulator and MMC updates Tony Lindgren
2009-02-04 23:20   ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901200253.10350.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox