From patchwork Thu Aug 29 13:31:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2851378 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AEB21BF546 for ; Thu, 29 Aug 2013 13:32:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D9C52020A for ; Thu, 29 Aug 2013 13:32:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C85B20254 for ; Thu, 29 Aug 2013 13:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754644Ab3H2NcX (ORCPT ); Thu, 29 Aug 2013 09:32:23 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:49961 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754584Ab3H2NcO (ORCPT ); Thu, 29 Aug 2013 09:32:14 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7TDWEZD023993; Thu, 29 Aug 2013 08:32:14 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7TDWE6X017567; Thu, 29 Aug 2013 08:32:14 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Thu, 29 Aug 2013 08:32:13 -0500 Received: from deskari.tieu.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7TDW75A015728; Thu, 29 Aug 2013 08:32:12 -0500 From: Tomi Valkeinen To: , CC: Archit Taneja , Tomi Valkeinen Subject: [PATCH 04/15] OMAPDSS: SDI: change regulator handling Date: Thu, 29 Aug 2013 16:31:49 +0300 Message-ID: <1377783120-14001-5-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com> References: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Regulator handling for DPI and SDI is currently handled in the core.c, using the 'virtual' omapdss platform device. Nowadays we have proper devices for both DPI and SDI, and so we can handle the regulators inside the respective drivers. This patch moves the regulator handling for SDI into sdi.c. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/core.c | 15 --------------- drivers/video/omap2/dss/dss.h | 1 - drivers/video/omap2/dss/sdi.c | 10 +++------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 1aeb274..a07d626 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -44,7 +44,6 @@ static struct { struct platform_device *pdev; struct regulator *vdds_dsi_reg; - struct regulator *vdds_sdi_reg; const char *default_display_name; } core; @@ -95,20 +94,6 @@ struct regulator *dss_get_vdds_dsi(void) return reg; } -struct regulator *dss_get_vdds_sdi(void) -{ - struct regulator *reg; - - if (core.vdds_sdi_reg != NULL) - return core.vdds_sdi_reg; - - reg = devm_regulator_get(&core.pdev->dev, "vdds_sdi"); - if (!IS_ERR(reg)) - core.vdds_sdi_reg = reg; - - return reg; -} - int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask) { struct omap_dss_board_info *board_data = core.pdev->dev.platform_data; diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 50a2362..7d97de4 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -165,7 +165,6 @@ struct platform_device; struct platform_device *dss_get_core_pdev(void); struct bus_type *dss_get_bus(void); struct regulator *dss_get_vdds_dsi(void); -struct regulator *dss_get_vdds_sdi(void); int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); int dss_set_min_bus_tput(struct device *dev, unsigned long tput); diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 856af2e..82b64e3 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -267,14 +267,10 @@ static int sdi_init_regulator(void) if (sdi.vdds_sdi_reg) return 0; - vdds_sdi = dss_get_vdds_sdi(); - + vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "vdds_sdi"); if (IS_ERR(vdds_sdi)) { - vdds_sdi = devm_regulator_get(&sdi.pdev->dev, "vdds_sdi"); - if (IS_ERR(vdds_sdi)) { - DSSERR("can't get VDDS_SDI regulator\n"); - return PTR_ERR(vdds_sdi); - } + DSSERR("can't get VDDS_SDI regulator\n"); + return PTR_ERR(vdds_sdi); } sdi.vdds_sdi_reg = vdds_sdi;