From patchwork Thu May 15 13:10:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 4185651 Return-Path: X-Original-To: patchwork-dri-devel@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 D614F9F1C0 for ; Thu, 15 May 2014 20:19:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0AA2A20398 for ; Thu, 15 May 2014 20:19:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 484FD2038D for ; Thu, 15 May 2014 20:19:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 688CC6E848; Thu, 15 May 2014 13:19:39 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id F0D056EDF6 for ; Thu, 15 May 2014 06:13:55 -0700 (PDT) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5M00IM1A37ZQ90@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 15 May 2014 22:13:55 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 1F.16.09952.39DB4735; Thu, 15 May 2014 22:13:55 +0900 (KST) X-AuditID: cbfee690-b7fcd6d0000026e0-01-5374bd932f39 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 71.2C.27725.29DB4735; Thu, 15 May 2014 22:13:55 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5M0098Y9Z4RB20@mmp1.samsung.com>; Thu, 15 May 2014 22:13:54 +0900 (KST) From: Rahul Sharma To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 2/3] drm: exynos: hdmi: use hdmiphy as PHY Date: Thu, 15 May 2014 18:40:53 +0530 Message-id: <1400159454-31107-3-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1400159454-31107-1-git-send-email-rahul.sharma@samsung.com> References: <1400159454-31107-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRmVeSWpSXmKPExsWyRsSkSnfy3pJggxNHeSxurTvHajH/CJC4 8vU9m8WBPzsYLb7v+sJu0bvgKpvFhac9bBZnm96wW1zeNYfNYsb5fUwWC1/EW0xZdJjVonXv EXaLeZ93MlnMa3/JavFz1zwWBwGPnbPusntsWtXJ5nHn2h42j/vdx5k8+rasYvQ4fmM7k8fn TXIB7FFcNimpOZllqUX6dglcGetvTWApWC5UcXHjNNYGxi38XYycHBICJhKXN61lgbDFJC7c W8/WxcjFISSwlFFiy+ouxi5GDrCi273WEPFFjBLTF79kh3DamSQunVvCDNLNJqArMfvgM0YQ W0QgTeLbgRZWkCJmgTNMEs+u7GcFSQgL2Eoc713GDmKzCKhK/Fz3BMzmFfCQ6P6whAlim4LE nEk2IGFOAU+JXWdugs0XAip5e3wmM8hMCYGP7BJTf65lgpgjIPFt8iEWiF5ZiU0HmCG+kZQ4 uOIGywRG4QWMDKsYRVMLkguKk9KLTPSKE3OLS/PS9ZLzczcxAmPq9L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p2UOX3FJO3ZKb7nAtu2+t /2S75T8bI7dcj1p78vzCJzUNT65Oyn8788Wha4buS/i9HnQH/LxU0PfccPHquO/aJgce6H0J M9jCNpFRd3ng46i3/0OUU39c+jvp5nY9/rrK87efb/jlOXfxTZnlVXYfxZRYijMSDbWYi4oT AaBs8E8cAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 15 May 2014 13:19:36 -0700 Cc: t.stanislaws@samsung.com, devicetree@vger.kernel.org, kgene.kim@samsung.com, joshi@samsung.com, robh+dt@kernel.org, kishon@ti.com, a.hajda@samsung.com, kyungmin.park@samsung.com, grant.likely@linaro.org, sylvester.nawrocki@gmail.com, Rahul Sharma X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Tomasz Stanislawski The HDMIPHY (physical interface) is controlled by a single bit in a power controller's regiter. It was implemented as clock. It was a simple but effective hack. This patch makes HDMI driver to control HDMIPHY via PHY interface. Signed-off-by: Tomasz Stanislawski Signed-off-by: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_hdmi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 9a6d652..ef1cdd0 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -74,8 +75,8 @@ struct hdmi_resources { struct clk *sclk_hdmi; struct clk *sclk_pixel; struct clk *sclk_hdmiphy; - struct clk *hdmiphy; struct clk *mout_hdmi; + struct phy *hdmiphy; struct regulator_bulk_data *regul_bulk; int regul_count; }; @@ -1854,7 +1855,7 @@ static void hdmi_poweron(struct exynos_drm_display *display) if (regulator_bulk_enable(res->regul_count, res->regul_bulk)) DRM_DEBUG_KMS("failed to enable regulator bulk\n"); - clk_prepare_enable(res->hdmiphy); + phy_power_on(res->hdmiphy); clk_prepare_enable(res->hdmi); clk_prepare_enable(res->sclk_hdmi); @@ -1881,7 +1882,7 @@ static void hdmi_poweroff(struct exynos_drm_display *display) clk_disable_unprepare(res->sclk_hdmi); clk_disable_unprepare(res->hdmi); - clk_disable_unprepare(res->hdmiphy); + phy_power_off(res->hdmiphy); regulator_bulk_disable(res->regul_count, res->regul_bulk); pm_runtime_put_sync(hdata->dev); @@ -1977,9 +1978,9 @@ static int hdmi_resources_init(struct hdmi_context *hdata) DRM_ERROR("failed to get clock 'sclk_hdmiphy'\n"); goto fail; } - res->hdmiphy = devm_clk_get(dev, "hdmiphy"); + res->hdmiphy = devm_phy_get(dev, "hdmiphy"); if (IS_ERR(res->hdmiphy)) { - DRM_ERROR("failed to get clock 'hdmiphy'\n"); + DRM_ERROR("failed to get phy 'hdmiphy'\n"); goto fail; } res->mout_hdmi = devm_clk_get(dev, "mout_hdmi");