linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Chikkature Rajashekar Madhusudhan
	<madhu.cr-l0cyMroinI0@public.gmane.org>,
	Luciano Coelho
	<luciano.coelho-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	San Mehat <san-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Roger Quadros
	<roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Nicolas Pitre <nico-vtqb6HGKxmzR7s880joybQ@public.gmane.org>,
	Ido Yariv <ido-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>,
	Kalle Valo <kalle.valo-X3B1VOXEql0@public.gmane.org>,
	Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
Subject: [PATCH v5 6/7] omap: zoom: add fixed regulator device for wlan
Date: Thu,  2 Sep 2010 00:26:49 +0300	[thread overview]
Message-ID: <1283376410-9999-7-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1283376410-9999-1-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>

Add a fixed regulator vmmc device to enable power control
of the wl1271 wlan device.

Signed-off-by: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |   35 ++++++++++++++++++++++++++
 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 6b39849..de88635 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -16,6 +16,7 @@
 #include <linux/gpio.h>
 #include <linux/i2c/twl.h>
 #include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -27,6 +28,8 @@
 #include "mux.h"
 #include "hsmmc.h"
 
+#define OMAP_ZOOM_WLAN_PMENA_GPIO	(101)
+
 /* Zoom2 has Qwerty keyboard*/
 static int board_keymap[] = {
 	KEY(0, 0, KEY_E),
@@ -106,6 +109,11 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
 	.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 */
 static struct regulator_init_data zoom_vmmc1 = {
 	.constraints = {
@@ -151,6 +159,32 @@ static struct regulator_init_data zoom_vsim = {
 	.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 = {
 	{
 		.name		= "external",
@@ -280,6 +314,7 @@ static void enable_board_wakeup_source(void)
 void __init zoom_peripherals_init(void)
 {
 	omap_i2c_init();
+	platform_device_register(&omap_vwlan_device);
 	usb_musb_init(&musb_board_data);
 	enable_board_wakeup_source();
 }
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-09-01 21:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 21:26 [PATCH v5 0/7] native wl1271 support on ZOOM Ohad Ben-Cohen
2010-09-01 21:26 ` [PATCH v5 1/7] wireless: wl1271: make wl12xx.h common to both spi and sdio Ohad Ben-Cohen
2010-09-01 21:26 ` [PATCH v5 2/7] wireless: wl1271: support return value for the set power func Ohad Ben-Cohen
2010-09-01 21:26 ` [PATCH v5 3/7] wireless: wl12xx: add platform data passing support Ohad Ben-Cohen
     [not found]   ` <1283376410-9999-4-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2010-09-04 12:23     ` Michał Mirosław
2010-09-06 11:55       ` Ohad Ben-Cohen
     [not found]       ` <AANLkTi=goLEUqM1XQ__PrGu4=Erw2utaNP4qFmSgRta2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-06 12:07         ` Russell King - ARM Linux
2010-09-06 13:46           ` Ohad Ben-Cohen
2010-09-06 19:42           ` Michał Mirosław
2010-09-15  8:00             ` Ohad Ben-Cohen
     [not found]               ` <AANLkTinM8vY7CygEN6DBR35WLkU-QOBwuiaRrpfwF6Mz-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-15  8:27                 ` Vitaly Wool
2010-09-15 16:39                   ` Tony Lindgren
2010-09-15  8:25             ` Russell King - ARM Linux
2010-09-15 16:10               ` Michał Mirosław
2010-09-01 21:26 ` [PATCH v5 4/7] wireless: wl1271: take irq info from private board data Ohad Ben-Cohen
     [not found] ` <1283376410-9999-1-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2010-09-01 21:26   ` [PATCH v5 5/7] wireless: wl1271: make ref_clock configurable by board Ohad Ben-Cohen
2010-09-01 21:26   ` Ohad Ben-Cohen [this message]
2010-09-01 21:26 ` [PATCH v5 7/7] omap: zoom: add mmc3/wl1271 device support Ohad Ben-Cohen
2010-09-15  9:21 ` [PATCH v5 0/7] native wl1271 support on ZOOM Ohad Ben-Cohen
     [not found]   ` <AANLkTikedoL3HjohQfq2qa0TU5yMJR5p1GqyQJtQGrdb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-15 11:08     ` Vitaly Wool
2010-09-15 13:21       ` John W. Linville
2010-09-15 16:34         ` Tony Lindgren
2010-09-15 16:46           ` Ohad Ben-Cohen

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=1283376410-9999-7-git-send-email-ohad@wizery.com \
    --to=ohad-ix1uc/w3ht7qt0dzr+alfa@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=ido-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org \
    --cc=kalle.valo-X3B1VOXEql0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luciano.coelho-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=madhu.cr-l0cyMroinI0@public.gmane.org \
    --cc=nico-vtqb6HGKxmzR7s880joybQ@public.gmane.org \
    --cc=roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=san-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).