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: 825694 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010040.outbound.protection.outlook.com [52.101.228.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0406884A5B; Wed, 4 Sep 2024 06:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725430315; cv=fail; b=KlvvWNXrmKTZatamLSFBQcDleAKLdZIg4u/NFkzHT9M1EPBjlOIyw+/jpIBhBpPgXP6KKHo4cNlHTkc8P9S11VXhD8nNz59jkdWyVS8gDj6tXgZDfklA+fqBO9bMsFCfY0BtqTpAOZtidVHarDULPou4YuEnZyc2eoJzQn5FGWg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725430315; c=relaxed/simple; bh=xMHU/wDBDv+VQhaiP/xPrdEib3JmlR+RDnMyTZnXUqM=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=mU/jLFhgceh7acm4gmYd8xmsLeqfVN5pzANowxvXl1+TK13RbnvoVIoLu0YXG/Mpv9gPMOhtEpNbMDiOUFuB35E3i+IE4i9J9kbgL5rt88xdgHU8CpUNWX0DKTeqp/j+tAs5uIk7N2BuCiLhixCH91wogiDx3f88RlGCiNfbRJ0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=DeugyoXD; arc=fail smtp.client-ip=52.101.228.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="DeugyoXD" 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) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/Q15VEQUhy29Cy5dBBe1icfnTReVW5MmPGsN1u4eTH9A2qup8gncomPvHTvKg65nHeQcL9mJglEsr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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/Uk7IFGkDFArOONZxBBUrL8qOLC1ttlyTnw3ym2ITR02w9a3H0gflsBupdjII6yZI4QedX4mKLGX4Zerq9FBQ6eMtKgXPZ9raKduDvxFi26Vrc1Je6CL0wMn0ZYkDHS5giH4fmLUnbHY+z6OgpurQ/hgtxwgdJWnWH3AYNwiwB4YNGMfrGpA+/p8YnKC1YS4lTJ07DYIBhYbu1t9UF6yGT2dZeJZgLd3Gx6HVW/gaOAtQ/gIQJ5XclHzLZNFvsw2/peodS3gN1V5bk2whszZF/Or897EtQNvzw0QE0k/WGLuGuu9hQamO3ITuLWR8L/580fJA5TjcGLDdZLUYzkamoXZw52Wv2kszQlJWM8Cold4FhuNyeDOoKxZxGah7oa5/jE6cVXkDTuMKuM2nAOoL8v1Hy6FcLLIME5jD6Xoq5XHU4/FA9QiGV7+hMR/g7LoVjLu9hHBQOjbT2cCxN36hL0SzTd32J/RVEK6D7Mem70Y1/XQjJvkh6wAZYxJ43NL0rtbvFVE7gERhw6vPIWzMlSPobMHr6pzTxCcaWc8+2/QrcqaU9FOQzttJyTEtsA36Zdb9AJJMk+LSSiRSYrbi1F14UOmLj41faDxPWeTctLGFHGEY8jKSN0oB2ouZnX94EZviVDG8wMZr0TBfHhcjouUxM7nU4l69YCxE7HO2xAY1FjfsuyOQ6o7Z1dawvKRk2SfPkfc0u8GzFJUuwR1g/aNDK3LWbiv7+HqjLx1F7QozvE5HVcYXF8MpJlsI3kJbzDi2TyVgwkORUgWcsrN5x0ZUEbtRVCCoIzRCPjjky7cZXAzDH0RvW/WJsZU7z+itQQ1d/3DpTCuQs+4h9sgWOSIOge1YCdrXN1kbYbnNpftAy9nGa9p5jjVllEQoY8t23c+W3YIuUwgGxWye3CG2F2nxhB5yfOCCiJ/8drrLDam8TXgOCKA+PsFPDUNf5Yd9hgHGAzVYdT4s9Eh8afdLIBNDkWCHNx9ZEgqrcR1qBrjrx9txgVAnIVCs06zP5GbjpIFkQl3KFWnpijZOBcPgFI9FlxvGOOSEuJ7Dc/hcn59UOOdXv40Y5NyvDrxm+zkhjocAj7u8MxmEO7yCCj+z3xxXB2xB5PfhVxIzKDXbhXzQmfnZiRgkvvHs60CKG1xPoi2NP2EdQFhJQ+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 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);