]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-3430sdp.c
OMAP3430SDP: Get rid of checkpatch.pl warnings with includes
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-3430sdp.c
index 035a7244fd1032cfb3ad69e9adea9be4554271da..867f5f679bf779cc0e311c2209765764fffaa9b0 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
 #include <linux/regulator/machine.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <mach/gpio.h>
 #include <mach/mux.h>
 #include <mach/board.h>
-#include <mach/usb-musb.h>
-#include <mach/usb-ehci.h>
+#include <mach/usb.h>
 #include <mach/common.h>
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 
-#include <asm/io.h>
-#include <asm/delay.h>
 #include <mach/control.h>
 
 #include "sdram-qimonda-hyb18m512160af-6.h"
@@ -332,6 +330,18 @@ static struct twl4030_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
+static struct regulator_consumer_supply sdp3430_vmmc1_supply = {
+       .supply                 = "vmmc",
+};
+
+static struct regulator_consumer_supply sdp3430_vsim_supply = {
+       .supply                 = "vmmc_dat4..7",
+};
+
+static struct regulator_consumer_supply sdp3430_vmmc2_supply = {
+       .supply                 = "vmmc",
+};
+
 static int sdp3430_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
@@ -342,6 +352,13 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
        mmc[1].gpio_cd = gpio + 1;
        twl4030_mmc_init(mmc);
 
+       /* link regulators to MMC adapters ... we "know" the
+        * regulators will be set up only *after* we return.
+        */
+       sdp3430_vmmc1_supply.dev = mmc[0].dev;
+       sdp3430_vsim_supply.dev = mmc[0].dev;
+       sdp3430_vmmc2_supply.dev = mmc[1].dev;
+
        /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
        gpio_request(gpio + 7, "sub_lcd_en_bkl");
        gpio_direction_output(gpio + 7, 0);
@@ -517,6 +534,8 @@ static struct regulator_init_data sdp3430_vmmc1 = {
                                | REGULATOR_CHANGE_MODE
                                | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &sdp3430_vmmc1_supply,
 };
 
 /* VMMC2 for MMC2 card */
@@ -530,6 +549,8 @@ static struct regulator_init_data sdp3430_vmmc2 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &sdp3430_vmmc2_supply,
 };
 
 /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
@@ -541,6 +562,8 @@ static struct regulator_init_data sdp3430_vsim = {
                                | REGULATOR_CHANGE_MODE
                                | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &sdp3430_vsim_supply,
 };
 
 /* VDAC for DSS driving S-Video */
@@ -599,8 +622,6 @@ static int __init omap3430_i2c_init(void)
        return 0;
 }
 
-extern void __init sdp3430_flash_init(void);
-
 static void __init omap_3430sdp_init(void)
 {
        omap3430_i2c_init();