diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 118c6f53c5eb..8495f82fcbab 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -105,21 +105,20 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = { | |||
105 | .rep = 1, | 105 | .rep = 1, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static struct regulator_consumer_supply zoom_vmmc1_supply = { | 108 | static struct regulator_consumer_supply zoom_vmmc1_supply[] = { |
109 | .supply = "vmmc", | 109 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static struct regulator_consumer_supply zoom_vsim_supply = { | 112 | static struct regulator_consumer_supply zoom_vsim_supply[] = { |
113 | .supply = "vmmc_aux", | 113 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static struct regulator_consumer_supply zoom_vmmc2_supply = { | 116 | static struct regulator_consumer_supply zoom_vmmc2_supply[] = { |
117 | .supply = "vmmc", | 117 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
118 | }; | 118 | }; |
119 | 119 | ||
120 | static struct regulator_consumer_supply zoom_vmmc3_supply = { | 120 | static struct regulator_consumer_supply zoom_vmmc3_supply[] = { |
121 | .supply = "vmmc", | 121 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), |
122 | .dev_name = "omap_hsmmc.2", | ||
123 | }; | 122 | }; |
124 | 123 | ||
125 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 124 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
@@ -133,8 +132,8 @@ static struct regulator_init_data zoom_vmmc1 = { | |||
133 | | REGULATOR_CHANGE_MODE | 132 | | REGULATOR_CHANGE_MODE |
134 | | REGULATOR_CHANGE_STATUS, | 133 | | REGULATOR_CHANGE_STATUS, |
135 | }, | 134 | }, |
136 | .num_consumer_supplies = 1, | 135 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc1_supply), |
137 | .consumer_supplies = &zoom_vmmc1_supply, | 136 | .consumer_supplies = zoom_vmmc1_supply, |
138 | }; | 137 | }; |
139 | 138 | ||
140 | /* VMMC2 for MMC2 card */ | 139 | /* VMMC2 for MMC2 card */ |
@@ -148,8 +147,8 @@ static struct regulator_init_data zoom_vmmc2 = { | |||
148 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 147 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
149 | | REGULATOR_CHANGE_STATUS, | 148 | | REGULATOR_CHANGE_STATUS, |
150 | }, | 149 | }, |
151 | .num_consumer_supplies = 1, | 150 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc2_supply), |
152 | .consumer_supplies = &zoom_vmmc2_supply, | 151 | .consumer_supplies = zoom_vmmc2_supply, |
153 | }; | 152 | }; |
154 | 153 | ||
155 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ | 154 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ |
@@ -163,16 +162,16 @@ static struct regulator_init_data zoom_vsim = { | |||
163 | | REGULATOR_CHANGE_MODE | 162 | | REGULATOR_CHANGE_MODE |
164 | | REGULATOR_CHANGE_STATUS, | 163 | | REGULATOR_CHANGE_STATUS, |
165 | }, | 164 | }, |
166 | .num_consumer_supplies = 1, | 165 | .num_consumer_supplies = ARRAY_SIZE(zoom_vsim_supply), |
167 | .consumer_supplies = &zoom_vsim_supply, | 166 | .consumer_supplies = zoom_vsim_supply, |
168 | }; | 167 | }; |
169 | 168 | ||
170 | static struct regulator_init_data zoom_vmmc3 = { | 169 | static struct regulator_init_data zoom_vmmc3 = { |
171 | .constraints = { | 170 | .constraints = { |
172 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 171 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
173 | }, | 172 | }, |
174 | .num_consumer_supplies = 1, | 173 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc3_supply), |
175 | .consumer_supplies = &zoom_vmmc3_supply, | 174 | .consumer_supplies = zoom_vmmc3_supply, |
176 | }; | 175 | }; |
177 | 176 | ||
178 | static struct fixed_voltage_config zoom_vwlan = { | 177 | static struct fixed_voltage_config zoom_vwlan = { |
@@ -232,8 +231,9 @@ static struct regulator_consumer_supply zoom_vpll2_supplies[] = { | |||
232 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | 231 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), |
233 | }; | 232 | }; |
234 | 233 | ||
235 | static struct regulator_consumer_supply zoom_vdda_dac_supply = | 234 | static struct regulator_consumer_supply zoom_vdda_dac_supply[] = { |
236 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | 235 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), |
236 | }; | ||
237 | 237 | ||
238 | static struct regulator_init_data zoom_vpll2 = { | 238 | static struct regulator_init_data zoom_vpll2 = { |
239 | .constraints = { | 239 | .constraints = { |
@@ -257,8 +257,8 @@ static struct regulator_init_data zoom_vdac = { | |||
257 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 257 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
258 | | REGULATOR_CHANGE_STATUS, | 258 | | REGULATOR_CHANGE_STATUS, |
259 | }, | 259 | }, |
260 | .num_consumer_supplies = 1, | 260 | .num_consumer_supplies = ARRAY_SIZE(zoom_vdda_dac_supply), |
261 | .consumer_supplies = &zoom_vdda_dac_supply, | 261 | .consumer_supplies = zoom_vdda_dac_supply, |
262 | }; | 262 | }; |
263 | 263 | ||
264 | static int zoom_twl_gpio_setup(struct device *dev, | 264 | static int zoom_twl_gpio_setup(struct device *dev, |
@@ -270,13 +270,6 @@ static int zoom_twl_gpio_setup(struct device *dev, | |||
270 | mmc[0].gpio_cd = gpio + 0; | 270 | mmc[0].gpio_cd = gpio + 0; |
271 | omap2_hsmmc_init(mmc); | 271 | omap2_hsmmc_init(mmc); |
272 | 272 | ||
273 | /* link regulators to MMC adapters ... we "know" the | ||
274 | * regulators will be set up only *after* we return. | ||
275 | */ | ||
276 | zoom_vmmc1_supply.dev = mmc[0].dev; | ||
277 | zoom_vsim_supply.dev = mmc[0].dev; | ||
278 | zoom_vmmc2_supply.dev = mmc[1].dev; | ||
279 | |||
280 | ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, | 273 | ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, |
281 | "lcd enable"); | 274 | "lcd enable"); |
282 | if (ret) | 275 | if (ret) |