All of lore.kernel.org
 help / color / mirror / Atom feed
From: panduranga_mallireddy@ti.com
To: coelho@ti.com, netdev@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org
Cc: ohad@wizery.com, benzyg@ti.com, pradeepgurumath@ti.com,
	vishalm@ti.com, x-boudet@ti.com, naveen_jain@ti.com,
	pavan_savoy@ti.com, manjunatha_halli@ti.com, tony@atomide.com,
	cjb@laptop.org,
	Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Subject: [PATCH 3/5] omap: panda: add fixed regulator device for wlan
Date: Mon, 14 Feb 2011 02:19:16 -0500	[thread overview]
Message-ID: <1297667958-22377-4-git-send-email-panduranga_mallireddy@ti.com> (raw)
In-Reply-To: <1297667958-22377-3-git-send-email-panduranga_mallireddy@ti.com>

From: Panduranga Mallireddy <panduranga_mallireddy@ti.com>

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>
---
 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 cc9df6c..cd25255 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -26,6 +26,7 @@
 #include <linux/usb/otg.h>
 #include <linux/i2c/twl.h>
 #include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
@@ -45,6 +46,7 @@
 
 #define GPIO_HUB_POWER		1
 #define GPIO_HUB_NRESET		62
+#define GPIO_WIFI_PMENA		43
 
 static struct gpio_led gpio_leds[] = {
 	{
@@ -172,6 +174,37 @@ static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
 	},
 };
 
+static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
+	.supply = "vmmc",
+	.dev_name = "mmci-omap-hs.4",
+};
+
+static struct regulator_init_data panda_vmmc5 = {
+	.constraints = {
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = 1,
+	.consumer_supplies = &omap4_panda_vmmc5_supply,
+};
+
+static struct fixed_voltage_config panda_vwlan = {
+	.supply_name = "vwl1271",
+	.microvolts = 1800000, /* 1.8V */
+	.gpio = GPIO_WIFI_PMENA,
+	.startup_delay = 70000, /* 70msec */
+	.enable_high = 1,
+	.enabled_at_boot = 0,
+	.init_data = &panda_vmmc5,
+};
+
+static struct platform_device omap_vwlan_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 1,
+	.dev = {
+		.platform_data = &panda_vwlan,
+	},
+};
+
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 {
 	int ret = 0;
@@ -430,6 +463,7 @@ static void __init omap4_panda_init(void)
 
 	omap4_panda_i2c_init();
 	platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
+	platform_device_register(&omap_vwlan_device);
 	omap_serial_init();
 	omap4_twl6030_hsmmc_init(mmc);
 	/* OMAP4 Panda uses internal transceiver so register nop transceiver */
-- 
1.5.6.3


  reply	other threads:[~2011-02-14  7:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  7:19 [PATCH 0/5] Panda: Support for WLAN on WL127x panduranga_mallireddy
2011-02-14  7:19 ` [PATCH 1/5] omap: panda: wlan board muxing panduranga_mallireddy
2011-02-14  7:19   ` [PATCH 2/5] omap: select REGULATOR_FIXED_VOLTAGE by default for panda and sdp4430 panduranga_mallireddy
2011-02-14  7:19     ` panduranga_mallireddy [this message]
2011-02-14  7:19       ` [PATCH 4/5] omap: panda: add mmc5/wl1271 device support panduranga_mallireddy
2011-02-14  7:19         ` [PATCH 5/5] OMAP: hsmmc: Enable MMC4 and MMC5 on OMAP4 platforms panduranga_mallireddy
2011-02-14  7:24   ` [PATCH 1/5] omap: panda: wlan board muxing Ohad Ben-Cohen
2011-02-14  8:01     ` panduranga
2011-02-14  8:01       ` panduranga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297667958-22377-4-git-send-email-panduranga_mallireddy@ti.com \
    --to=panduranga_mallireddy@ti.com \
    --cc=benzyg@ti.com \
    --cc=cjb@laptop.org \
    --cc=coelho@ti.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=manjunatha_halli@ti.com \
    --cc=naveen_jain@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=pavan_savoy@ti.com \
    --cc=pradeepgurumath@ti.com \
    --cc=tony@atomide.com \
    --cc=vishalm@ti.com \
    --cc=x-boudet@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.