From patchwork Wed Sep 22 21:20:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 200322 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8MLKgKk013486 for ; Wed, 22 Sep 2010 21:20:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752802Ab0IVVUl (ORCPT ); Wed, 22 Sep 2010 17:20:41 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:44845 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752170Ab0IVVUk (ORCPT ); Wed, 22 Sep 2010 17:20:40 -0400 Received: by ewy23 with SMTP id 23so296980ewy.19 for ; Wed, 22 Sep 2010 14:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=Thu8yRqfQBYJqA6WZwcduJ84qmlzQx7+ZIoWkgnZapI=; b=FG54tHP5tGg7rrko5kVmcXytotzUwqi4AAR7Vq88UrxrmoFDFrAo3ooowEXt0mRsda /aj7nkBabDMay1OSzWUqx2wMVzlu2LMMQiXU7zozxqrGhjZRNGAqh/0vXCrEXmWbWcFa 2tdkEiCqTI/qHUKfl8cjDPq5TeErY1OKzYvAI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=qeVVGAvt3s9h86L/JKQmUv02+wAzvoMRjiPI2qIFjHo1ud8D4nzngG6It59XKMlTQD a96TipJwLP41zq/EP4Z2k5MOSt4dZJBRCioD2lg4tXO991x0gmk3x6Bk291LxG5VgLvJ XedgOL0OipQfuGMFS/9htG44DomF52vDdHItY= Received: by 10.213.17.133 with SMTP id s5mr1270984eba.21.1285190439429; Wed, 22 Sep 2010 14:20:39 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id a48sm15414707eei.12.2010.09.22.14.20.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Sep 2010 14:20:38 -0700 (PDT) From: Grazvydas Ignotas To: linux-omap@vger.kernel.org Cc: Tony Lindgren , Grazvydas Ignotas Subject: [PATCH] omap: pandora: add fixed regulator for wlan Date: Thu, 23 Sep 2010 00:20:27 +0300 Message-Id: <1285190427-15834-1-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Sep 2010 21:20:43 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 7ea1eb4..3214cd7 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -344,6 +345,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply = static struct regulator_consumer_supply pandora_vmmc2_supply = REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); +static struct regulator_consumer_supply pandora_vmmc3_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2"); + static struct regulator_consumer_supply pandora_vdda_dac_supply = REGULATOR_SUPPLY("vdda_dac", "omapdss"); @@ -488,6 +492,33 @@ static struct regulator_init_data pandora_vsim = { .consumer_supplies = &pandora_adac_supply, }; +/* Fixed regulator internal to Wifi module */ +static struct regulator_init_data pandora_vmmc3 = { + .constraints = { + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &pandora_vmmc3_supply, +}; + +static struct fixed_voltage_config pandora_vwlan = { + .supply_name = "vwlan", + .microvolts = 1800000, /* 1.8V */ + .gpio = PANDORA_WIFI_NRESET_GPIO, + .startup_delay = 50000, /* 50ms */ + .enable_high = 1, + .enabled_at_boot = 0, + .init_data = &pandora_vmmc3, +}; + +static struct platform_device pandora_vwlan_device = { + .name = "reg-fixed-voltage", + .id = 1, + .dev = { + .platform_data = &pandora_vwlan, + }, +}; + static struct twl4030_usb_data omap3pandora_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; @@ -644,19 +675,8 @@ static void pandora_wl1251_init(void) if (pandora_wl1251_pdata.irq < 0) goto fail_irq; - ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset"); - if (ret < 0) - goto fail_irq; - - /* start powered so that it probes with MMC subsystem */ - ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1); - if (ret < 0) - goto fail_nreset; - return; -fail_nreset: - gpio_free(PANDORA_WIFI_NRESET_GPIO); fail_irq: gpio_free(PANDORA_WIFI_IRQ_GPIO); fail: @@ -668,6 +688,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { &pandora_keys_gpio, &pandora_dss_device, &pandora_wl1251_data, + &pandora_vwlan_device, }; static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {