From patchwork Tue May 18 12:34:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 100454 X-Patchwork-Delegate: tomi.valkeinen@nokia.com 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 o4ICaDV2000612 for ; Tue, 18 May 2010 12:36:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757510Ab0ERMgL (ORCPT ); Tue, 18 May 2010 08:36:11 -0400 Received: from smtp.nokia.com ([192.100.105.134]:62494 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757502Ab0ERMgJ (ORCPT ); Tue, 18 May 2010 08:36:09 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o4ICYmxw018110; Tue, 18 May 2010 07:36:07 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 May 2010 15:35:54 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 May 2010 15:35:53 +0300 Received: from localhost.localdomain (esdhcp041221.research.nokia.com [172.21.41.221]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o4ICZbxG017740; Tue, 18 May 2010 15:35:47 +0300 From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org Cc: Roger Quadros , Tomi Valkeinen Subject: [PATCH 05/23] OMAP: DSS2: Use vdds_sdi regulator supply in SDI Date: Tue, 18 May 2010 15:34:56 +0300 Message-Id: <1274186114-26951-6-git-send-email-tomi.valkeinen@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1274186114-26951-1-git-send-email-tomi.valkeinen@nokia.com> References: <1274186114-26951-1-git-send-email-tomi.valkeinen@nokia.com> X-OriginalArrivalTime: 18 May 2010 12:35:53.0400 (UTC) FILETIME=[A7C16380:01CAF686] X-Nokia-AV: Clean 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:36:13 +0000 (UTC) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 3de3c1e..ee07a3c 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -23,13 +23,16 @@ #include #include #include +#include #include +#include #include "dss.h" static struct { bool skip_init; bool update_enabled; + struct regulator *vdds_sdi_reg; } sdi; static void sdi_basic_init(void) @@ -57,6 +60,10 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) goto err0; } + r = regulator_enable(sdi.vdds_sdi_reg); + if (r) + goto err1; + /* In case of skip_init sdi_init has already enabled the clocks */ if (!sdi.skip_init) dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1); @@ -120,6 +127,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) return 0; err2: dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + regulator_disable(sdi.vdds_sdi_reg); err1: omap_dss_stop_device(dssdev); err0: @@ -135,6 +143,8 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + regulator_disable(sdi.vdds_sdi_reg); + omap_dss_stop_device(dssdev); } EXPORT_SYMBOL(omapdss_sdi_display_disable); @@ -151,6 +161,11 @@ int sdi_init(bool skip_init) /* we store this for first display enable, then clear it */ sdi.skip_init = skip_init; + sdi.vdds_sdi_reg = dss_get_vdds_sdi(); + if (IS_ERR(sdi.vdds_sdi_reg)) { + DSSERR("can't get VDDS_SDI regulator\n"); + return PTR_ERR(sdi.vdds_sdi_reg); + } /* * Enable clocks already here, otherwise there would be a toggle * of them until sdi_display_enable is called.