From patchwork Mon Jun 27 15:02:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 921132 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5RF2dWG022113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 27 Jun 2011 15:03:01 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbDKU-0001aU-Pe; Mon, 27 Jun 2011 15:02:27 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QbDKU-0000X2-EW; Mon, 27 Jun 2011 15:02:26 +0000 Received: from mail-pv0-f177.google.com ([74.125.83.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbDKQ-0000Wj-Hx for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2011 15:02:23 +0000 Received: by pvg20 with SMTP id 20so3297662pvg.36 for ; Mon, 27 Jun 2011 08:02:18 -0700 (PDT) Received: by 10.68.39.3 with SMTP id l3mr3312123pbk.488.1309186938692; Mon, 27 Jun 2011 08:02:18 -0700 (PDT) Received: from localhost.localdomain ([122.167.86.144]) by mx.google.com with ESMTPS id g8sm4369634pba.53.2011.06.27.08.02.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Jun 2011 08:02:17 -0700 (PDT) From: Jassi Brar To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCHv2] OMAP4: PANDA, SDP: Fix EHCI regulator supply Date: Mon, 27 Jun 2011 20:32:03 +0530 Message-Id: <1309186923-29192-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308926240-13888-1-git-send-email-jaswinder.singh@linaro.org> References: <1308926240-13888-1-git-send-email-jaswinder.singh@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110627_110222_854251_4F75DD7C X-CRM114-Status: GOOD ( 12.77 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.177 listed in list.dnswl.org] Cc: patches@linaro.org, tony@atomide.com, broonie@opensource.wolfsonmicro.com, balbi@ti.com, Jassi Brar , lrg@ti.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 27 Jun 2011 15:03:01 +0000 (UTC) VUSB is a fixed level line and hence have no set_voltage callback in regulator ops, but has apply_uV set to true. As a result it fails to register with the regulator core. Remove setting apply_uV. Also, assign name to VUSB supply, without which regulator core fails to find it and assigns the default 'dummy' regulator to the ehci-omap device. Signed-off-by: Jassi Brar Reviewed-by: Felipe Balbi --- arch/arm/mach-omap2/board-4430sdp.c | 7 ++++++- arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 63de2d3..9493cd3 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -504,16 +504,21 @@ static struct regulator_init_data sdp4430_vdac = { }, }; +static struct regulator_consumer_supply sdp4430_vusb_supply[] = { + REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"), +}; + static struct regulator_init_data sdp4430_vusb = { .constraints = { .min_uV = 3300000, .max_uV = 3300000, - .apply_uV = true, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, + .num_consumer_supplies = ARRAY_SIZE(sdp4430_vusb_supply), + .consumer_supplies = sdp4430_vusb_supply, }; static struct regulator_init_data sdp4430_clk32kg = { diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index d4f9879..2beb0d5 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -362,16 +362,21 @@ static struct regulator_init_data omap4_panda_vdac = { }, }; +static struct regulator_consumer_supply omap4_panda_vusb_supply[] = { + REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"), +}; + static struct regulator_init_data omap4_panda_vusb = { .constraints = { .min_uV = 3300000, .max_uV = 3300000, - .apply_uV = true, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, + .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vusb_supply), + .consumer_supplies = omap4_panda_vusb_supply, }; static struct regulator_init_data omap4_panda_clk32kg = {