From patchwork Mon Apr 21 22:39:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4027821 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 79ECBC0EBC for ; Tue, 22 Apr 2014 01:30:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AB8B202B8 for ; Tue, 22 Apr 2014 01:30:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3127A2035D for ; Tue, 22 Apr 2014 01:30:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1C0F6E7A4; Mon, 21 Apr 2014 18:29:55 -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 0725B6E462 for ; Mon, 21 Apr 2014 15:39:53 -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 <0N4E00FGRKAF8L20@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 22 Apr 2014 07:39:52 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 27.88.18501.73E95535; Tue, 22 Apr 2014 07:39:51 +0900 (KST) X-AuditID: cbfee68d-b7f4e6d000004845-e2-53559e377246 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 9F.72.27725.73E95535; Tue, 22 Apr 2014 07:39:51 +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 <0N4E00B0HKA7C630@mmp1.samsung.com>; Tue, 22 Apr 2014 07:39:51 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH V2 1/9] drm/exynos: dp: support hotplug detection via GPIO Date: Tue, 22 Apr 2014 04:09:10 +0530 Message-id: <1398119958-32005-2-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398119958-32005-1-git-send-email-ajaykumar.rs@samsung.com> References: <1398119958-32005-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42JZI2JSpWs+LzTY4GajqcXK938ZLQ68P8hi seHNQmaLK1/fs1lMuj+BxeL7ri/sFjPO72OyWHV4A7vFlEWHWS3mHsx14PKY3XCRxWPnrLvs Hgs2lXrc7z7O5NG3ZRWjx+dNcgFsUVw2Kak5mWWpRfp2CVwZX558Yy/oMKmYe+kNYwPjVa0u Rk4OCQETiZ9zT7FC2GISF+6tZ+ti5OIQEljKKPG7o5MZpmjRtgNMEIlFjBJHF/dDVU1gkvjU PpUJpIpNQFti2/SbLCC2iICbRNPhmawgRcwC7xglHn+5ATZKWMBL4tynV2wgNouAqsTk24fA dvMKeEhsvrKJvYuRA2idgsScSTYgYU4BT4nt8/6ClQgBlUzc84MdZKaEwC52iW1rN7NCzBGQ +Db5EAtEr6zEpgNQV0tKHFxxg2UCo/ACRoZVjKKpBckFxUnpRYZ6xYm5xaV56XrJ+bmbGIHR cPrfs94djLcPWB9iTAYaN5FZSjQ5HxhN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ya3Pbr6 Vu7nzY/M30UNDu15lW/2cfaFKesanRhNHWqc5k6xW53t1PhwacPrUFWPBQfvJt/99cJdyeUt m5EZhxJLcUaioRZzUXEiAJqJ/Zf5AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Mon, 21 Apr 2014 18:29:54 -0700 Cc: seanpaul@google.com, Andrew Bresticker , joshi@samsung.com, ajaynumb@gmail.com, prashanth.g@samsung.com, Ajay Kumar , 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: 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 Acked-by: Jingoo Han --- Changes since V1: Address reiew comments from Jingoo Han .../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 | 44 ++++++++++++++------ 4 files changed, 66 insertions(+), 15 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