From patchwork Wed Oct 9 01:45:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13827389 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010056.outbound.protection.outlook.com [52.101.228.56]) (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 F1780487AE; Wed, 9 Oct 2024 01:45:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728438340; cv=fail; b=kSIEQd5jsEUTUJeXTxA9FDY7sKikzD8UtNiotKwEeh2Jtu3pDqnNSeJfK67D06XYEUplnFGhxBYq2FNmSfq7ZYt/ZxbswuU5id6PH1b9hlgRRSwB+UaimteHYeF+pN8hh/6UDwlpwCd8c5xHZ3piIG9rT6/vw4fak06qXsBQzPw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728438340; c=relaxed/simple; bh=qoomHaj85HWQmh2XsGLqObH049qJmODhHW5WHv/MIz8=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=phwatNpm8FGWAD/ddVK/JPgjNu405JB1FKa52+Du+v787rUpyIrg8L3d+tDCu0tzJFoQcv9HqMfgf8XmgUZFslAFIR8WalADk1jL0RQbg5+cPUA+AG2k1Iqnd6Q59ulkMp0f5gMi99TG+C9ayAyMtuXyUuY4y7bOdGmimfm739U= 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=Q+qnhwi7; arc=fail smtp.client-ip=52.101.228.56 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="Q+qnhwi7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jYsGbh0LTTyWYwUDv5zMJamLsNmLL/8SHLMtZ4whuZudz9mFkZl5MN/ouxrts6RN5+pDMyI5FUpXOzN2qX0IvGwrn8MwCx1h7d5xv2oELgR78J698oDDDx0eua/JatznwKXKmASPKmRSorI3QfD9Or1YUyQHBm1xWTNwQJzjD73QCW3r/tO5eTSgu3ZUHaC2FjCWThpOoYxUGgdlNFP6yEe4NZNFlODwG5BegD56aiGgtyM7D1zESayhRBjMkyvuXGSOsPPvD4Qzh7aqEApjtOCmO2Wy27WxRwSnc184qFbO7IfsdLWv6YHJzgV9eNEXoExYLg8SvRhyfE8OUtXu0A== 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=O5DZhUDvEhSeZg3TAD2iwp2rTNW3Lhl221pa49GOsSY=; b=E55FIWAHkLCOv1y0l4aFatS5bee+2JRBzqU9QpqkA58MLDGCXRKNmpXe7sG2XASMKEXnncOVokUV0wepsPfihxUE8IK6cximFzN87wuG7g9YBZ4uVqaBAMlqIL05IvGvaG45cz7/lhgFNVDsqYwMqB8PhNeaASOTIpzOcdyNYUOFrdAAPoTDaPM8WblauP0HDz5Jm582edyb653SJbqIqknOkHTt8TIxdz3ch/yhe/PJlVS2TaGMz5gnPinZcXIzc7jj0PCj1TCv63Oe/OmYbT8wSYIF9+9yjbYWsobfUvGOmOyHStzdnmwfJx9l6kdMLFiI3ydu2k4UWrg3EwpyKw== 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=O5DZhUDvEhSeZg3TAD2iwp2rTNW3Lhl221pa49GOsSY=; b=Q+qnhwi7v4ak7isCghyFeZggeGP80tDm2/WyeHW2BStvEHYnnJMBTxBs15FFGPqkIyycSp1gGkL6RDAtqGr6SQldR67T2dmyIZJhlM1NC0KidMxGRZJSyEryf5V+VczSpFKmCSIBj8ODBl8MqfqwUVikZxPhjMJrnGzsI/kttx0= 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 OS3PR01MB8318.jpnprd01.prod.outlook.com (2603:1096:604:1a1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Wed, 9 Oct 2024 01:45:36 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.8026.020; Wed, 9 Oct 2024 01:45:36 +0000 Message-ID: <87jzeirqv3.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 9/9] media: xilinx-tpg: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 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: <87wmiirqwy.wl-kuninori.morimoto.gx@renesas.com> References: <87wmiirqwy.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 9 Oct 2024 01:45:36 +0000 X-ClientProxiedBy: TYWP286CA0030.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB8318:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e25d8a3-abf9-433e-5c7b-08dce804127f 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;ARA:13230040|1800799024|52116014|376014|7416014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: eaSWeziA9PNumUOjhfSaT95ZPYPlpmNIMxHMZ5kvWrXRhgfaD10nIZJQfdOhgtdjpd2gINETqyUMCvNmvUKlLnSwMEw2YoGZpqjdOsFns+YV3UsgmNIvXXoaQwQC2DftYQaWTyEvgk4RTgOrkfxN9p2WPcHWNlazvDLcA3F0JyHT2LIWoFb7/bUWiR4oZvtn6AUzgb6HM6CTsuC7n66MR0RBwrzgqgfF9O8amDe0wGp8pG+qCWlJWju0qnRiM3KQzVhDaZQuwnGCGLW6KYg7FaOw5+8durQ9tiT34s062iOKXWzQDW2NJVqKbhaoRSg5kqxSS27AvQ/mJRrkxWG/K/MbI9l0nyZ22qKPs1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NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UPvtImAj8CPhbkBXVyKSsopVKlFUh15oMbBGKuVfB9yDe1yCaiT0tb94OOn2V0SN/3FOKPyx9BTZYcZYj+08h8iNRd94v8p+sZpP0Z33OEw2cfkmmUJ1xvCCdnjnvrIulYyKClDTY5t3RkCuqnEduPHV1vB1IetNmk2Y/1OJlo9lyjwl36/Y6H2LAzlhM5Hlo0BlSshfDjBuOj2mtFTMBiYr7X04HrfZBdLacCr+C9JmBw2+20r/qhgc0JWe++AjUhbt9kMJhuqTmPGBz6uGQMXpPpTo8Ugt/BNlseYN1Hqyn8W/d8BY/0ZdcUUkEujTFT77f/cWykmP57CG91JDgoKuzYdnLsbucmAGJ0G/3Xod3WmzUv/RcYO83cHICg/ruY4OuLlm/9dO0dT/LMj1XBX5Y5HU6xPV5qm0J+ge/QWTN+0XOIf3WLZmYriMhwESXmaO9IqwZxczoM+yECFwQROblWUnYgyI1yFrwINIrU+auflQa02+tyjLyYTgvp9YpqdO3amvoKx6Rg3QavY0hMnAJoaNL2qZGP0vg0Wi+Ut82CNbnGDnwS9dTeIzG3K4vNO+wZGwoE/422ZdGDWsqtmejL5lpTQVl3REEFHtimaJ5jSq1+37mE/czYExtE8gUv37209mMBjpRP6t+L68pBka2mGKX8Cjf92z9xFWtOctQY3vWZM/k6FR69ulOTNfCQHv6rpvKRPhB7A/wx1wQ5XmXa+rmg8CHRQ0SXbqgexP0xOQbr9twGTJixmVtRIABr+GJALkZlViLAqRL41VO/vrEUO1ANxTa7uaKWXMwA2y4x8wo5apLz77YVtUPTqh+5lROpZIkXCEcISt4VCbxBoEM3y0vm8glJaBblcvkuAaaJmenzrQnAVDoV5SIXEvEwvT6V2gcwBizZzr0xHtCBDu1pzucsyeoId/AEsFJnUyGnMl/Uvm7G6hq0882+DauXRxYCaQ3PxsEETyxkmHVb1N6rrzcryUlCTq5ZJOD6aYUN9VRXOl6A3M2E+SdpYkaHCZimw8E9Uz5TAnmKXucoB9US4aq/6sfZoGO2TuHeL1q/gKkPocIF+AND4x//GdQeHqOtofBK5rQH4FNHgqMxT22DCv4bOnbvHIZ0yoGGMvEyDgIls02cwPndfaRafY0VQ1jK7YNjL4kh3qQstjdJAwdMQgwoDVtTfRvnbZW8+Gjfhc6johX3++SwW7lUbrTz2t8C91uWz2abHpWSmfAJtiEO3V21QS1Rr2S6jpXUuXTlRSHbDkqkWqVT9mYYxvsP8ge5EcJLi6spckFw2UPAJj42Yk1NoyR88tHnAdS6gYFFiSzBgsO2+KVgDekMjWxjusidApO2pyveJXUxh9rbtFbB0qmAWisd/wDdmFvg3o3xSM6hhJ/ztaa62MkDgoo4imUdO9fN14ddfmOsoHT89lxgZRqP2oC3bkKv3p+1z1qODp/6rFU/vozMaNi+Y9afXmA2CAx3wL8Tk5zPALNkPuTtX5k/xc+cFt4allSwkUa5BAu8uvplYm6bRlfUmkEpWm+JDdULZwp+zodITryOaF9iGsk5332itJZ4a8qkWOMBBZbQ4NYDfh+b/kuTdBBja1yoDMsmZLNUgf84tH/I8lWfz+gYQmvJbQRRGmQnM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e25d8a3-abf9-433e-5c7b-08dce804127f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2024 01:45:36.8460 (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: ckTcS4r6GM6w8k/2KZoyAmrxJ79awduuxAKdFiKQKXCD95LlNfyh8WKE/MRIadIK4OkVHtiAkMIh6CMcG8EdZ1CyuYU+zS3ueoNf/wLV2jy23IzyRZK+0Ty5v81MCocy X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB8318 Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Tomi Valkeinen Acked-by: Sakari Ailus --- drivers/media/platform/xilinx/xilinx-tpg.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c index e05e528ffc6f..1d67f576a44f 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,13 @@ 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 +736,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);