All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Sakoman <sakoman@gmail.com>
To: OMAP <linux-omap@vger.kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Subject: Re: [patch 2.6.29-rc7-omap-git] Overo: MMC regulator configuration (V2)
Date: Sun, 15 Mar 2009 21:37:03 -0700	[thread overview]
Message-ID: <5e088bd90903152137k53302823n53419f63c6aab892@mail.gmail.com> (raw)

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

This patch hooks up the twl4030 MMC1 regulator on Overo,
The WLAN chip connected to MMC2 on some board versions
has a dedicated regulator.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
Patches still needed for LDP/Zoom and Pandora...

--- a/arch/arm/mach-omap2/board-overo.c	2009-03-14 21:03:05.000000000 -0700
+++ b/arch/arm/mach-omap2/board-overo.c	2009-03-15 20:38:07.000000000 -0700
@@ -267,10 +267,43 @@ static struct omap_uart_config overo_uar
 	.enabled_uarts	= ((1 << 0) | (1 << 1) | (1 << 2)),
 };

+static struct twl4030_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.wires		= 4,
+		.gpio_cd	= -EINVAL,
+		.gpio_wp	= -EINVAL,
+	},
+	{
+		.mmc		= 2,
+		.wires		= 4,
+		.gpio_cd	= -EINVAL,
+		.gpio_wp	= -EINVAL,
+		.transceiver	= true,
+		.ocr_mask	= 0x00100000,	/* 3.3V */
+	},
+	{}	/* Terminator */
+};
+
+static struct regulator_consumer_supply overo_vmmc1_supply = {
+	.supply			= "vmmc",
+};
+
+static int overo_twl_gpio_setup(struct device *dev,
+		unsigned gpio, unsigned ngpio)
+{
+	twl4030_mmc_init(mmc);
+
+	overo_vmmc1_supply.dev = mmc[0].dev;
+
+	return 0;
+}
+
 static struct twl4030_gpio_platform_data overo_gpio_data = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
+	.setup		= overo_twl_gpio_setup,
 };

 static struct twl4030_usb_data overo_usb_data = {
@@ -287,6 +320,8 @@ static struct regulator_init_data overo_
 					| REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &overo_vmmc1_supply,
 };

 /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
@@ -343,23 +378,6 @@ static struct platform_device *overo_dev
 	&overo_lcd_device,
 };

-static struct twl4030_hsmmc_info mmc[] __initdata = {
-	{
-		.mmc		= 1,
-		.wires		= 4,
-		.gpio_cd	= -EINVAL,
-		.gpio_wp	= -EINVAL,
-	},
-	{
-		.mmc		= 2,
-		.wires		= 4,
-		.gpio_cd	= -EINVAL,
-		.gpio_wp	= -EINVAL,
-		.transceiver	= true,
-	},
-	{}	/* Terminator */
-};
-
 static void __init overo_init(void)
 {
 	overo_i2c_init();
@@ -367,7 +385,6 @@ static void __init overo_init(void)
 	omap_board_config = overo_config;
 	omap_board_config_size = ARRAY_SIZE(overo_config);
 	omap_serial_init();
-	twl4030_mmc_init(mmc);
 	usb_musb_init();
 	usb_ehci_init();
 	overo_flash_init();

             reply	other threads:[~2009-03-16  4:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16  4:37 Steve Sakoman [this message]
2009-03-20 19:12 ` [APPLIED] [patch 2.6.29-rc7-omap-git] Overo: MMC regulator configuration Tony Lindgren

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=5e088bd90903152137k53302823n53419f63c6aab892@mail.gmail.com \
    --to=sakoman@gmail.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.