From patchwork Tue Jul 1 08:10:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 32848 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BD5E0203C0 for ; Tue, 1 Jul 2014 08:10:37 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id eb12sf59266337oac.3 for ; Tue, 01 Jul 2014 01:10:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=7AgmkLY4Tjvob+01t9awWDkkv3PvcTTILATzNmdvNo4=; b=AjS5/8xosspaqH1xSaiTGkKYg88qVYubsL0cZtArqbXPYiQEsGJzKPUDlL5tp0lDMT 8LbBJCvHAJcgHFhUNHbdCInWmFtOUqF62QgsG3UH4hFmqpAI9lZhOO7UkuEXvqnuHvTE FOMPasdcawMfxrE6oSHZqofFo++nnOMIQF8A+wqy5xpDaGuF2YiU+13x3h1OZi0nwEcZ gQqfoWmfGb9ZoiBsBOVD2LydYgmo0J8koUSR6rQhPxQ9TwR5sbAgmgymuaaYpnesDON1 0nyu67PH3XwiM1kiyej1UomvYjQgaO2Y1XdZp4eSpSLACAvXf2MJeSgvbZIiimy4RjTP b+sw== X-Gm-Message-State: ALoCoQmWgF5dOHYGOkDiWV074tmi1qNb7HgCON+UUgPORcelcSAz+zdCkhnrLzG0tB1S/ZZy1WK+ X-Received: by 10.182.241.33 with SMTP id wf1mr23796132obc.37.1404202237431; Tue, 01 Jul 2014 01:10:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.239 with SMTP id l102ls1819341qgd.81.gmail; Tue, 01 Jul 2014 01:10:37 -0700 (PDT) X-Received: by 10.58.155.38 with SMTP id vt6mr43591556veb.3.1404202237282; Tue, 01 Jul 2014 01:10:37 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id p7si11106523vda.40.2014.07.01.01.10.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 01:10:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so8584422vcb.17 for ; Tue, 01 Jul 2014 01:10:37 -0700 (PDT) X-Received: by 10.58.220.230 with SMTP id pz6mr42876846vec.9.1404202237175; Tue, 01 Jul 2014 01:10:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp197865vcb; Tue, 1 Jul 2014 01:10:36 -0700 (PDT) X-Received: by 10.68.222.196 with SMTP id qo4mr58791193pbc.14.1404202236360; Tue, 01 Jul 2014 01:10:36 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id so9si25090523pac.191.2014.07.01.01.10.35; Tue, 01 Jul 2014 01:10:35 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757394AbaGAIKf (ORCPT + 8 others); Tue, 1 Jul 2014 04:10:35 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:27046 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755048AbaGAIKb (ORCPT ); Tue, 1 Jul 2014 04:10:31 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N80003X1XD96V70@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 01 Jul 2014 09:10:21 +0100 (BST) X-AuditID: cbfec7f5-b7f626d000004b39-af-53b26cf4ae3e Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id B6.28.19257.4FC62B35; Tue, 01 Jul 2014 09:10:28 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N8000A5SXDBMY80@eusync2.samsung.com>; Tue, 01 Jul 2014 09:10:28 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Marek Szyprowski , Kukjin Kim , Tobias Jakobi , Daniel Drake , Andrzej Hajda , Inki Dae , Tomasz Stanislawski , Tomasz Figa Subject: [PATCH 2/7] drm: exynos: hdmi: make 'hdmi-en' regulator optional and keep it enabled Date: Tue, 01 Jul 2014 10:10:06 +0200 Message-id: <1404202211-15788-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1404202211-15788-1-git-send-email-m.szyprowski@samsung.com> References: <1404202211-15788-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphluLIzCtJLcpLzFFi42I5/e/4Fd0vOZuCDVq+qVvcWneO1eLR/MfM Fle+vmezmHR/AotF74KrbBYzzu9jsuj6+ZPNYu2Ru+wW62e8ZrGY1/6S1YHLY9H3LI/Fm/az edzvPs7k0bdlFaPH501yAaxRXDYpqTmZZalF+nYJXBn7WzazFuwQrOjq+c/UwLiDr4uRk0NC wETi5eRlzBC2mMSFe+vZuhi5OIQEljJKfD95jhHC6WOS2HgNxOHkYBMwlOh62wVUxcEhIuAm Mes/K0gNs8BeJomrryaygdQIC8RLXFn5nQnEZhFQlTj06ykriM0r4CEx9eQldohtchL/X64A q+EU8JTYc/UgWFwIqGb/9y1MExh5FzAyrGIUTS1NLihOSs810itOzC0uzUvXS87P3cQICbmv OxiXHrM6xCjAwajEw/tCf1OwEGtiWXFl7iFGCQ5mJRFe9jSgEG9KYmVValF+fFFpTmrxIUYm Dk6pBkaW9NR3DkfFVvGsmCKWGRsSy7vW9poZ2xW7uhO/V7J55d9TF3zgMEVQdPNen3KpTAeJ Na9/7pnA46Pv8DS0pHpZ8a9N1gGiQi91Th8PZtV/HPWn6mBr6obVpmxpeQfXmhZWL1YwuHet 6IXX6f6Stl3xNxbOKHcWz4xwC968cTfv2cZJNneSXymxFGckGmoxFxUnAgBl2K2vFwIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , HDMI_EN regulator is additional regulator for providing voltage source for DCC lines available on HDMI connector. When there is no power provided for DDC epprom, some TV-sets do not pulls up HPD (hot plug detect) line, what causes HDMI block to stay turned off. This patch enables HDMI_EN regulator (if available) on driver probe and keep it enabled all the time to let TV-set correctly signal HPD event. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index aa259b0a873a..a9a87d024c56 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -84,6 +84,7 @@ struct hdmi_resources { struct clk *sclk_hdmiphy; struct clk *mout_hdmi; struct regulator_bulk_data *regul_bulk; + struct regulator *reg_hdmi_en; int regul_count; }; @@ -2168,7 +2169,6 @@ static int hdmi_resources_init(struct hdmi_context *hdata) struct device *dev = hdata->dev; struct hdmi_resources *res = &hdata->res; static char *supply[] = { - "hdmi-en", "vdd", "vdd_osc", "vdd_pll", @@ -2228,6 +2228,20 @@ static int hdmi_resources_init(struct hdmi_context *hdata) } res->regul_count = ARRAY_SIZE(supply); + res->reg_hdmi_en = devm_regulator_get(dev, "hdmi-en"); + if (IS_ERR(res->reg_hdmi_en) && PTR_ERR(res->reg_hdmi_en) != -ENOENT) { + DRM_ERROR("failed to get hdmi-en regulator\n"); + return PTR_ERR(res->reg_hdmi_en); + } + if (!IS_ERR(res->reg_hdmi_en)) { + ret = regulator_enable(res->reg_hdmi_en); + if (ret) { + DRM_ERROR("failed to enable hdmi-en regulator\n"); + return ret; + } + } else + res->reg_hdmi_en = NULL; + return ret; fail: DRM_ERROR("HDMI resource init - failed\n"); @@ -2494,6 +2508,9 @@ static int hdmi_remove(struct platform_device *pdev) cancel_delayed_work_sync(&hdata->hotplug_work); + if (hdata->res.reg_hdmi_en) + regulator_disable(hdata->res.reg_hdmi_en); + put_device(&hdata->hdmiphy_port->dev); put_device(&hdata->ddc_adpt->dev);