From patchwork Thu Jul 19 20:04:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgQXNzw6luYXQ=?= X-Patchwork-Id: 1218401 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B7C273FD48 for ; Thu, 19 Jul 2012 20:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507Ab2GSUXo (ORCPT ); Thu, 19 Jul 2012 16:23:44 -0400 Received: from roc.holo.8d.com ([64.254.227.115]:45691 "EHLO roc.holo.8d.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014Ab2GSUXn (ORCPT ); Thu, 19 Jul 2012 16:23:43 -0400 X-Greylist: delayed 1150 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Jul 2012 16:23:43 EDT Received: from raph.usine.8d.com ([192.168.142.55] helo=renkinjitsu.usine.8d.com) by roc.holo.8d.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1SrwxZ-0001Fr-IY; Thu, 19 Jul 2012 16:04:30 -0400 Received: from raph by renkinjitsu.usine.8d.com with local (Exim 4.72) (envelope-from ) id 1SrwxZ-0003QV-4f; Thu, 19 Jul 2012 16:04:29 -0400 Date: Thu, 19 Jul 2012 16:04:29 -0400 From: Raphael Assenat To: linux-omap@vger.kernel.org Cc: tomi.valkeinen@ti.com, linux-fbdev@vger.kernel.org Subject: [PATCH] OMAPDSS: Do not require a VDDS_DSI regulator on am35xx Message-ID: <20120719200429.GD3850@renkinjitsu.usine.8d.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.6 X-Spam-Level: -- X-Spam-Report: -2.6 points, 5.0 required autolearn=ham -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On our AM3505 based board, dpi.c complains that there is no VDSS_DSI regulator and the framebuffer cannot be enabled. However, this check does not seem to apply to AM3505/17 chips. I am not the first facing this issue, see this thread from Nov. 2011: http://marc.info/?l=linux-omap&m=132147745930213&w=2 The string 'vdds_dsi' does appear once in the technical reference manual[1] but there is no corresponding power pin on the package[2]. I failed to locate any signal that could be an equivalent. I am trying to obtain some clarifications on TI's forum[3]... In any case, I am currently running with the patch below. In order to keep cpu_is_xx uses to a minimum, I check for am35xx once at init time and allow dpi.vdds_dsi_reg to be NULL from then on, getting rid of all the other cpu_is_omap34xx uses in the process. Your comments would be appreciated. Please also consider for merging. [1] http://www.ti.com/litv/pdf/sprugr0b [2] http://www.ti.com/lit/gpn/am3505 [3] http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/t/202586.aspx Signed-off-by: Raphael Assenat --- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 8c2056c..d3b428d 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -180,11 +180,6 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) { int r; - if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) { - DSSERR("no VDSS_DSI regulator\n"); - return -ENODEV; - } - if (dssdev->manager == NULL) { DSSERR("failed to enable display: no manager\n"); return -ENODEV; @@ -196,7 +191,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) goto err_start_dev; } - if (cpu_is_omap34xx()) { + if (dpi.vdds_dsi_reg) { r = regulator_enable(dpi.vdds_dsi_reg); if (r) goto err_reg_enable; @@ -240,7 +235,7 @@ err_dsi_pll_init: err_get_dsi: dispc_runtime_put(); err_get_dispc: - if (cpu_is_omap34xx()) + if (dpi.vdds_dsi_reg) regulator_disable(dpi.vdds_dsi_reg); err_reg_enable: omap_dss_stop_device(dssdev); @@ -261,7 +256,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) dispc_runtime_put(); - if (cpu_is_omap34xx()) + if (dpi.vdds_dsi_reg) regulator_disable(dpi.vdds_dsi_reg); omap_dss_stop_device(dssdev); @@ -343,7 +338,7 @@ 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 (cpu_is_omap34xx() && dpi.vdds_dsi_reg == NULL && !soc_is_am35xx()) { struct regulator *vdds_dsi; vdds_dsi = dss_get_vdds_dsi();