From patchwork Mon Feb 6 02:19:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9557043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0E1F60424 for ; Mon, 6 Feb 2017 02:29:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFB9525EDB for ; Mon, 6 Feb 2017 02:29:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C251926C9B; Mon, 6 Feb 2017 02:29:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2DF625EDB for ; Mon, 6 Feb 2017 02:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753117AbdBFC3y (ORCPT ); Sun, 5 Feb 2017 21:29:54 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:56074 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752871AbdBFC3x (ORCPT ); Sun, 5 Feb 2017 21:29:53 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKX02AN4L53RRA0@mailout4.samsung.com>; Mon, 06 Feb 2017 11:19:51 +0900 (KST) Received: from epsmges1p3.samsung.com (unknown [182.195.40.66]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170206021951epcas1p3c598c27ebab94ad13f4399f2bf17bfdb~gkUJcB-I83213032130epcas1p3v; Mon, 6 Feb 2017 02:19:51 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 5B.91.06713.74DD7985; Mon, 6 Feb 2017 11:19:51 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170206021950epcas1p36b27f17497f0dcb0be8050db64828abc~gkUJNw4K80984309843epcas1p3J; Mon, 6 Feb 2017 02:19:50 +0000 (GMT) X-AuditID: b6c32a37-f79196d000001a39-77-5897dd473332 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id BF.9C.06487.64DD7985; Mon, 6 Feb 2017 11:19:50 +0900 (KST) Received: from khg_DeskTop.10.32.193.11 ([10.113.63.38]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OKX00IF6L50VXB0@mmp2.samsung.com>; Mon, 06 Feb 2017 11:19:50 +0900 (KST) From: Hoegeun Kwon To: inki.dae@samsung.com, robh+dt@kernel.org, krzk@kernel.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Hoegeun Kwon Subject: [PATCH 1/5] drm/exynos: dsi: Fix the parse_dt function Date: Mon, 06 Feb 2017 11:19:40 +0900 Message-id: <1486347584-6762-2-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1486347584-6762-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFKsWRmVeSWpSXmKPExsWy7bCmnq773ekRBrs381jMP3KO1eLK1/ds Fu+Xd7FZTLo/gcXi/PkN7BYzzu9jsmjde4Td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48zefRtWcXo8XmTXABLlJtN RmpiSmqRQmpecn5KZl66rVJoiJuuhZJCXmJuqq1ShK5vSJCSQlliTimQZ2SABhycA9yDlfTt EtwyXt2ewVjwh69i3fZ1rA2M03i6GDk5JARMJNa/vcwMYYtJXLi3nq2LkYtDSGAWo8TPxVOZ IJxfjBInbhxmAaliE9CV+NpznQnEFhGwlTjVeJ4ZpIhZoJdRov3jL7BRwgL2El/fPwWzWQRU JV5tOQHWwCvgLtH17CIbxDo5iZPHJrOC2JwCHhJ/HjwHWyAEVPPp1CvWCYy8CxgZVjFKpBYk FxQnpeca5qWW6xUn5haX5qXrJefnbmIEB/MzqR2MB3e5H2IU4GBU4uH1cJgeIcSaWFZcmXuI UYKDWUmEl/c2UIg3JbGyKrUoP76oNCe1+BCjKdBhE5mlRJPzgZGWVxJvaGJuYm5sYGFuaWli pCTO2zj7WbiQQHpiSWp2ampBahFMHxMHp1QDY1x55nvlh6brFNbEPzhe3bbQwlEt/Vpfzqaj M+4/bJm/Yz97VknwW1Z/htA3X9TWS/68NdU+/FH6laLHRf2dDbuP3tALXf3j6dvMP2uWH7rq OaPVc0vK9KtK3HL/q7ZdOLbkt3ysuYzJknN/Zyaxu22Lkmc/FP7n/6KS876ZIomhwSwzeDx7 /yqxFGckGmoxFxUnAgDX4P9vfAIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170206021950epcas1p36b27f17497f0dcb0be8050db64828abc X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?6raM7ZqM6re8G1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbUzMo7IKs7JuQKS/sgqzsm5A=?= X-Global-Sender: =?UTF-8?B?SG9lZ2V1biBLd29uG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTMy9Bc3Npc3RhbnQgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170206021950epcas1p36b27f17497f0dcb0be8050db64828abc X-RootMTR: 20170206021950epcas1p36b27f17497f0dcb0be8050db64828abc References: <1486347584-6762-1-git-send-email-hoegeun.kwon@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The bridge_node may or may not be required. For example, mic and dsi are connected to OF graph, but fimd and dsi are not connected. Also the OF graph is not needed because the panel is a child of dsi. So not have to go to the endpoint and parse the burst, esc clock-frequency. Signed-off-by: Hoegeun Kwon --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index e07cb1f..214d486 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1652,39 +1652,23 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) if (ret < 0) return ret; - ep = of_graph_get_endpoint_by_regs(node, DSI_PORT_OUT, 0); - if (!ep) { - dev_err(dev, "no output port with endpoint specified\n"); - return -EINVAL; - } - - ret = exynos_dsi_of_read_u32(ep, "samsung,burst-clock-frequency", + ret = exynos_dsi_of_read_u32(node, "samsung,burst-clock-frequency", &dsi->burst_clk_rate); if (ret < 0) - goto end; + return ret; - ret = exynos_dsi_of_read_u32(ep, "samsung,esc-clock-frequency", + ret = exynos_dsi_of_read_u32(node, "samsung,esc-clock-frequency", &dsi->esc_clk_rate); if (ret < 0) - goto end; - - of_node_put(ep); + return ret; ep = of_graph_get_next_endpoint(node, NULL); - if (!ep) { - ret = -EINVAL; - goto end; - } - - dsi->bridge_node = of_graph_get_remote_port_parent(ep); - if (!dsi->bridge_node) { - ret = -EINVAL; - goto end; + if (ep) { + dsi->bridge_node = of_graph_get_remote_port_parent(ep); + of_node_put(ep); } -end: - of_node_put(ep); - return ret; + return 0; } static int exynos_dsi_bind(struct device *dev, struct device *master,