aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-zoom-peripherals.c
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2010-09-15 19:32:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-21 11:05:01 -0400
commitb642fde7f137566c993991fd2e7bf6b8274bf625 (patch)
treec864b56cb5d81d659ad901898adabee992981139 /arch/arm/mach-omap2/board-zoom-peripherals.c
parent15cea99306ae14ce5f7c3d3989bcc17202e2b0be (diff)
omap: zoom: add fixed regulator device for wlan
Add a fixed regulator vmmc device to enable power control of the wl1271 wlan device. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 6b3984964cc5..f5df9a2b1465 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -16,6 +16,7 @@
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/i2c/twl.h> 17#include <linux/i2c/twl.h>
18#include <linux/regulator/machine.h> 18#include <linux/regulator/machine.h>
19#include <linux/regulator/fixed.h>
19 20
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
@@ -27,6 +28,8 @@
27#include "mux.h" 28#include "mux.h"
28#include "hsmmc.h" 29#include "hsmmc.h"
29 30
31#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
32
30/* Zoom2 has Qwerty keyboard*/ 33/* Zoom2 has Qwerty keyboard*/
31static int board_keymap[] = { 34static int board_keymap[] = {
32 KEY(0, 0, KEY_E), 35 KEY(0, 0, KEY_E),
@@ -106,6 +109,11 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
106 .supply = "vmmc", 109 .supply = "vmmc",
107}; 110};
108 111
112static struct regulator_consumer_supply zoom_vmmc3_supply = {
113 .supply = "vmmc",
114 .dev_name = "mmci-omap-hs.2",
115};
116
109/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ 117/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
110static struct regulator_init_data zoom_vmmc1 = { 118static struct regulator_init_data zoom_vmmc1 = {
111 .constraints = { 119 .constraints = {
@@ -151,6 +159,32 @@ static struct regulator_init_data zoom_vsim = {
151 .consumer_supplies = &zoom_vsim_supply, 159 .consumer_supplies = &zoom_vsim_supply,
152}; 160};
153 161
162static struct regulator_init_data zoom_vmmc3 = {
163 .constraints = {
164 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
165 },
166 .num_consumer_supplies = 1,
167 .consumer_supplies = &zoom_vmmc3_supply,
168};
169
170static struct fixed_voltage_config zoom_vwlan = {
171 .supply_name = "vwl1271",
172 .microvolts = 1800000, /* 1.8V */
173 .gpio = OMAP_ZOOM_WLAN_PMENA_GPIO,
174 .startup_delay = 70000, /* 70msec */
175 .enable_high = 1,
176 .enabled_at_boot = 0,
177 .init_data = &zoom_vmmc3,
178};
179
180static struct platform_device omap_vwlan_device = {
181 .name = "reg-fixed-voltage",
182 .id = 1,
183 .dev = {
184 .platform_data = &zoom_vwlan,
185 },
186};
187
154static struct omap2_hsmmc_info mmc[] __initdata = { 188static struct omap2_hsmmc_info mmc[] __initdata = {
155 { 189 {
156 .name = "external", 190 .name = "external",
@@ -280,6 +314,7 @@ static void enable_board_wakeup_source(void)
280void __init zoom_peripherals_init(void) 314void __init zoom_peripherals_init(void)
281{ 315{
282 omap_i2c_init(); 316 omap_i2c_init();
317 platform_device_register(&omap_vwlan_device);
283 usb_musb_init(&musb_board_data); 318 usb_musb_init(&musb_board_data);
284 enable_board_wakeup_source(); 319 enable_board_wakeup_source();
285} 320}