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>
This commit is contained in:
parent
15cea99306
commit
b642fde7f1
1 changed files with 35 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/i2c/twl.h>
|
#include <linux/i2c/twl.h>
|
||||||
#include <linux/regulator/machine.h>
|
#include <linux/regulator/machine.h>
|
||||||
|
#include <linux/regulator/fixed.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
@ -27,6 +28,8 @@
|
||||||
#include "mux.h"
|
#include "mux.h"
|
||||||
#include "hsmmc.h"
|
#include "hsmmc.h"
|
||||||
|
|
||||||
|
#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
|
||||||
|
|
||||||
/* Zoom2 has Qwerty keyboard*/
|
/* Zoom2 has Qwerty keyboard*/
|
||||||
static int board_keymap[] = {
|
static int board_keymap[] = {
|
||||||
KEY(0, 0, KEY_E),
|
KEY(0, 0, KEY_E),
|
||||||
|
@ -106,6 +109,11 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
|
||||||
.supply = "vmmc",
|
.supply = "vmmc",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct regulator_consumer_supply zoom_vmmc3_supply = {
|
||||||
|
.supply = "vmmc",
|
||||||
|
.dev_name = "mmci-omap-hs.2",
|
||||||
|
};
|
||||||
|
|
||||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||||
static struct regulator_init_data zoom_vmmc1 = {
|
static struct regulator_init_data zoom_vmmc1 = {
|
||||||
.constraints = {
|
.constraints = {
|
||||||
|
@ -151,6 +159,32 @@ static struct regulator_init_data zoom_vsim = {
|
||||||
.consumer_supplies = &zoom_vsim_supply,
|
.consumer_supplies = &zoom_vsim_supply,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct regulator_init_data zoom_vmmc3 = {
|
||||||
|
.constraints = {
|
||||||
|
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||||
|
},
|
||||||
|
.num_consumer_supplies = 1,
|
||||||
|
.consumer_supplies = &zoom_vmmc3_supply,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct fixed_voltage_config zoom_vwlan = {
|
||||||
|
.supply_name = "vwl1271",
|
||||||
|
.microvolts = 1800000, /* 1.8V */
|
||||||
|
.gpio = OMAP_ZOOM_WLAN_PMENA_GPIO,
|
||||||
|
.startup_delay = 70000, /* 70msec */
|
||||||
|
.enable_high = 1,
|
||||||
|
.enabled_at_boot = 0,
|
||||||
|
.init_data = &zoom_vmmc3,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device omap_vwlan_device = {
|
||||||
|
.name = "reg-fixed-voltage",
|
||||||
|
.id = 1,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &zoom_vwlan,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
static struct omap2_hsmmc_info mmc[] __initdata = {
|
static struct omap2_hsmmc_info mmc[] __initdata = {
|
||||||
{
|
{
|
||||||
.name = "external",
|
.name = "external",
|
||||||
|
@ -280,6 +314,7 @@ static void enable_board_wakeup_source(void)
|
||||||
void __init zoom_peripherals_init(void)
|
void __init zoom_peripherals_init(void)
|
||||||
{
|
{
|
||||||
omap_i2c_init();
|
omap_i2c_init();
|
||||||
|
platform_device_register(&omap_vwlan_device);
|
||||||
usb_musb_init(&musb_board_data);
|
usb_musb_init(&musb_board_data);
|
||||||
enable_board_wakeup_source();
|
enable_board_wakeup_source();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue