From patchwork Sat Dec 4 12:40:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 380261 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 oB4Celt5027183 for ; Sat, 4 Dec 2010 12:40:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754616Ab0LDMkn (ORCPT ); Sat, 4 Dec 2010 07:40:43 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:48887 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134Ab0LDMkm (ORCPT ); Sat, 4 Dec 2010 07:40:42 -0500 Received: from lopsy-lu.misterjones.org ([93.97.26.37] helo=localhost.localdomain) by inca-roads.misterjones.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1POrPr-0006lr-C5; Sat, 04 Dec 2010 13:40:39 +0100 From: Marc Zyngier To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Enric Balletbo i Serra , Tony Lindgren Subject: [REPOST][PATCH] Fix IGEPv2 second MMC channel power supply Date: Sat, 4 Dec 2010 12:40:38 +0000 Message-Id: <1291466438-12827-1-git-send-email-maz@misterjones.org> X-Mailer: git-send-email 1.7.3.2 X-SA-Exim-Connect-IP: 93.97.26.37 X-SA-Exim-Rcpt-To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, eballetbo@gmail.com, tony@atomide.com X-SA-Exim-Mail-From: maz@misterjones.org X-SA-Exim-Scanned: No (on inca-roads.misterjones.org); SAEximRunCond expanded to false 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]); Sat, 04 Dec 2010 12:40:48 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 5e035a5..9a85e60 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -257,9 +258,8 @@ static inline void __init igep2_init_smsc911x(void) { } static struct omap_board_config_kernel igep2_config[] __initdata = { }; -static struct regulator_consumer_supply igep2_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply igep2_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ static struct regulator_init_data igep2_vmmc1 = { @@ -276,6 +276,52 @@ static struct regulator_init_data igep2_vmmc1 = { .consumer_supplies = &igep2_vmmc1_supply, }; +static struct regulator_consumer_supply igep2_vio_supply = + REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); + +static struct regulator_init_data igep2_vio = { + .constraints = { + .min_uV = 1800000, + .max_uV = 1800000, + .apply_uV = 1, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE + | REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &igep2_vio_supply, +}; + +static struct regulator_consumer_supply igep2_vmmc2_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); + +static struct regulator_init_data igep2_vmmc2 = { + .constraints = { + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .always_on = 1, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &igep2_vmmc2_supply, +}; + +static struct fixed_voltage_config igep2_vwlan = { + .supply_name = "vwlan", + .microvolts = 3300000, + .gpio = -EINVAL, + .enabled_at_boot = 1, + .init_data = &igep2_vmmc2, +}; + +static struct platform_device igep2_vwlan_device = { + .name = "reg-fixed-voltage", + .id = 0, + .dev = { + .platform_data = &igep2_vwlan, + }, +}; + static struct omap2_hsmmc_info mmc[] = { { .mmc = 1, @@ -373,12 +419,6 @@ static int igep2_twl_gpio_setup(struct device *dev, omap2_hsmmc_init(mmc); /* - * link regulators to MMC adapters ... we "know" the - * regulators will be set up only *after* we return. - */ - igep2_vmmc1_supply.dev = mmc[0].dev; - - /* * REVISIT: need ehci-omap hooks for external VBUS * power switch and overcurrent detect */ @@ -489,6 +529,7 @@ static void __init igep2_display_init(void) static struct platform_device *igep2_devices[] __initdata = { &igep2_dss_device, + &igep2_vwlan_device, }; static void __init igep2_init_irq(void) @@ -519,7 +560,7 @@ static struct twl4030_platform_data igep2_twldata = { .gpio = &igep2_twl4030_gpio_pdata, .vmmc1 = &igep2_vmmc1, .vpll2 = &igep2_vpll2, - + .vio = &igep2_vio, }; static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {