From patchwork Mon Aug 20 13:24:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrabhanu Mahapatra X-Patchwork-Id: 1348431 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 79102DFF0F for ; Mon, 20 Aug 2012 13:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756046Ab2HTN30 (ORCPT ); Mon, 20 Aug 2012 09:29:26 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:60964 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756014Ab2HTN30 (ORCPT ); Mon, 20 Aug 2012 09:29:26 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7KDTP8h022657; Mon, 20 Aug 2012 08:29:25 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7KDTPwG029040; Mon, 20 Aug 2012 08:29:25 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Mon, 20 Aug 2012 08:29:25 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7KDTPNE001175; Mon, 20 Aug 2012 08:29:25 -0500 Received: from localhost (uda0131936.apr.dhcp.ti.com [172.24.136.162]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q7KDTNr09556; Mon, 20 Aug 2012 08:29:23 -0500 (CDT) From: Chandrabhanu Mahapatra To: CC: , , Chandrabhanu Mahapatra Subject: [PATCH V5 6/6] OMAPDSS: DPI: Remove cpu_is_xxxx checks Date: Mon, 20 Aug 2012 18:54:59 +0530 Message-ID: <41ec21395229bc8671d68165a0d6b5198f7b87fc.1345468541.git.cmahapatra@ti.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The OMAP3 checks have been removed and replaced by a dss feature FEAT_DPI_USES_VDDS_DSI for cleaner implementation. The patches "OMAP: DSS2: enable VDDS_DSI when using DPI" (8a2cfea8cc) by Tomi Valkeinen and "ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c" (4041071571) by Russell King had introduced these checks. As it is evident from these patches a dependency exists for some DSS pins on VDDS_DSI which is better shown by dss feature FEAT_DPI_USES_VDDS_DSI. Signed-off-by: Chandrabhanu Mahapatra --- drivers/video/omap2/dss/dpi.c | 12 +++++++----- drivers/video/omap2/dss/dss_features.c | 1 + drivers/video/omap2/dss/dss_features.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 3266be2..b97f7b8 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -34,6 +34,7 @@ #include #include "dss.h" +#include "dss_features.h" static struct { struct regulator *vdds_dsi_reg; @@ -169,7 +170,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) { int r; - if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) { + if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) && !dpi.vdds_dsi_reg) { DSSERR("no VDSS_DSI regulator\n"); return -ENODEV; } @@ -185,7 +186,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) goto err_start_dev; } - if (cpu_is_omap34xx()) { + if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI)) { r = regulator_enable(dpi.vdds_dsi_reg); if (r) goto err_reg_enable; @@ -229,7 +230,7 @@ err_dsi_pll_init: err_get_dsi: dispc_runtime_put(); err_get_dispc: - if (cpu_is_omap34xx()) + if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI)) regulator_disable(dpi.vdds_dsi_reg); err_reg_enable: omap_dss_stop_device(dssdev); @@ -250,7 +251,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) dispc_runtime_put(); - if (cpu_is_omap34xx()) + if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI)) regulator_disable(dpi.vdds_dsi_reg); omap_dss_stop_device(dssdev); @@ -329,7 +330,8 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev) { DSSDBG("init_display\n"); - if (cpu_is_omap34xx() && dpi.vdds_dsi_reg == NULL) { + if (dss_has_feature(FEAT_DPI_USES_VDDS_DSI) && + dpi.vdds_dsi_reg == NULL) { struct regulator *vdds_dsi; vdds_dsi = dss_get_vdds_dsi(); diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 9387097..2fe39d6 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c @@ -373,6 +373,7 @@ static const enum dss_feat_id omap3430_dss_feat_list[] = { FEAT_ALPHA_FIXED_ZORDER, FEAT_FIFO_MERGE, FEAT_OMAP3_DSI_FIFO_BUG, + FEAT_DPI_USES_VDDS_DSI, }; static const enum dss_feat_id omap3630_dss_feat_list[] = { diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 996ffcb..26d43a4 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h @@ -50,6 +50,7 @@ enum dss_feat_id { FEAT_DSI_VC_OCP_WIDTH, FEAT_DSI_REVERSE_TXCLKESC, FEAT_DSI_GNQ, + FEAT_DPI_USES_VDDS_DSI, FEAT_HDMI_CTS_SWMODE, FEAT_HDMI_AUDIO_USE_MCLK, FEAT_HANDLE_UV_SEPARATE,