From patchwork Wed Sep 4 06:11:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13789822 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 5BDB2CA0ED3 for ; Wed, 4 Sep 2024 06:51:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:Subject:From:References:In-Reply-To:To:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q2DCwBcyAm0PIwYLL5kGzf5SziPmE5ed86ihsbUkLBI=; b=SpA0At6Qwd3SndkxD6SzQb8trK P1Q9brrVZtBAdDERBG8ygfmOkx86uRHmYo8ZvX9JOAl5/GWFjArvKpzPimlS0OvQaTsuCTcwMWfyh lOjxKLJ5MqN1WzyIla3iJz9q144Ms6gGLLjxL7tP9PIPF/c2DiW3Flkjd3SVAK2A9dU5vTgjZkumb fSsrU8vR8jhoSY87QS7+8fV6uyYVVuzikK0nLokeiWzyGgUcXsHHO7jQp+1zcqJ7suzwxaJTCphcv tjwUmPQztonNN2v3hYIaeldu235c0n3qXTT0Q+R8k3FlS8FHHcZ7y4e4+dgvZTxUV8YjIszVP8iAQ nuKtypMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sljNy-000000030Yt-34Eg; Wed, 04 Sep 2024 06:20:58 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sljFc-00000002zjD-4B7W for linux-arm-kernel@bombadil.infradead.org; Wed, 04 Sep 2024 06:12:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Date:Content-Type:Subject: From:References:In-Reply-To:To:Message-ID:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Q2DCwBcyAm0PIwYLL5kGzf5SziPmE5ed86ihsbUkLBI=; b=iyz5sS8ib4pr7Kce6YFtYaQXKt wTKr9r4yTROZe8BtvGOgt6UbwlyD4MgRH5gHuwbkPNvvq8hEwVjtB4GxDlw7wX6LVuma9buMWt0e+ 6ZZO41vVUOcwOZLxjXborTnqCtRS6lRdu3BAV7QRsqTiIw/8WD6V9Nem3giklksNMzqVyuQD0uQrt dXCIpo0bg82O27wANy7SwsOuaxVxImJ3H+9hSuF35KYuC+rrFPaJ37PmXoam0GQFJ0wYCCYc5b9dY areKOexxPTWFGTKKoDp9jquQ39iBDT+jDcaw6VaCvbliyUuYgz/BCKrf6JlFHtcbPo8xMAhGlEHJp BKf/Gkcw==; Received: from mail-japaneastazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c405::1] helo=TY3P286CU002.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sljFY-00000000PnQ-30pE for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 06:12:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H3p8qqlss7f0X4x4YU3Y49lHBnJlUZqwpkSu5+R9n8d5LwNSdLmVQ2RJBX0GUpMI8KGqfmqjBZLugw0xykIlr4DE+ARzG/QNFe7w65IKpIWLtsd82Vek+63M9803iWs2O3Px0inI3p7D62z4nmbpkAVYZ4NITdw5+GG+4xqmctdGvyeHfJB5jV1Ez+h6yfxPBz2JB34fysdGUyc/gDUWBuXDQLEz5XVW2RQp0sgiQV2LtDy4WpYafuAMNJ7CMs+DkDXsSdCSbgs/jp5LnV4peZ1+08PyiZbJM4SQoRUv2WV68zdkpby4fAVd3tFrAiWT+Ad7Vw5n+e9gW0I/vfVX7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Q2DCwBcyAm0PIwYLL5kGzf5SziPmE5ed86ihsbUkLBI=; b=R0so2kEgWaedYxU8FsPLcoTaLGAiLFkNJcntC6tVgqTL7ElNj5W3h21XBrpe5dwJt5f40jqIVaUmucC7SuZlIVU78p24THYOj0qlDpSxCJWkdAk01l0wLJlU0JB+C4uVyz5WNfO344fdqoSyLm1gWnUvh2tzU4WKAhmn2gYauIfQk658Q11gB8yEhPp9flTEcdMHI4LL7YcyJX2sEl0sWofGA0Q3LZBLzNeU9EMtVCMptMbTttJY21nJIkd5v4wvB03TlByydp4aUfSZi48gqhDwXsNN9U6R5NtogNs5vcTAnstntud6eUvKRln2Foojf/VoXI15Pkt7dtF9BtyXHA== 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=Q2DCwBcyAm0PIwYLL5kGzf5SziPmE5ed86ihsbUkLBI=; b=DeugyoXDwKEEoSUlekeSf4V26KMhOBBtrLlGg7ik2VBauMgbMT6fFRkN+gGriv3i2Kw/m3KGogbmhvio9WSTS87EMC2zjT+/IS24FxabeI1Y7SN624LmfodLrvWHaNoqoMVvyKug8aCMBwiLop2laM+OcRDwLZxudHU7BA6hytM= 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 OS3PR01MB7309.jpnprd01.prod.outlook.com (2603:1096:604:11e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Wed, 4 Sep 2024 06:11:52 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7918.024; Wed, 4 Sep 2024 06:11:52 +0000 Message-ID: <87ed606j88.wl-kuninori.morimoto.gx@renesas.com> To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org, Sakari Ailus In-Reply-To: <87r0a06ja1.wl-kuninori.morimoto.gx@renesas.com> References: <87r0a06ja1.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 9/9] media: xilinx-tpg: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Wed, 4 Sep 2024 06:11:51 +0000 X-ClientProxiedBy: TYCPR01CA0133.jpnprd01.prod.outlook.com (2603:1096:400:26d::14) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB7309:EE_ X-MS-Office365-Filtering-Correlation-Id: 344732b6-61be-44ef-208c-08dccca877e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: HP+NZ9N+EZickr3JwA7mheNhHriy4c0U1K5YPQavRrcevU9JGzcjmHSFSRf4Etk7cT901K81whGV9AG3+Y8IhzL/6fUlk5hcnJ5tKALH9szq73NdlV3nRRGwb6xKxclkFXkvv42/VSWX3cN7kWNyteJA8c1Q53D1nvJZTSKkh+kGHhTKErSVkdl7BGkqBdnaolmgjL8D+l4fw/a5Hfq6MkBmnBVAJnxZPJXX79hGcVriDAh2z/wE+BAivAn2SCR7pbN9Ds7aGpYXhCrzX7NhVsF3vUxY+g9TxZ7DudlSfHoJrF/XDBiVrxFPbY3q2xjwMO7pUqhLNdNHl/Q15VEQUhy29Cy5dBBe1icfnTReVW5MmPGsN1u4eTH9A2qup8gncomPvHTvKg65nHeQcL9mJglEsrsMP17XW5XwBzIgK5jQBZm1QmgU48J1mMnZ3EppOo4GNlmgML/d8QvXnqArsk2zOdxzxKp7SlI+m5ZWhcgAnE+QqpgSncN1d8MrUSZBMdXNzmWtF1UMst3pTaj4MVsNquuUjL63G0N0YZ9rC+DjkzC2d+i25kG2RSBQifgzE6z+fjZyg2J6I2byxYGLAA2ty7m9ULHxQ2bk194JnoP7n3PHk8pIHZjMvu326swRnbgsB2cIC+iYfOy6HUvY4wlDriIewXQG+4NUgPV1NzIM9mO0ikxNs67YChivuStOIP88+xW7aH63y328SPnRqPRyH6d4AzKk46DeD9S2HnYEKmSR1LYPtRxxU1zYHj05EaR44ppMU48bfGHvg+1VWCqyL6S2gwN/ACQcNoKE8v+Sx5blH/LJAoYD8FnTRPv2apn8VyhlZGkxqTrHZyX2F7KPi0qbW9rLgJrFDFGRI6xsZVXdFMqr308ntnNHWrVzyqEjQZvvrkjMpyOzH2vrC8CRfrPcBQawPEPHK/iU/Bve0KPEcI3glif0DlmlvVaMRwFlkESVVJ8uxsCe7yooAvzjLP11xCUfLLDGk0r0E11LhujG14K+syb6NP4EIyO702ls8tuO+NSjYXzXiqKPSlk9GrfX2ovIM9kVZC613DNuQWQ4GbnCo8ga6Sn0qqXyZxXAfTFXryfC30vdWMiHRFQfnjkcEocsf92gwzwdnBSDU8SLCQ+BUl8lWDuVFRtzu8NQhSSrKxF4HCnVobBm/CaeC4j7tTNyPHE7wEPVgU0YsyO38hzy4TKtQNWmVjOvLayXVGdNzD5ebAMWXxLdXtB56URlwfjDxDRpvQCdNyIcYIK5cawwYvokQnDPZgJO05qcie2Zmm908GIUmzQQAdCFmg4CgKCycnF/yKN1CcEu6Ew8sjh1rYZ9StWgVxePFMKA9VGTraruGGOzXN3OC25cdmZvgWVoV2FA2HwuWk1M7WfsYXeDx9fbTDrEE0ZA7XCgT/MuMg9JmFTmfL04NznVhy8by5Zi3ElegUxVisE= 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:(13230040)(366016)(1800799024)(376014)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G61LdNOU2ezDhVYJPB3FqmA0WqkFBQ9i0w+3JHPrMiR+TvhPuoQuv7iaSAeDr+k6H+JqNkMgIHmdCljIw2EOuChf72Jdn2bD1juM2zObiMizTt3AXzeWgWIX6MH09jYPd3/Uk7IFGkDFArOONZxBBUrL8qOLC1ttlyTnw3ym2ITR02w9a3H0gflsBupd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xB5PfhVxIzKDXbhXzQmfnZiRgkvvHs60CKG1xPoi2NP2EdQFhJQ+hGRS9Im/EIEYE+maXdj825rlnwnMB4ztiod1Vo+/OHWc30N2sMrAwgfbhq50+GNS7saN5jUqXPRBEQ+lWmc619FIpzBt7JzzmkUksQsBfQ2qDxoIi9VsjRzesJGOBJkVHZPYloo5jNZDXeVRIPya8MggGEElZAdsATed+waIjE4nAAEfn6Ik3IJAgO5X4rPhqa3MdX0tT2D+aqczXrm0ih6sjjqmwT2VB2/cZqms5iAkbEIPqCN7XtLlQd5RjBVFlj8qWZJkOGolAGbSwu0FLYNc0u/JwT1bBnHAvS0MW6/DhcJKH0SxCtNLf35tOVT+UFSEKJPP3i2gVwf774Z1kxPGjQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 344732b6-61be-44ef-208c-08dccca877e4 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2024 06:11:51.9403 (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: rip8+Yt0MFm+G2/vfroCB9ujjwh11VdFw1yl0lV/a0O860gTE6cH+hthhSYdqdCtxG/hPeVCnpY1BdewlMODFlmX4v1dd+zw6nB2chNiVCS/2cu3cni2Cw3TdqL19rU+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7309 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_071218_043733_AA0953B0 X-CRM114-Status: GOOD ( 13.15 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Tomi Valkeinen --- drivers/media/platform/xilinx/xilinx-tpg.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c index e05e528ffc6f7..d8336965085d2 100644 --- a/drivers/media/platform/xilinx/xilinx-tpg.c +++ b/drivers/media/platform/xilinx/xilinx-tpg.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -711,22 +712,14 @@ static int xtpg_parse_of(struct xtpg_device *xtpg) { struct device *dev = xtpg->xvip.dev; struct device_node *node = xtpg->xvip.dev->of_node; - struct device_node *ports; struct device_node *port; unsigned int nports = 0; bool has_endpoint = false; - ports = of_get_child_by_name(node, "ports"); - if (ports == NULL) - ports = node; - - for_each_child_of_node(ports, port) { + for_each_of_graph_port(node, port) { const struct xvip_video_format *format; struct device_node *endpoint; - if (!of_node_name_eq(port, "port")) - continue; - format = xvip_of_get_format(port); if (IS_ERR(format)) { dev_err(dev, "invalid format in DT"); @@ -744,7 +737,7 @@ static int xtpg_parse_of(struct xtpg_device *xtpg) } if (nports == 0) { - endpoint = of_get_next_child(port, NULL); + endpoint = of_graph_get_next_port_endpoint(port, NULL); if (endpoint) has_endpoint = true; of_node_put(endpoint);