public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] Fix IGEPv2 second MMC channel power supply
@ 2010-11-14 11:34 Marc Zyngier
  2010-11-14 14:25 ` Sergei Shtylyov
  2010-11-14 15:14 ` Felipe Balbi
  0 siblings, 2 replies; 7+ messages in thread
From: Marc Zyngier @ 2010-11-14 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

Commit 72f381ba056 removed an unused regulator entry, but left
the second MMC channel (used by the Libertas WLAN mudule) without
link to power regulator. This causes the SDIO module to fail being
detected.

This patch adds a second supply to the existing MMC1 regulator,
and let MMC2 hang off it. With that patch, the second channel is
properly detected.

Tested on an IGEPv2 Rev-B.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
---
Note that this doesn't fix WLAN itself on 2.6.37-rc1...

 arch/arm/mach-omap2/board-igep0020.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 5e035a5..b66d114 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -257,8 +257,9 @@ static inline void __init igep2_init_smsc911x(void) { }
 static struct omap_board_config_kernel igep2_config[] __initdata = {
 };
 
-static struct regulator_consumer_supply igep2_vmmc1_supply = {
-	.supply		= "vmmc",
+static struct regulator_consumer_supply igep2_vmmc1_supplies[] = {
+	[0] = { .supply		= "vmmc", },
+	[1] = { .supply		= "vmmc", },
 };
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
@@ -272,8 +273,8 @@ static struct regulator_init_data igep2_vmmc1 = {
 					| REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
-	.num_consumer_supplies  = 1,
-	.consumer_supplies      = &igep2_vmmc1_supply,
+	.num_consumer_supplies  = 2,
+	.consumer_supplies      = igep2_vmmc1_supplies,
 };
 
 static struct omap2_hsmmc_info mmc[] = {
@@ -376,7 +377,8 @@ static int igep2_twl_gpio_setup(struct device *dev,
 	 * link regulators to MMC adapters ... we "know" the
 	 * regulators will be set up only *after* we return.
 	 */
-	igep2_vmmc1_supply.dev = mmc[0].dev;
+	igep2_vmmc1_supplies[0].dev = mmc[0].dev;
+	igep2_vmmc1_supplies[1].dev = mmc[1].dev;
 
 	/*
 	 * REVISIT: need ehci-omap hooks for external VBUS
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-16  9:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-14 11:34 [PATCH] Fix IGEPv2 second MMC channel power supply Marc Zyngier
2010-11-14 14:25 ` Sergei Shtylyov
2010-11-14 15:14 ` Felipe Balbi
2010-11-14 18:11   ` Enric Balletbò i Serra
2010-11-14 18:52     ` Marc Zyngier
2010-11-15  8:32       ` Enric Balletbò i Serra
2010-11-16  9:20         ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox