diff options
author | Panduranga Mallireddy <panduranga_mallireddy@ti.com> | 2011-02-15 03:40:34 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-02-22 11:37:03 -0500 |
commit | edc840613c0fff590cad2deafdeffe6ea51405f7 (patch) | |
tree | 7a176aacbea77c8dd420764b2304b3c2e0e08a69 /arch/arm/mach-omap2 | |
parent | cdc43482713d0af97d30d9b5d3c53b18fcec5d35 (diff) |
omap: panda: add fixed regulator device for wlan
Add a fixed regulator vmmc device to enable power control
of the wl1271 wlan device.
Based on the patch for zoom by Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 9f4f86e73cea..d56bef15d3c5 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/usb/otg.h> | 26 | #include <linux/usb/otg.h> |
27 | #include <linux/i2c/twl.h> | 27 | #include <linux/i2c/twl.h> |
28 | #include <linux/regulator/machine.h> | 28 | #include <linux/regulator/machine.h> |
29 | #include <linux/regulator/fixed.h> | ||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <mach/omap4-common.h> | 32 | #include <mach/omap4-common.h> |
@@ -45,6 +46,7 @@ | |||
45 | 46 | ||
46 | #define GPIO_HUB_POWER 1 | 47 | #define GPIO_HUB_POWER 1 |
47 | #define GPIO_HUB_NRESET 62 | 48 | #define GPIO_HUB_NRESET 62 |
49 | #define GPIO_WIFI_PMENA 43 | ||
48 | 50 | ||
49 | static struct gpio_led gpio_leds[] = { | 51 | static struct gpio_led gpio_leds[] = { |
50 | { | 52 | { |
@@ -171,6 +173,37 @@ static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | |||
171 | }, | 173 | }, |
172 | }; | 174 | }; |
173 | 175 | ||
176 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { | ||
177 | .supply = "vmmc", | ||
178 | .dev_name = "mmci-omap-hs.4", | ||
179 | }; | ||
180 | |||
181 | static struct regulator_init_data panda_vmmc5 = { | ||
182 | .constraints = { | ||
183 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
184 | }, | ||
185 | .num_consumer_supplies = 1, | ||
186 | .consumer_supplies = &omap4_panda_vmmc5_supply, | ||
187 | }; | ||
188 | |||
189 | static struct fixed_voltage_config panda_vwlan = { | ||
190 | .supply_name = "vwl1271", | ||
191 | .microvolts = 1800000, /* 1.8V */ | ||
192 | .gpio = GPIO_WIFI_PMENA, | ||
193 | .startup_delay = 70000, /* 70msec */ | ||
194 | .enable_high = 1, | ||
195 | .enabled_at_boot = 0, | ||
196 | .init_data = &panda_vmmc5, | ||
197 | }; | ||
198 | |||
199 | static struct platform_device omap_vwlan_device = { | ||
200 | .name = "reg-fixed-voltage", | ||
201 | .id = 1, | ||
202 | .dev = { | ||
203 | .platform_data = &panda_vwlan, | ||
204 | }, | ||
205 | }; | ||
206 | |||
174 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 207 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
175 | { | 208 | { |
176 | int ret = 0; | 209 | int ret = 0; |
@@ -416,6 +449,7 @@ static void __init omap4_panda_init(void) | |||
416 | 449 | ||
417 | omap4_panda_i2c_init(); | 450 | omap4_panda_i2c_init(); |
418 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 451 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
452 | platform_device_register(&omap_vwlan_device); | ||
419 | omap_serial_init(); | 453 | omap_serial_init(); |
420 | omap4_twl6030_hsmmc_init(mmc); | 454 | omap4_twl6030_hsmmc_init(mmc); |
421 | omap4_ehci_init(); | 455 | omap4_ehci_init(); |