From patchwork Wed Apr 16 14:33:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4005221 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BD67BFF02 for ; Thu, 17 Apr 2014 01:06:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F3FE202D1 for ; Thu, 17 Apr 2014 01:06:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1E2DC202B4 for ; Thu, 17 Apr 2014 01:06:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 338166EAD6; Wed, 16 Apr 2014 18:06:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F1016EA6C for ; Wed, 16 Apr 2014 07:33:35 -0700 (PDT) Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4400HO6OFYB510@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 16 Apr 2014 23:33:34 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 77.14.12635.EB49E435; Wed, 16 Apr 2014 23:33:34 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-45-534e94be309a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 85.6B.28157.EB49E435; Wed, 16 Apr 2014 23:33:34 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4400B1ROFNHZ40@mmp1.samsung.com>; Wed, 16 Apr 2014 23:33:34 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/7] drm/exynos: dp: support hotplug detection via GPIO Date: Wed, 16 Apr 2014 20:03:00 +0530 Message-id: <1397658786-26138-2-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1397658786-26138-1-git-send-email-ajaykumar.rs@samsung.com> References: <1397658786-26138-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWyRsSkRnffFL9ggw03DS1urTvHarHy/V9G iwPvD7JYbHizkNniytf3bBaT7k9gsfi+6wu7xdmmN+wWM87vY7JYdXgDu8WURYdZLeYezLW4 /ZvPgddjdsNFFo+ds+6yeyzYVOpxv/s4k0dv8zs2j74tqxg9Pm+SC2CP4rJJSc3JLEst0rdL 4Mq4s/oic8FTvYqnk9oZGxgPqnUxcnJICJhIPL76hxnCFpO4cG89WxcjF4eQwFJGiQ//zzHC FM0/f4IRIrGIUWLf77nMEM4EJol5K/uZQKrYBLQltk2/yQJiiwi4STQdnskKUsQs0M8kMe3O M7BRwgLuEhPv7GIHsVkEVCXWf/vKBmLzCnhInJn3FGgQB9A6BYk5k2xAwpwCnhLnfl9kBbGF gEqmNp1jB5kpIXCNXWLWrPtsEHMEJL5NPsQC0SsrsekA1DuSEgdX3GCZwCi8gJFhFaNoakFy QXFSepGhXnFibnFpXrpecn7uJkZgzJz+96x3B+PtA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8I/sMciZcuBCxWeol99HP5a9xtf2MDvdpx3bdGN G2+2JwV4hvtsMXINfNaxRyPm6tPW6iIvtd4GrrdMs1e9YrHhDlf6xFXn77W+ckFIw4WsHo6Z rCambwJ6guYllb66U+D6e3e1p/Y7o0fpVkosxRmJhlrMRcWJADnDLpQMAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Wed, 16 Apr 2014 18:06:02 -0700 Cc: seanpaul@google.com, abrestic@chromium.org, joshi@samsung.com, a.hajda@samsung.com, kyungmin.park@samsung.com, ajaynumb@gmail.com, treding@nvidia.com, prashanth.g@samsung.com, Ajay Kumar , rahul.sharma@samsung.com 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.9 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: Andrew Bresticker Certain bridge chips use a GPIO to indicate the cable status instead of the I_DP_HPD pin. This adds an optional device-tree property, "samsung,hpd-gpio", to the exynos-dp controller which indicates that the specified GPIO should be used for hotplug detection. The GPIO is then set up as an edge-triggered interrupt where the rising edge indicates hotplug-in and the falling edge indicates hotplug-out. Signed-off-by: Andrew Bresticker Signed-off-by: Rahul Sharma Signed-off-by: Ajay Kumar --- .../devicetree/bindings/video/exynos_dp.txt | 4 +++ drivers/gpu/drm/exynos/exynos_dp_core.c | 32 ++++++++++++++++++++-- drivers/gpu/drm/exynos/exynos_dp_core.h | 1 + drivers/gpu/drm/exynos/exynos_dp_reg.c | 26 ++++++++++++++++-- 4 files changed, 57 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt index 57ccdde..53dbccf 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -62,6 +62,10 @@ Optional properties for dp-controller: -hsync-active-high: HSYNC polarity configuration. High if defined, Low if not defined + -samsung,hpd-gpio: + Hotplug detect GPIO. + Indicates which GPIO should be used for hotplug + detection Example: diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index 1cc3981..18fd9c5 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include