From patchwork Thu Feb 3 11:31:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 529141 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 p13BVwFn018552 for ; Thu, 3 Feb 2011 11:31:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756276Ab1BCLb5 (ORCPT ); Thu, 3 Feb 2011 06:31:57 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:52271 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756249Ab1BCLbz (ORCPT ); Thu, 3 Feb 2011 06:31:55 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p13BVnwI031863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Feb 2011 05:31:51 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p13BVkoL022964; Thu, 3 Feb 2011 17:01:47 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id p13BVkRE012885; Thu, 3 Feb 2011 17:01:46 +0530 Received: (from a0131687@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id p13BVk53012883; Thu, 3 Feb 2011 17:01:46 +0530 From: Rajendra Nayak To: linux-omap@vger.kernel.org Cc: tony@atomide.com, linux-arm-kernel@lists.infradead.org, Rajendra Nayak Subject: [PATCH 2/2] omap3sdp: clean regulator supply mapping in board file Date: Thu, 3 Feb 2011 17:01:45 +0530 Message-Id: <1296732705-12818-3-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1296732705-12818-2-git-send-email-rnayak@ti.com> References: <1296732705-12818-1-git-send-email-rnayak@ti.com> <1296732705-12818-2-git-send-email-rnayak@ti.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Feb 2011 11:31:58 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index dcdc718..6afee65 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -315,11 +315,6 @@ static struct platform_device sdp3430_dss_device = { }, }; -static struct regulator_consumer_supply sdp3430_vdda_dac_supply = { - .supply = "vdda_dac", - .dev = &sdp3430_dss_device.dev, -}; - static struct platform_device *sdp3430_devices[] __initdata = { &sdp3430_dss_device, }; @@ -370,18 +365,6 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; -static struct regulator_consumer_supply sdp3430_vmmc1_supply = { - .supply = "vmmc", -}; - -static struct regulator_consumer_supply sdp3430_vsim_supply = { - .supply = "vmmc_aux", -}; - -static struct regulator_consumer_supply sdp3430_vmmc2_supply = { - .supply = "vmmc", -}; - static int sdp3430_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) { @@ -392,13 +375,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev, mmc[1].gpio_cd = gpio + 1; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters ... we "know" the - * regulators will be set up only *after* we return. - */ - sdp3430_vmmc1_supply.dev = mmc[0].dev; - sdp3430_vsim_supply.dev = mmc[0].dev; - sdp3430_vmmc2_supply.dev = mmc[1].dev; - /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */ gpio_request(gpio + 7, "sub_lcd_en_bkl"); gpio_direction_output(gpio + 7, 0); @@ -427,10 +403,28 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = { .irq_line = 1, }; +/* regulator consumer mappings */ + /* ads7846 on SPI */ static struct regulator_consumer_supply sdp3430_vaux3_supply = REGULATOR_SUPPLY("vcc", "spi1.0"); +static struct regulator_consumer_supply sdp3430_vdda_dac_supply = + REGULATOR_SUPPLY("vdda_dac", "omapdss"); + +/* VPLL2 for digital video outputs */ +static struct regulator_consumer_supply sdp3430_vpll2_supplies = + REGULATOR_SUPPLY("vdds_dsi", "omapdss"); + +static struct regulator_consumer_supply sdp3430_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); + +static struct regulator_consumer_supply sdp3430_vsim_supply = + REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.0"); + +static struct regulator_consumer_supply sdp3430_vmmc2_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); + /* * Apply all the fixed voltages since most versions of U-Boot * don't bother with that initialization. @@ -550,14 +544,6 @@ static struct regulator_init_data sdp3430_vdac = { .consumer_supplies = &sdp3430_vdda_dac_supply, }; -/* VPLL2 for digital video outputs */ -static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { - { - .supply = "vdds_dsi", - .dev = &sdp3430_dss_device.dev, - } -}; - static struct regulator_init_data sdp3430_vpll2 = { .constraints = { .name = "VDVI", @@ -569,8 +555,8 @@ static struct regulator_init_data sdp3430_vpll2 = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies), - .consumer_supplies = sdp3430_vpll2_supplies, + .num_consumer_supplies = 1, + .consumer_supplies = &sdp3430_vpll2_supplies, }; static struct twl4030_codec_audio_data sdp3430_audio = {