From patchwork Thu Oct 17 11:26:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 3060431 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 135B89F243 for ; Thu, 17 Oct 2013 11:28:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62D052037D for ; Thu, 17 Oct 2013 11:28:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE3EB20266 for ; Thu, 17 Oct 2013 11:28:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754702Ab3JQL1x (ORCPT ); Thu, 17 Oct 2013 07:27:53 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:50828 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222Ab3JQL1w (ORCPT ); Thu, 17 Oct 2013 07:27:52 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r9HBRpT0032109; Thu, 17 Oct 2013 06:27:51 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r9HBRp6e017093; Thu, 17 Oct 2013 06:27:51 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Thu, 17 Oct 2013 06:27:51 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id r9HBRpmf023861; Thu, 17 Oct 2013 06:27:51 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.145.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r9HBRnt04021; Thu, 17 Oct 2013 06:27:49 -0500 (CDT) From: Archit Taneja To: CC: , , Archit Taneja , Somnath Mukherjee Subject: [PATCH 6/6] omapdss: hdmi4/hdmi5: set regulator voltage to required level Date: Thu, 17 Oct 2013 16:56:42 +0530 Message-ID: <1382009202-18984-7-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382009202-18984-1-git-send-email-archit@ti.com> References: <1382009202-18984-1-git-send-email-archit@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.3 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 It's not sufficient to request the regulator. We need to set the IO voltage as well if the min and max voltage values of the regulator differ. However, if the regulator on a platform doesn't permit the range we requested for, or is a fixed voltage regulator, we just give a warning that we didn't get voltage range we requested for. The recommended voltage range for vdda_hdmi as per the HDMI PHY spec is 1.8V to 1.98V for OMAP4 and 1.5V to 1.8V for OMAP5. Originally worked on by Somnath Mukherjee Cc: Somnath Mukherjee Signed-off-by: Archit Taneja --- drivers/video/omap2/dss/hdmi4.c | 5 +++++ drivers/video/omap2/dss/hdmi5.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c index e140096..95638b8 100644 --- a/drivers/video/omap2/dss/hdmi4.c +++ b/drivers/video/omap2/dss/hdmi4.c @@ -83,6 +83,7 @@ static void hdmi_runtime_put(void) static int hdmi_init_regulator(void) { + int r; struct regulator *reg; if (hdmi.vdda_hdmi_dac_reg != NULL) @@ -99,6 +100,10 @@ static int hdmi_init_regulator(void) return PTR_ERR(reg); } + r = regulator_set_voltage(reg, 1800000, 1980000); + if (r) + DSSWARN("can't set regulator voltage"); + hdmi.vdda_hdmi_dac_reg = reg; return 0; diff --git a/drivers/video/omap2/dss/hdmi5.c b/drivers/video/omap2/dss/hdmi5.c index 5a1cfd6..aa91f4e 100644 --- a/drivers/video/omap2/dss/hdmi5.c +++ b/drivers/video/omap2/dss/hdmi5.c @@ -85,6 +85,7 @@ static void hdmi_runtime_put(void) static int hdmi_init_regulator(void) { + int r; struct regulator *reg; if (hdmi.vdda_hdmi_dac_reg != NULL) @@ -96,6 +97,10 @@ static int hdmi_init_regulator(void) return PTR_ERR(reg); } + r = regulator_set_voltage(reg, 1500000, 1800000); + if (r) + DSSWARN("can't set regulator voltage"); + hdmi.vdda_hdmi_dac_reg = reg; return 0;