From patchwork Tue May 18 12:05:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Weber X-Patchwork-Id: 100436 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4IC6PfU020560 for ; Tue, 18 May 2010 12:06:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757433Ab0ERMGO (ORCPT ); Tue, 18 May 2010 08:06:14 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:50406 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757409Ab0ERMGF (ORCPT ); Tue, 18 May 2010 08:06:05 -0400 Received: from corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net [212.114.252.242]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LwmZo-1NCXej1bpI-016oJZ; Tue, 18 May 2010 14:06:01 +0200 Received: from localhost.localdomain (unknown [192.168.102.87]) by corscience.de (Postfix) with ESMTP id D8F8651E13; Tue, 18 May 2010 14:05:59 +0200 (CEST) From: Thomas Weber To: linux-omap@vger.kernel.org Cc: tony@atomide.com, Thomas Weber Subject: [PATCH 08/14] OMAP2: Devkit8000: Use the REGULATOR_SUPPLY macro Date: Tue, 18 May 2010 14:05:29 +0200 Message-Id: <1274184335-29322-9-git-send-email-weber@corscience.de> X-Mailer: git-send-email 1.6.4.4 In-Reply-To: <1274184335-29322-1-git-send-email-weber@corscience.de> References: <1274184335-29322-1-git-send-email-weber@corscience.de> X-Provags-ID: V01U2FsdGVkX19jugFQS+J+XzgNe3jPBZqps6+Wky0FICxmQ3p L+iBlBY4aXM0pyUVRgNeS5ZKtMLi5qK9fqOGrBxZsUgytc+rlw JZ4Oc3nfSnZW4F98+TM+g== 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 (demeter.kernel.org [140.211.167.41]); Tue, 18 May 2010 12:06:25 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 543becc..4a633f8 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -158,14 +158,13 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) gpio_set_value(dssdev->reset_gpio, 0); } -static struct regulator_consumer_supply devkit8000_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply devkit8000_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); + /* ads7846 on SPI */ -static struct regulator_consumer_supply devkit8000_vio_supplies[] = { - REGULATOR_SUPPLY("vcc", "spi2.0") -}; +static struct regulator_consumer_supply devkit8000_vio_supply = + REGULATOR_SUPPLY("vcc", "spi2.0"); static struct omap_dss_device devkit8000_lcd_device = { .name = "lcd", @@ -214,10 +213,8 @@ static struct platform_device devkit8000_dss_device = { }, }; -static struct regulator_consumer_supply devkit8000_vdda_dac_supply = { - .supply = "vdda_dac", - .dev = &devkit8000_dss_device.dev, -}; +static struct regulator_consumer_supply devkit8000_vdda_dac_supply = + REGULATOR_SUPPLY("vdda_dac", "omapdss"); static int board_keymap[] = { KEY(0, 0, KEY_1), @@ -262,9 +259,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* link regulators to MMC adapters */ - devkit8000_vmmc1_supply.dev = mmc[0].dev; - /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; @@ -294,12 +288,8 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = { .setup = devkit8000_twl_gpio_setup, }; -static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = { - { - .supply = "vdds_dsi", - .dev = &devkit8000_dss_device.dev, - } -}; +static struct regulator_consumer_supply devkit8000_vpll1_supply = + REGULATOR_SUPPLY("vdds_dsi", "omapdss"); /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data devkit8000_vmmc1 = { @@ -340,8 +330,8 @@ static struct regulator_init_data devkit8000_vpll1 = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = ARRAY_SIZE(devkit8000_vpll1_supplies), - .consumer_supplies = devkit8000_vpll1_supplies, + .num_consumer_supplies = 1, + .consumer_supplies = &devkit8000_vpll1_supply, }; /* VAUX4 for ads7846 and nubs */ @@ -355,8 +345,8 @@ static struct regulator_init_data devkit8000_vio = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, - .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supplies), - .consumer_supplies = devkit8000_vio_supplies, + .num_consumer_supplies = 1, + .consumer_supplies = &devkit8000_vio_supply, }; static struct twl4030_usb_data devkit8000_usb_data = {