From patchwork Thu Jan 5 10:20:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9498819 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 F1A94606E0 for ; Thu, 5 Jan 2017 10:21:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD31A27813 for ; Thu, 5 Jan 2017 10:21:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF89D282E8; Thu, 5 Jan 2017 10:21:16 +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 73B44282E8 for ; Thu, 5 Jan 2017 10:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938409AbdAEKVH (ORCPT ); Thu, 5 Jan 2017 05:21:07 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:36474 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761478AbdAEKUm (ORCPT ); Thu, 5 Jan 2017 05:20:42 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OJA02LV5Y1PAO10@mailout4.samsung.com>; Thu, 05 Jan 2017 19:20:13 +0900 (KST) Received: from epsmges5p1.samsung.com (unknown [182.195.40.66]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20170105102013epcas1p13f91ebfde302780fbb034fc49e32d3b9~W2ObK4JJI2552525525epcas1p1w; Thu, 5 Jan 2017 10:20:13 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1.samsung.com (EPCPMTA) with SMTP id A9.06.31243.CDD1E685; Thu, 5 Jan 2017 19:20:12 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20170105102012epcas5p308c2d3ed269d9bf76f76f1d38422eb54~W2Oa51OOY0343903439epcas5p3W; Thu, 5 Jan 2017 10:20:12 +0000 (GMT) X-AuditID: b6c32a2c-f79ad6d000007a0b-1d-586e1ddc0c4c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 56.E0.28332.CDD1E685; Thu, 5 Jan 2017 19:20:12 +0900 (KST) Received: from khg_DeskTop.10.32.193.11 ([10.113.63.38]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJA0061NY1MWW00@mmp1.samsung.com>; Thu, 05 Jan 2017 19:20:12 +0900 (KST) From: Hoegeun Kwon To: robh@kernel.org, thierry.reding@gmail.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, inki.dae@samsung.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, a.hajda@samsung.com, cw00.choi@samsung.com, jh80.chung@samsung.com, Hoegeun Kwon Subject: [PATCH v7 2/4] drm/exynos: mic: Fix parse_dt function Date: Thu, 05 Jan 2017 19:20:07 +0900 Message-id: <1483611609-23522-3-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1483611609-23522-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAA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RRn JBpqMRcVJwIALODdE3wDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRmVeSWpSXmKPExsVy+t9jAd07snkRBjMua1ncWneO1aL33Ekm i+tfnrNazD8C5F75+p7N4v3yLjaLSfcnsFjc+NXGatH/+DWzxfnzG9gtLu+aw2Yx4/w+Jov/ e3awW/zcNY/Fgc9j56y77B6bVnWyeWz/9oDV4373cSaPvi2rGD0+b5ILYItys8lITUxJLVJI zUvOT8nMS7dVCg1x07VQUshLzE21VYrQ9Q0JUlIoS8wpBfKMDNCAg3OAe7CSvl2CW8b/ewIF 97gq3n3czdbAeIyji5GTQ0LAROLSuQvsELaYxIV769m6GLk4hASWMko8O9UM5fxilHiw+jMj SBWbgK7E157rTCC2iECVxINDS1lAbGaBz4wSl5ebgdjCAnYSU25cBZvKIqAqsfneFVYQm1fA Q2LSvVYmiG1yEiePTQaKc3BwCnhK/DxSBmIKAZVcmW83gZF3ASPDKkaJ1ILkguKk9FyjvNRy veLE3OLSvHS95PzcTYzg+HgmvYPx8C73Q4wCHIxKPLwdf3MihFgTy4orcw8xSnAwK4nwSknn RQjxpiRWVqUW5ccXleakFh9iNAU6ayKzlGhyPjB280riDU3MTcyNDSzMLS1NjJTEeRtnPwsX EkhPLEnNTk0tSC2C6WPi4JRqYEx8InKy6YV/85fd728ebIov/nC6xlPye7bKvive5XeFBTVY 5NekMKrP/h0Z4nCk9G9nkZTl1r+z35h/3v/4wpRjFWGxStMZHXOZttmY+tw8tWB+aLG5Qmbc Jy+56ytW/617t1P62nzLQ6m3nHO+O0q7mXJ4uqSK5ThtXSO3W2VL9FTpVZldT5VYijMSDbWY i4oTAYmV4SWlAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170105102012epcas5p308c2d3ed269d9bf76f76f1d38422eb54 X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 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: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170105102012epcas5p308c2d3ed269d9bf76f76f1d38422eb54 X-RootMTR: 20170105102012epcas5p308c2d3ed269d9bf76f76f1d38422eb54 References: <1483611609-23522-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 OF graph is not necessary because the panel is a child of dsi. therefore, the parse_dt function of dsi does not need to check the remote_node connected to the panel. and the whole parse_dt function should be refactored later. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index fed1a94..cf9361a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -269,28 +269,9 @@ static int parse_dt(struct exynos_mic *mic) } nodes[j++] = remote_node; - switch (i) { - case ENDPOINT_DECON_NODE: - /* decon node */ - if (of_get_child_by_name(remote_node, - "i80-if-timings")) - mic->i80_mode = 1; - - break; - case ENDPOINT_DSI_NODE: - /* panel node */ - remote_node = get_remote_node(remote_node, 1); - if (!remote_node) { - ret = -EPIPE; - goto exit; - } - nodes[j++] = remote_node; - - break; - default: - DRM_ERROR("mic: Unknown endpoint from MIC"); - break; - } + if (i == ENDPOINT_DECON_NODE && + of_get_child_by_name(remote_node, "i80-if-timings")) + mic->i80_mode = 1; } exit: