summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mmc-twl4030.c
diff options
context:
space:
mode:
authorDavid Brownell2009-03-24 02:23:47 +0100
committerTony Lindgren2009-03-24 02:51:22 +0100
commit01971f65ff88e3ebe2b6ae42b95d68e26b83718d (patch)
treef56acfdf414de33b48d487669e438f0b6568a516 /arch/arm/mach-omap2/mmc-twl4030.c
parentARM: OMAP3: mmc-twl4030 voltage cleanup (diff)
downloadkernel-qcow2-linux-01971f65ff88e3ebe2b6ae42b95d68e26b83718d.tar.gz
kernel-qcow2-linux-01971f65ff88e3ebe2b6ae42b95d68e26b83718d.tar.xz
kernel-qcow2-linux-01971f65ff88e3ebe2b6ae42b95d68e26b83718d.zip
ARM: OMAP3: mmc-twl4030 init passes device nodes back, v2
When setting up HSMMC devices, pass the device nodes back so board code can linking them to their power supply regulators. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mmc-twl4030.c')
-rw-r--r--arch/arm/mach-omap2/mmc-twl4030.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index df1539e2cd07..c67078db07be 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -17,6 +17,7 @@
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/i2c/twl4030.h>
+#include <linux/regulator/machine.h>
#include <mach/hardware.h>
#include <mach/control.h>
@@ -437,6 +438,15 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
}
omap2_init_mmc(hsmmc_data, OMAP34XX_NR_MMC);
+
+ /* pass the device nodes back to board setup code */
+ for (c = controllers; c->mmc; c++) {
+ struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1];
+
+ if (!c->mmc || c->mmc > nr_hsmmc)
+ continue;
+ c->dev = mmc->dev;
+ }
}
#endif