From patchwork Wed Jan 31 05:07:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13569591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1038C54E4A for ; Fri, 23 Feb 2024 17:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Subject:References: In-Reply-To:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3lnc3ic7Ocl4jjwANswvHoezR0Du0r+9K2vuGtp7iaU=; b=ETfWL1mkt211t6 yKwvWA9y1lseEhVmLyeXbsYSOkowr+1bKREQPrajojeVPIvPuihjT0PZls6Hp3WSxBDGszorLB9Le jJa6eM9aQUx5C15AIYzQpoNUjyEX1n/GFOwRMA01gWvNuMbjw+19pkHqESvyjDj3qVFtbLci9d5LO gTh/YSVYQz/sNLJ75dTCfWdqd5TEiZgDvB4wo0zDh3lrY9NFBWI527zXJOoA/Ulwdnu+CeSP+tHa/ 6PSRCoVv8gW0lGRT+NfP/xkHpMGTDW++WeiGCOKSlapTSnqVboAam7nGOQhAEW9Cz3BGhgV+jgLoB hkqLspW+/xRNsX/dT0PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdZ6r-0000000APjx-1KWI; Fri, 23 Feb 2024 17:13:17 +0000 Received: from mail-tycjpn01on20701.outbound.protection.outlook.com ([2a01:111:f403:2019::701] helo=JPN01-TYC-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV2pC-00000001V4b-49U0; Wed, 31 Jan 2024 05:07:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RVPZRKUYO99AKmtmZIANdYYT8ltWAnAah/BTC/FEIXpNeo+wM5+kxbfJl0G1IIbIIxAEtKiLZnOOu5moLpGkbd1wB6rZKu36nG9IhH36+nBTjFvfl85kLyg9N7ap4mvBCRGs/ggdds+kygnAcXelrtp/viI719T8+Jc/zs9omQ187YkuyV6LU0YxNZeCmZ2jTmV517cfTfr3+n8rz2pEB3Wcwlau4I3Fj1upthh2O7lgiJodDv/opystE43HwbNp0QL0QsA0PiTYFT3LY4UC3AFWbdKpeSziTB+z5fphCp1tiPESnpzaPBoGQ1SioYCYKC4uxt+eCGv18yqORsxKqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W6ZlktUf1jDk5RZKbRdLLZaC+trhnnw0tE4uuwMD11Q=; b=mZ4CRupanCIjfGpzpiI3eIKzejmlErapcCttA+NTckWXm38uUKRG83Ng5v1c1IHAeULSvijUdmbIackZ/fWtz/y52UOokDINJkjeRmITIz3heutiX8GPPeHFsGrTxLQit5nKdLpCbzb9jZGszUSIALl8Q7U+dpo/JX5tDsmMEa6Lzu2OZHSModSN+lWfBmc5rNkx2rHIXm6Gjoa5glV4d0U56b0BacuA4mIYnalTHi15FybvwIA4fyDFqkj9VP49fwT9khuFy7Yo4c+q0lffwUYle62ILWvQsIoQiR/bc7LbtIj6R6lHGy0k/wCVNWOIjzqjSk5fohWqGgWS78shsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W6ZlktUf1jDk5RZKbRdLLZaC+trhnnw0tE4uuwMD11Q=; b=n2K2AHMf11JTWdwOp+L8dYAIIdNJACKGtiv19U6ZoOmf0TEUv0muh07JOvSm4QdRbAKXOm/f8o91s6bqck1KeHoI/R1YHTTIa+S0EAHkngxwbnNgekT4OxKcuS/p2QQk+ciRCe60Bm79iomwi9TNOKHplatU93cBA8PHt6iLxgc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OS3PR01MB9898.jpnprd01.prod.outlook.com (2603:1096:604:1ee::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Wed, 31 Jan 2024 05:07:46 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::ce8:8f5e:99a0:aba4]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::ce8:8f5e:99a0:aba4%2]) with mapi id 15.20.7249.023; Wed, 31 Jan 2024 05:07:46 +0000 Message-ID: <87r0hy5bvi.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: "Bryan O'Donoghue" , "Lad, Prabhakar" , =?iso-8859-1?q?=22Niklas_S=C3=B6d?= =?iso-8859-1?q?erlund=22?= , =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Abhinav Kumar , Alexander Shishkin , Alexander Stein , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Andrzej Hajda , Andy Gross , Biju Das , Bjorn Andersson , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Dmitry Baryshkov , Dmitry Torokhov , Emma Anholt , Eugen Hristev , Florian Fainelli , Frank Rowand , Greg Kroah-Hartman , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jacopo Mondi , James Clark , Jaroslav Kysela , Jonathan Hunter , Kevin Hilman , Kieran Bingham , Kieran Bingham , Konrad Dybcio , Krzysztof Kozlowski , Laurent Pinchart , Laurent Pinchart , Liam Girdwood , Liu Ying , Luca Ceresoli , Maarten Lankhorst , Marek Vasut , Mark Brown , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Michael Tretter , Michal Simek , Miguel Ojeda , Nathan Chancellor , Neil Armstrong , Nick Desaulniers , Nicolas Ferre , Philipp Zabel , Philippe Cornu , Raphael Gallais-Pou , Rob Clark , Rob Herring , Robert Foss , Russell King , Sakari Ailus , Saravana Kannan , Sascha Hauer , Shawn Guo , Sowjanya Komatineni , Stefan Agner , Suzuki K Poulose , Sylwester Nawrocki , Takashi Iwai , Thierry Reding , Thomas Zimmermann , Tim Harvey , Todor Tomov , Tomi Valkeinen , Yannick Fertre Cc: Alim Akhtar , Fabio Estevam , Jacopo Mondi , Jernej Skrabec , Jerome Brunet , Jessica Zhang , Jonas Karlman , Laurent Pinchart , Leo Yan , Marijn Suijten , Martin Blumenstingl , Mike Leach , Sam Ravnborg , Sean Paul , Tom Rix , coresight@lists.linaro.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-sound@vger.kernel.org, linux-staging@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-tegra@vger.kernel.org, llvm@lists.linux.dev In-Reply-To: <87o7d26qla.wl-kuninori.morimoto.gx@renesas.com> References: <87o7d26qla.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 23/24] fbdev: omapfb: use of_graph_get_next_endpoint() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 31 Jan 2024 05:07:45 +0000 X-ClientProxiedBy: TYAPR01CA0190.jpnprd01.prod.outlook.com (2603:1096:404:ba::34) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9898:EE_ X-MS-Office365-Filtering-Correlation-Id: 1609f5e0-ef84-41eb-7a55-08dc221a8ff6 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IEBropksgC+ToszikgowGNYh8MKcu+RszgOm0rTn0Bb/ElC0vVIKiDuZySbQN6/Znm3lW+x8barQ5lVdCLsEFhHv85XSiXKRSMMgyivkLf7vFHayIuwKir1yttzFbydr/y3xIUNTrYwAdY8bO2uKVUJMwHoyyp8BhrU/3yEvTs+odP+b5aWjWnbP/rpfjtoUvK7BaP+Doq7Yelchlg6O5KOMv5t9m2SnR1I8DMRr1oaCEhmFqZyW0PR5xnr5WmUw9ieiFH0XpLX9LuparWyNArJlBZo2CWQxOqLGkMmYUXJzImB6pywom/rx6SU8K8P+6SOQ75axWijYUxVsyhbXVvcw+z/HNkW5q1etsqD42LIX9kFyvxjNx62yreeN/83mLMpi9lSbHpTuhOuwLhVM0cnltXeImw7XdwOtAg0Jz/5nuIN3QQ0pA9P1dbluYWhWMB107vupctzI9FlO2EHrFfADXs7EYHkg20ax6vChmOs0hvnmnt1UhejBpOqMUHAhrOsnfReGt6uS9NPnkoCIpSFROtNNKB3eHIr07CILTv4Q0nQPwMjCzXvTN/AvlYapBncInNyUduhw7T/zaF4vyY1ppOqb+soSlYSQ7j3sgCx5a0PdcUVzar9vxpW4Mg4Z X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(376002)(346002)(136003)(366004)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(1191002)(6486002)(38100700002)(2906002)(86362001)(41300700001)(36756003)(7276002)(7336002)(7366002)(7406005)(316002)(66946007)(6506007)(6512007)(66556008)(66476007)(54906003)(52116002)(110136005)(478600001)(7416002)(83380400001)(5660300002)(8936002)(26005)(8676002)(4326008)(2616005)(38350700005)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BUSZpvfCNfHW4ny2/osA+aiwnLA4qxIqD+1Zx9Fc4ogyf0/Skoi0MsR7T0NWFPS8eszjMZy5LXcGT/+sv1dAZ9oCJklGM1f5mUTsOTbEiwfde6OkfV+C/bGVtqJj8JD2N3XcFfpbkF2/HFGCX4WRFOSLsMw2w90Y9NQS7fSi0ISBUk3Gfc5giWOPaC0fTSBW76xqnWUMVhkjeJ54O34sCAMM4gbBRGoT/CwoQcjs7HGxvmpcf+ZFkx0r96kx7BrvAViLTdJROfFnRsZU0uY7QJv+r1XrugEDaOy78PbTqJf5TY7NRWLVN/mnZFHZWZ1yDR5KmnPjTP6cMqtPt/sjlVewDXDvzEdg1F7SJezQ21RzxQSYThwWT+lutXsbtsv+q2HNc94d6a/nNqydYfjMIB2P4rYFwbJhZXnSMPR3yNRV/Py1e02GvWCL92l7PbQWKvNhpliOaIyV5mG+uUV6tAwGkfG19oYsAV1CU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nTBXxHpb11njT2UC16XaPJ7TrLzVI1A+wPB55qlGkKajFaVbSmtTgjlYmADk6tOd2fw1hyLGW5ozK0M= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1609f5e0-ef84-41eb-7a55-08dc221a8ff6 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 05:07:46.0462 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mmOTx73FDNJRbhpZSuNql1dQBcLVBtC2+ukXakR2vdpKa2ufFw2/22XTxddH7uy/8une5NcVH6XoYvnRLVR6UT66r/755tdRWWys0pyRKL1Ghm9i4pWt6V0RjHP6Sqih X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9898 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240130_210751_162354_2ED14F4A X-CRM114-Status: GOOD ( 14.42 ) X-Mailman-Approved-At: Fri, 23 Feb 2024 09:11:35 -0800 X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org We can now use of_graph_get_next_endpoint(), let's use it. Signed-off-by: Kuninori Morimoto --- drivers/video/fbdev/omap2/omapfb/dss/dpi.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 22 +------------------ drivers/video/fbdev/omap2/omapfb/dss/sdi.c | 3 ++- include/video/omapfb_dss.h | 4 ---- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c index 7c1b7d89389a..d018ee755cf4 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -845,7 +846,7 @@ int dpi_init_port(struct platform_device *pdev, struct device_node *port) if (!dpi) return -ENOMEM; - ep = omapdss_of_get_next_endpoint(port, NULL); + ep = of_graph_get_next_endpoint(port, NULL); if (!ep) return 0; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index 321ae18f2747..2ba2554055fc 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -15,26 +15,6 @@ #include "dss.h" -struct device_node * -omapdss_of_get_next_endpoint(const struct device_node *parent, - struct device_node *prev) -{ - struct device_node *ep = NULL; - - if (!parent) - return NULL; - - do { - ep = of_get_next_child(parent, prev); - if (!ep) - return NULL; - prev = ep; - } while (!of_node_name_eq(ep, "endpoint")); - - return ep; -} -EXPORT_SYMBOL_GPL(omapdss_of_get_next_endpoint); - struct device_node *dss_of_port_get_parent_device(struct device_node *port) { struct device_node *np; @@ -81,7 +61,7 @@ omapdss_of_get_first_endpoint(const struct device_node *parent) if (!port) return NULL; - ep = omapdss_of_get_next_endpoint(port, NULL); + ep = of_graph_get_next_endpoint(port, NULL); of_node_put(port); diff --git a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c index d527931b2b16..e92d84c9474c 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include