From patchwork Mon Jan 29 00:54:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98827 Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFvT-0001BF-0E for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:11 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1C3ABB22147 for ; Mon, 29 Jan 2024 00:55:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7CFC8BEE; Mon, 29 Jan 2024 00:54:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="XXmjXXgP" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2109.outbound.protection.outlook.com [40.107.114.109]) (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 C144F8F48; Mon, 29 Jan 2024 00:54:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.109 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489690; cv=fail; b=FxJqVWG2Yq+ta2PnEuexI38/+5fDpSPRAjusX+OVHT5FfB+GgB+RXzPzHAHSYJT283clR4FCYTf5yX+jFVv1bt3TzoedwdSOBGpVT2EVrynzSDTzNRZzFIMaSW8Flqfp4fNPgVUBxjKgb26TO3WKuYZROPnqBG52LsjmH+G+OWs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489690; c=relaxed/simple; bh=yvewR6pc93N3Y0GWnksPNQTrp0S2Ek0rP4C+OOW2ccA=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=Dxjls8gRgAMLYNiEyYAy6HqRtmG6hTwDdO6IuRFoXLG1gWGpnNCGJTQxvMi6l/OxyBDGa+SecrqWFMP546gRyRfPVrBAltMZ7wvtJ0vH4+Zzxidx4KG+XnVyaft4Dx3r9sLWzVmHYFu5zHzmvFeiCkq2ppZMeY+AVDbyuT0BTao= 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=XXmjXXgP; arc=fail smtp.client-ip=40.107.114.109 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AlSL6IRLQhz1X14k2ruoQ33kJgmpLZhxyoENxvp2aoBF1EbLdG0UEwsguc/0JeKhI9z9L7FcCdAZVDUfSAus9S5fSAAL1jzgt3cOpvjIvYHjQZjkdFLHI+IxDS6MrcnFt/c9vzLrrg5TsG8olxZedqgz2Pc+ycAiaATd8ftHpkfIgHkmUUyXEHLek8RjWwlg3E+P2+u2PM7iUsLRDnaZXS8ciEVQFsRoqKKQETUla1lok0p40PGQr21t2MCXkq1R+NAMExYA2x+FtAuTxDIKMX3FwGdFf5967pJEqKRwGJ1sGqHjlkWyjypyTx4sg/f62vIh70ZGqhUEVm29DiwJ3w== 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=kZeevCSkJhWnukHfI/O3IFXxrii7TdVIIuL0iuucKkA=; b=My2JXLwLYtKDcfbWm20MIdqYBxUjL6fPCMKeYBBqiSfIxblLYgpAQSi8/ep/Iz4U7j5qjnj03Jv/8Qob+PYIX30FBTFbSREGyzTXcYQlLvpKbuka5h7/bSPstJTBWX2wJVi3BU4UfzT5lj/ONhSmo+QKREPuMcE+FJf3k+5AoiYw2gAhQxq/Bt+bYUzkysPit51seIZYV7TGQdLi7w6PBzX/VoYTab1s50V7BIYENM0qkJ1KPS6g2XeUpUYKqlPFjlE8EKQU17+dTM3RtofuaeekTBopeniQBnPza1GxCilL9+sU5pOZuxo8Oaq1cIll4IZ0Y2rkV/KNy8hRn53nDQ== 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=kZeevCSkJhWnukHfI/O3IFXxrii7TdVIIuL0iuucKkA=; b=XXmjXXgPhkT+J7E3SEgG756DgFhJZcV78c4ELs501s0pO4byCoyZzPqVvCfl3BOHCspsPIkASljOW1w4LbkfP7U76ziX4tPQgqFATCxScYRSt/UMwgixL39JAbtgVmU3pvgOZflBqsCdiz6jfPXpz4aIf5s0xrnXl/WXdbAPl/g= 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 TYCPR01MB9304.jpnprd01.prod.outlook.com (2603:1096:400:190::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:54:45 +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.017; Mon, 29 Jan 2024 00:54:45 +0000 Message-ID: <87ede1klgr.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 01/13] of: property: add port base loop User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:54:44 +0000 X-ClientProxiedBy: TYCP286CA0141.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31b::6) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9304:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d607a67-e464-424c-7fc4-08dc2064e2a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2QCe0NaOmMZhosQKIwj0Q1WixOEtEnUA7E6vvC1G1LPXJyiD08QVDf9HmtoUMWfMDjhDiSa22NVZPLzE0rYnZz1gKniFCVKOw0AECJrZ2ZFmZ4Vk6rLvpr2oiv2+Jjb1BPqsz+m793d50Xeg1YRLB/sVJc20bvW1RjW4/7v400m5WV6TxyckppYdUMQr0ngmS79gTuhEitZf+FN199J2yrU3GPa5Kq1IegIx3IR+rSoZfqW0iL1/PqsHq4TzbE/PjxMJ7k4Oi+TYKbPbf5qEBIjjuxDyxly+KADt2BcTvQB+8zS8qiSegg8qHa9zEkKN2sHx2QTwAgXvsrQpN5jpVuDiB+h+Y2tA7TD8QqzEwQVnx8zNcQUk7v5elX95uS5fgovQ5V0+SxQ+eO1mf3HwuOk46jkzuvrTaGoSWmZShbRLBQNQBXmXhfjNWN51+KJmkyRzDnV2F5Ke/xT2PFwsgtsxpS1367PiRrP6f64BjxjGMDPeCtEVGKbK68b9EOSuzyqNIzHNl9Aw/HU8ffaw53NEXFaG/v5+/z3R4OOF8rXbY95QE28LIW6QVY8QdoHYAUZDv7ocQyLYc5R+GgnW8AiuXlwdWj2A6pCFEW+qMiLTt8nayGenk0YCQQi2Y4YMt5lLjc2rHfbtZu1H0/aoRg== 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)(376002)(396003)(346002)(136003)(366004)(39860400002)(230922051799003)(64100799003)(186009)(1800799012)(451199024)(41300700001)(478600001)(2616005)(52116002)(6506007)(6512007)(86362001)(38100700002)(6486002)(2906002)(5660300002)(7416002)(66946007)(110136005)(66476007)(316002)(66556008)(8676002)(8936002)(4326008)(26005)(921011)(36756003)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y532ykRldd9sawv3wzzVGlFCHOSurnIqJljghRTko1ByUTlnZs0BuzFhcPBZuMSgDpvCG1g4YxNjgtMa2QpaTie3XkdFyi42A2BFonF0bVSMwzDm9Yh0fEvPekCG4kIk7f1vZWwtd/7byOjZt8YItxXwIchuxn7kiJGtld2xJ8lpOl+g3X+/AItDyim2YJgnKQA8slc8WEB/ZzkCv3OUuiaZrR9yNuQnyIPtD/H+o46+wAT4/A2aDphx/EtAOwwXMQF7CXg53NWvvZldysJj7ABUd5qinXnsNBT7FhG6+HgzPxXWaFD43RNf4PXYvHkc66+myGc1dNbCM1GgyIglstGJcim0/pmNw5AcvJo6F1wnJJPuuk6Nfgcs74vUiWl50k/6WhijAVfkmgVFNsKqZuN9/UvgVQXbRuo2h9TW+S9Y0yLFrz8Y1JOL6VKngLFE2+f/D9WOem83qggASc+fStdWMdqtpORbIMncj9tpboG5wPESSX29ZfvdwHvWIqtlcPtpulCdx/9FFjLsDcKCiRbPQJX/7OMbXWLQ9GB8y6QWPk87X+eDs12ab5XkJkYG8SvMOEM2m+uLdqx9SK6DJ5xXVU82uvqY3vKGFxU7OBQG7a/LsJnKkHuZs8kEygI6A5KnfyU4569sGD01rGOoSO1BF4Gt1+CKZdmzDrfb+iPVE3V0PYD1X554lnmJthatb0GhgUzOsCv3aZiEFEm9K0nqOa2M2DyeRk9OfrchhQlNyGA2kmX/QEJKhq88avZUB9edFFa9twF3T8X5v/D/BGsjzH0n5N97JqjXkidf0d2W+TL8lewNk5npnMldrUeXseczWQDNJePQn3cow4gs5BrjTm42igjLYzV2ZV6B6noOpgsV9pc0HdCPk+Ucz8vV9xCZ0YvXACy5SIg9TxSu9sXVJnrPMJ6qY19eCc+mijjbDxfRJ4CkmJ3nkJwpmFgCWJUdevkCfz9T1cyMQKKF3oYGbQHGY/NpWZcVDzWQEQH0rxl5/75D1+E/KjOig/R6AXu2H1qy3uRMDWkDGcQ//qCVi+pv1Dg3wm0EFIMMXa0IYZbk7y4/qSNJTdx9bhETDTqRfSAFpho+mezAMLIA85P/WHAaE1GKJLMkbNHuDBbNfPY5DAA/+iRN24R2BLTa7fGQJY8KH9D7NgRhcDkFiqbTQI3dUSqkHF65ThS352Gw+ZN4GM+yCJeTH9iMWMXcJdMq36+tUZ6kSCtw9CbcophyL/moQ6oLcQ4XYzgzmw/cPofrug2AykrmRTYQwQOshKmBkMU6MsQGPIEFyHwqA26QbMPeHplB8IzsjdqUqzDinUGGvUnZwfrRQ+x1u/Tpxd5gbGlCvNaUS6rShsWjDJhUEQ6Pf2FNoGe0OT5jc8kK6va27roNDdgbMCJApqdxbSEfZn6z8g1CXvnvRmlS/KIjmA4rjedsfMTyWPQOqw0N6FUqXQNTxrew9EubtX98+VsTbGxYHvwib6KO2xaaTgcPgoLIu0GXwOK2TWGzkfkoz/a4nSe79twkjB5QmfZOrTqiPUMo5bLlqP4EjFHo/O6ZcYnCd0lYBX+TdqM/VBB/yOzw1yGFKQOucshOGbRhrdk0aY63B4WkTQdTPKYvGCrTlbVTeOtZMmcKJk4hVN0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d607a67-e464-424c-7fc4-08dc2064e2a9 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:54:45.2498 (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: mNb01pg5Zt1xXmh53GLmZvqhfp6CbGqRlbRDxnuEjn6ZrfKjn5HvGS7TY4LqCUjMkMvwHx64fyV/0B74rOkXfOrzOZ4AwtyGNtZq87MgV+mT1zo/r54O/Me6uLzcqsT1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9304 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We have endpoint base functions - of_graph_get_next_endpoint() - of_graph_get_endpoint_count() - for_each_endpoint_of_node() Here, for_each_endpoint_of_node() loop finds each endpoints ports { port@0 { (1) endpoint {...}; }; port@1 { (2) endpoint {...}; }; ... }; In above case, for_each_endpoint_of_node() loop finds endpoint as (1) -> (2) -> ... Basically, user/driver knows which port is used for what, but not in all cases. For example on flexible/generic driver case, how many ports are used is not fixed. For example Sound Generic Card driver which is used from many venders can't know how many ports are used. Because the driver is very flexible/generic, it is impossible to know how many ports are used, it depends on each vender SoC and/or its used board. And more, the port can have multi endpoints. For example Generic Sound Card case, it supports many type of connection between CPU / Codec, and some of them uses multi endpoint in one port. Then, Generic Sound Card want to handle each connection via "port" instead of "endpoint". But, it is very difficult to handle each "port" by for_each_endpoint_of_node(). Getting "port" by using of_get_parent() from "endpoint" doesn't work. see below. ports { port@0 { (1) endpoint@0 {...}; (2) endpoint@1 {...}; }; port@1 { (3) endpoint {...}; }; ... }; Add "port" base functions. Signed-off-by: Kuninori Morimoto --- drivers/of/property.c | 48 ++++++++++++++++++++++++++++++++++++++++ include/linux/of_graph.h | 21 ++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/drivers/of/property.c b/drivers/of/property.c index afdaefbd03f6..9e670e99dbbb 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -631,6 +631,42 @@ struct device_node *of_graph_get_port_by_id(struct device_node *parent, u32 id) } EXPORT_SYMBOL(of_graph_get_port_by_id); +/** + * of_graph_get_next_port() - get next port node + * @parent: pointer to the parent device node + * @port: current port node, or NULL to get first + * + * Return: An 'port' node pointer with refcount incremented. Refcount + * of the passed @prev node is decremented. + */ +struct device_node *of_graph_get_next_port(const struct device_node *parent, + struct device_node *port) +{ + if (!parent) + return NULL; + + if (!port) { + struct device_node *node; + + node = of_get_child_by_name(parent, "ports"); + if (node) { + parent = node; + of_node_put(node); + } + + return of_get_child_by_name(parent, "port"); + } + + do { + port = of_get_next_child(parent, port); + if (!port) + break; + } while (!of_node_name_eq(port, "port")); + + return port; +} +EXPORT_SYMBOL(of_graph_get_next_port); + /** * of_graph_get_next_endpoint() - get next endpoint node * @parent: pointer to the parent device node @@ -823,6 +859,18 @@ int of_graph_get_endpoint_count(const struct device_node *np) } EXPORT_SYMBOL(of_graph_get_endpoint_count); +int of_graph_get_port_count(const struct device_node *np) +{ + struct device_node *port; + int num = 0; + + for_each_port_of_node(np, port) + num++; + + return num; +} +EXPORT_SYMBOL(of_graph_get_port_count); + /** * of_graph_get_remote_node() - get remote parent device_node for given port/endpoint * @node: pointer to parent device_node containing graph port/endpoint diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h index 4d7756087b6b..fff598640e93 100644 --- a/include/linux/of_graph.h +++ b/include/linux/of_graph.h @@ -37,14 +37,28 @@ struct of_endpoint { for (child = of_graph_get_next_endpoint(parent, NULL); child != NULL; \ child = of_graph_get_next_endpoint(parent, child)) +/** + * for_each_port_of_node - iterate over every port in a device node + * @parent: parent device node containing ports/port + * @child: loop variable pointing to the current port node + * + * When breaking out of the loop, of_node_put(child) has to be called manually. + */ +#define for_each_port_of_node(parent, child) \ + for (child = of_graph_get_next_port(parent, NULL); child != NULL; \ + child = of_graph_get_next_port(parent, child)) + #ifdef CONFIG_OF bool of_graph_is_present(const struct device_node *node); int of_graph_parse_endpoint(const struct device_node *node, struct of_endpoint *endpoint); int of_graph_get_endpoint_count(const struct device_node *np); +int of_graph_get_port_count(const struct device_node *np); struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id); struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, struct device_node *previous); +struct device_node *of_graph_get_next_port(const struct device_node *parent, + struct device_node *previous); struct device_node *of_graph_get_endpoint_by_regs( const struct device_node *parent, int port_reg, int reg); struct device_node *of_graph_get_remote_endpoint( @@ -86,6 +100,13 @@ static inline struct device_node *of_graph_get_next_endpoint( return NULL; } +static inline struct device_node *of_graph_get_next_port( + const struct device_node *parent, + struct device_node *previous) +{ + return NULL; +} + static inline struct device_node *of_graph_get_endpoint_by_regs( const struct device_node *parent, int port_reg, int reg) { From patchwork Mon Jan 29 00:54:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98828 Received: from sv.mirrors.kernel.org ([139.178.88.99]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFvY-0001C6-05 for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:13 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 419E2283D12 for ; Mon, 29 Jan 2024 00:55:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5FE78F70; Mon, 29 Jan 2024 00:54:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="As+k2tb7" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2118.outbound.protection.outlook.com [40.107.114.118]) (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 16E8C8F5B; Mon, 29 Jan 2024 00:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.118 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489696; cv=fail; b=Rh4wJzhFMwU9T8sY+yPek4GkJWg84ug9B0GGt0GGwtWgHZj3zcXCjbhp+NXNXFyiG1Wg8m9tPpbXNZ33zBqwK7zB6EglxmBsI+2s76yvsbKVOQ3KztyrUv2o/zjBXEaywzPXAUQNObwb5OgKkf5TowZwX3SDsYN036aKl5nBvGA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489696; c=relaxed/simple; bh=LNx/Y3XVBWXRP9qbZzJewNGqiMJzZV1/IPJ4MkOJ+mQ=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=APOZxSNf29//KZ+Cs+f191c3uY6MYXwsZULamzJTXUvJdK8jco/jAqZnZiraH0BEB/5To7NAQ58rjZRBXpluvw9hFJnJTz2qZmCb/ClwrBvAzwBh11wMbes2wOd/0rVFlVXxxRDgOnA+yjJJtEwcMdeMshwbM7Lg8GeUud4RZkA= 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=As+k2tb7; arc=fail smtp.client-ip=40.107.114.118 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JFzSTuWUHi3udeBp/KNy3WzOhZBvcc7TA9ghhq7kNOKb9cRuKh5OZJvyvMPNFPiHjnOf8hxvc4BO1Uq7qIA97LeJ2sPSOEAT4ULWj0gr2DabqSJziF9zzz9UKCYKOsB2PjQw6oGD95DBV4YHL0tkH4XYbQOfNSxznOWYBRKX81j9rN5wNP8lmwg9cCGtzZ7X1sWBBa1XWDMH2DJOO0kIjbhTcw52rGbnYOi9HQRCeRmvpuEyfoiRJbOA2slxWLA7LZypK6o6DLWpVBzHW+3kndQ0UnJNqslpyCoi53ZHzaMr2TN7hyFy6q7MKTv9z0NNXSrRRAuOxsufsqQkGBlkMg== 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=axjGkc8Pl27E4lkjlasY/HmMl0qJa/xeFIKmgqYuKtU=; b=AAexfejaf5e2DJXdVV21Xbk00baT1Ot24tnUbS1GI/tTc7mLBKe6Hk7qOLphhXH7B1Vp6tBuAcN3W+jWudVuFByZhal3FpBpMMLEfYOI+KwmeTB9zqG97lq5ZzBitHbRJ5zdoa3LVQBO9s/GIPxkEilVt6nBjiA9UHpzaQ84dLm867YuY4UW6boyQd/3U/36xQgFsJI1O0vRnJzqBFGEHwfVuxd8GcCq0+6yUNGrtqinLoBlK9dw7hr0mK36p4hlgaGqJ3cdkOwFB/j6ku8kezifo6zi6/P3s7AnsG3AmEu3X+ZJH+jhTeusG6ujUzOW2ZPRECY+rZjkq+RqPNigRw== 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=axjGkc8Pl27E4lkjlasY/HmMl0qJa/xeFIKmgqYuKtU=; b=As+k2tb7gIuTgJiSwd1A7Zz88l4wOZzOS4v94EsVROBgt2BWkTJpedHVAK5+aIH9LvZlwqeDZwZJiTfULCzGNXbXqhn45bePTbnA7lZ2/jVASDkeZyJb9iHI8v5hK09Km9FbNXwGScAW4DwbOs0WCTbwe+cFbvBRS7weedIMSJQ= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:54:51 +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.017; Mon, 29 Jan 2024 00:54:51 +0000 Message-ID: <87cytlklgl.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 02/13] of: property: use of_graph_get_next_port() on of_graph_get_next_endpoint() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:54:50 +0000 X-ClientProxiedBy: TYCP286CA0069.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::17) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: 5774b662-80cf-46d3-3221-08dc2064e62e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bRZsteqv6I3csXjKS43LzmZV9G094ONp7YUB2EIk+s7VRN75afSG6yzLvS0cBvPWpR38J+jx0wE0lnaKwn0atcXBIp9d5P2me5LXHsCD7zv332JtIcEH4gLfzWHNkYevqHU8MTz4V74h1iTILvr3CDB0oh7bs2RCnEds73Lx9zTk7ewXc9234gDXGrWed9bNN7ScfWiwHs8W8V5WLMwiQNA8bwNXHhoxozoyFZPyvqoIaBWaZQfcq616fdfG+7Ffj40wENeTnEDtO7M/o2Bsbd//z5ZBjI4FEqOGjLQxoL2+/AJEAyQ0GzvwQY387esfYL24ehlzGNVRCBbeapsGLeXutj/V1CsG22hEwuihSzxyTX1VaGhBIdBLRdJPfsmwfb9EwyNEWF6kWhQCi/Kw0FKKcBh8ocjKzalrBbGae508OOdQffl91tKa8bQEA1hD3r2GMXx0ErPpo90IYfvrWH77R8SC8LOpuPswKiHFreEz9m3gXcbOJna0x/Iiyiu8opxMMwZf6YwqXnvcRwuSr9eKdVgu9QpyzCsVWxjrrotwm8O6yUZ3Fp2AvbhJbmn/1DXL2EcEgKDQwcYAUuqFOJFtiMcEdgG78UHtz1QTmgbbeDX3TIix7kIfKfD8Kqy6 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5r0BsJGiN+VW446Ou1PjZFfFuyyYFWf8gIF/kP3eHJ1DBzCQ7rIJfL/cVb3GG2HaGQ1T63znONxY92EusWbTGfzGpGvtaw2LokDE2uIuypVwa1K+OWBTojSgBFU9k0wsGnW8tt29ECJ63mGwc5KJ8O44s/PosLQqPr1ppzwHgKUPcN9LglsGDbv5Kabjvj5yX5KN3YNpzaY5/iGZQHwDlXZWzIZDY2XCxOdWrsS3DjXj4xXEha1J4Y6pMtmSt1thoH2c71uCvvFI5fQ3N6U4d4xx+qhlcSYZAH/h5mw3p2q+ZJKO2Eesd382SYnL3j19wH7XH7mmFAMsfqnkHGjUQkUMSXd+aoQrOOM4cNT1lVSQ7VkizZAPpnFMhEGiSEK+aXOMSu7qinwzJNuDlX070r85xTvogW7kzPxl/iwSAup0TR41TfnVLe5P+ujsPeZx8x/UVI7MTeQVxM2l06mrOSd7ANFVP+PTm8XFashvKYAtD37M+ky2fjVba3ea7IziH6e87kRb/r8cjgkNu85yX3F9gSaYqDlrHfX0jB9fKKXuarQSfjyaSAWkfZzvbAnQsf8JNDszZoTkwZgh7lyI2l7UM5fNAhFZL2O6A8ALTRYZGn3Q9t4XVcthFxE3iitIK4J8fJkiC56FDQc8QAp/pGmhMt4CUYAtnL/3OTAwAygsgZufMFZJ8MtuEqFdP4NYiFdPl2j3uSP0Rc7MVu6AhuFfsa3Y6lYUNTA1ia+t9IwEJY4tkqaVVz1te1ndDYn3hLk5EjPP7oRrIxypXNcMi0lLohwj+iiqXBkkaw+Snna3bQB5aL0mHhS8ycKGw9wEW6/QapqLakYkrV4a9kPU0MmjjEuvkAusHdyoJ/CCP/haMpFlpScWilprwSUzu0IG/ZbHckcydANksoWIcDDic0dT8ldeYeAxWCuNMPOCsZ9cnimjcO/CNpInVMe09KicxNwXCwkbDW2PXjuA8affGo3n5yeRK8ldXRUdE62SGf9+8ccfOPBZQyLezcGpwO4WolQKGiGxqCEm/OZxz2OEMYRzm+AEarIBbXHO6qCfvYqUpNboPgdHTl5/mq6frKgNJaFM/wjnmxHRs3lCC03HHCcGD+qM1mVpUqWCZ33YW+UgsFzKhH8XUYtbvbQ15Uvuw3E+QoRgvIBrGkq5FEqZn9rL2Dm6xJqH+u2MBkA7JAhd/uQ18f3G2s0y/dxgUu20u/mYS/zBr+QuWht8/jQsk1q+78aRE04G+DgEcB7zAQgUaTSUARbHAL/2MuF5GODB99VFErfzAGHkyCT4y+H4EAk03ZZ7ly82WN0LbfWDS/qlNngEh8mB91/IcYaYj00FTuWPGC6MPbz0n4xtYMQOEXyCQq/QLTaaKn7CnFRSqB1qy3hEkh2/JJoH21HsmCaqn2y5q+ezHk+QxmWXZqWLvJrARNGYCIwAebbeAno3OEcukS9BBMYFNgVCHOQWQ+cPhUBKgws9RjQUsov8DAXi1PekEoitbYx5FIvWFA/SK+tehIiZmUMK/OufB6vXQa8KsR2yIQaRId85Tsp4pSXOC+3uTyVoXjcqgJ0XN7gdlCac62zrsor1MQPUZdimSqBW6R6zMfvK5GYIoi449X9vYOMdUkkYyc5CvMbkoWtOeew= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5774b662-80cf-46d3-3221-08dc2064e62e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:54:51.1567 (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: NdrMwULPldTyR3UpCM9+zWe+Jna7BOIxCtgVIbRADzIJvl8b2VgridhG+/JjJgqLk5kFgDz+hmMm7HIFj+keiSLe3B9pRPoGCwJH42POCGTb+c7mKy1gCmkQQLQctAQ/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We have of_graph_get_next_port(), use it on of_graph_get_next_endpoint(). Signed-off-by: Kuninori Morimoto Reviewed-by: Tomi Valkeinen --- drivers/of/property.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 9e670e99dbbb..14ffd199c9b1 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -690,15 +690,7 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, * parent port node. */ if (!prev) { - struct device_node *node; - - node = of_get_child_by_name(parent, "ports"); - if (node) - parent = node; - - port = of_get_child_by_name(parent, "port"); - of_node_put(node); - + port = of_graph_get_next_port(parent, NULL); if (!port) { pr_err("graph: no port node found in %pOF\n", parent); return NULL; @@ -725,11 +717,9 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, /* No more endpoints under this port, try the next one. */ prev = NULL; - do { - port = of_get_next_child(parent, port); - if (!port) - return NULL; - } while (!of_node_name_eq(port, "port")); + port = of_graph_get_next_port(parent, port); + if (!port) + return NULL; } } EXPORT_SYMBOL(of_graph_get_next_endpoint); From patchwork Mon Jan 29 00:54:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98829 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFvg-0001DJ-2i for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:21 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D30EE1F231EE for ; Mon, 29 Jan 2024 00:55:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC0E08BFB; Mon, 29 Jan 2024 00:55:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="HGjJLnxG" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2099.outbound.protection.outlook.com [40.107.114.99]) (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 2F819944E; Mon, 29 Jan 2024 00:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.99 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489704; cv=fail; b=BzI+SRk13oOWj4H5VO7h7MqRdLwHdTu3ZAN7iLO7DDGTAhbtxld11m/WJwIHxWexOn6jRgyd1TuaozxYQOhVAYBIJCk0q+5n2zo8l6O8pps42Ge+4z7+IkThZ0bnk4Tki6egoxrGLVLXJacJRC0ajYbZD9LGwQR4OEo+0m5hrco= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489704; c=relaxed/simple; bh=+1l+NQrPhoy6N0GQOXrzb6DuHsMWeTvod/7F91rB2Fk=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=chbvf+QdDwkUqGOQsvW8lYF2AgRnMkiBf1v1QCSFAKmiSs5ItRpJb+fs3EOBg/Vp/MscogJuzr8+3fZySjROewW9AJHIyaxsUzkBMCwiUzrXVjQpSg6Xm16r6HtZcphGuePVSEPsOpYLKbex4Z9yhjyZZumATS5/2GjswZW6JFM= 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=HGjJLnxG; arc=fail smtp.client-ip=40.107.114.99 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UjCptBsOMipXeEQODGhbjl72Mq7gHBVPgMXQCxLplArrLNuWMOZcOFCNMXqc5tPItdZRvhq78oPcb69m/BYYL/gZLeRSfP5W40h3iJbGYIVK5GbkGh9lONZN2vxI/SF6r3hVJyYOEp+WTHLpHzNYo+i9uV3iz4uD1+mczW6NvMDZZtXn9Zvhp1gdJljmD+Z2RlPXVfarm+Y+uHuIN6g9areEDsh7HTbI9UlGH4DWl92azYct7OBFvrYRnB59IPNQjg8k+yHu6U5OxnDW6D5L9mUymCkuD6JyJBOGuWx5/3BfQmNVvdq+YOpA2W2S2y8MphX2MU7usUXpnH6PLo7gIQ== 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=53LgFL/tgEMW5iVClRMNKc/fATDPCwYVOacfnZCL7e4=; b=CkJu+LpDx0uTHIVSdCm0cjKQxlS+fAufpu2fl8ribzcnLBXg0IJFxzxG77ExIbkGZqPKBt18bLB6GNbXYeGUJ9x9cg39Qk2kbd5qKS0EqWNPdXljua3sCxKIuKvCoeln2Aa8R1vZRuUSuuxGdJjD3J1cT6m/iGIeeDkoPkWZefJLFbO3R+yG8WBlO6PA7/fH1HiK+FQKKBGDNMWoTJYljBZe8rSdOXnx502KHpOUGNVNTpgguc1x71V3UYIQfllp/uW2miTSDatryI59VZc19+XcrepN2iWhhvMoRijjd+x7Y8vm/qDPzNM82X4rB82jNtIW24TbkLVJESSYdoj/IA== 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=53LgFL/tgEMW5iVClRMNKc/fATDPCwYVOacfnZCL7e4=; b=HGjJLnxGqABlsvQ0/wYSEkVr5qX+tMMni2gr4zTLLfVpFEZhbjQ0Q4JdH5z6lRJVEP1MNPE4sUa+XCMJFn6Sa3JbpRANoaZFCItljYt8xcWd+QV+tYO6WfpcYuOMBKqp9pHHT5qFjm+2YY3gV+FUcZynLDQ8ePPmE9XyVZQULBw= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:54:59 +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.017; Mon, 29 Jan 2024 00:54:59 +0000 Message-ID: <87bk95klgc.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 03/13] of: property: add of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:54:59 +0000 X-ClientProxiedBy: TYCP286CA0351.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:7c::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: d2462796-9874-4e9b-a8e3-08dc2064eb43 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5ET4Fe56R4WpB3j55apOMp2zcpaUyZKou2otdPfIpadTY5+Jy/kNcWhavxVfTc+HQcmskCg1jbnlkPrreQ5o6FgoqXrv2YYc5OJDYMlllLrr4q9m3ye3lTtZx06VlJVQJNaUfa7SSXEW6yiQQzfho44ZiMBJmWOdj7jb2DPEh3WRgfeegiSmPa4xVsuJbLEyY0PiGrAHXF0wguWxJNVO/JEAMnUWgQOyZt4eInoQ390MN2Lt3QyDauUeyqUw1QvBZuVsb30WcICQXJXcsEsJ21IGNkqbEnnMFe/lCHpRtH/EYT5Hl85MKGxU6YooulLLRcEwssPPws1PM5HINQqEm5oohJI/oiBx9xyfbDibfNHPIQR/OMVPeQ4L4nlXNkHKJTTrmrXXugtLTG/p6lirTPgZWyXx1Yo60WaJtFOshb3T1KpAm91r1W4/8a3+LvRCTovsZ8GL3QGXiQx5e1ObA0SuDS0mZN5JOtWuAMWElq3lHXwYzBoRfMOHsNh9h1LVGTzPC7qJ8SSTWp2J7b9Nc6c8COUFEfjVohMy7sqyTMU2B3S0MjJ3KMRJrIH4kLgcdw0W2b3+DZcemTeubxopUshxbC7XRCx9A75rMAAw7GnM4U23SKLDeZSNC3QMn9bV1MowAiObYkXLanpXh8Q+D0tkmYkK1mD60utZcNngwbE= 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k0zrijg3C8GA1OUrNQlE6EuPKCK8jL2QTQB2Prcm0UwEb2+JHSynD466HVkAifn7rZjgewOW2ld7ZGxC8u/2K6GX+abs5qP16vJN1BbsbK7Ctp9eWUBgl9DEChWJIUTZgUFrE2hXqsJl9Pd70/uKmq5L5G3LdJczW8QU2uyDo/HN7DU/mcV8xcUk+3lkZ1r5V4BCK7GQyW0NXzMc7DqiLPweI6QSEJrvrlNM0gmoweiPrnPF90lye3Mh5NFoBJk5UpugOqNZ8ZTUTabz1DdPuHuvnexBTk4/8dzaYcyqADPYMRM5erGVLx+20251Hc55YLUGX3jE9lr8ZREg2bdc31/a1fwQOptxqLWJtDETCVJ5EvnbaI2dJ3+sf8qeDCn4xO5o3WZlQLeQbbi71E9rNl8GzVELAWgcbmb+5nWcLT+n2GmWdkaNl+FmelSnCl5Ftr3/wDMu5n+5N0xPjIu8jjRqzGnIacNlZ5m1lTbwrKsSxhagpRilL8JKBEUgpKk95owAXB4UzT1EjEFAX5QQWVjeLpLtg6o5zap40iqHaVoRHMBmRD9qlJjogUCjDH0M6AMeO04pib8bPCCAv9tDjnLSCIk8eIrp6VG6pVx7rtDdP83ozIrYSHOLU0hAitrhicYcSl15HaR2lJW/a9Ma0hYQtJ6n6JVMYZPy5iuh6rrMNxq4whGeSxQj9WFDzvp5VtR6gvYuvhuc6Qf2stfulHi/IXZDQV7syqBXOO6LIbM8UKeyniTqhST9tOMjSspqbyojvpjN6ecNR28koUcFAli2pNrFnU1465BsPXcPbFvkeQUGTQj2b7SCDejai5E5F2sEZNB3XsoXWQP4IoWJhI44cvjdabFKV1IFca9wEww6ya2ZQQZvNQwpAFBE2wqf9LniAVo86uQmZGzE4Vp4vn2Mp6Flum6Qq6dp53iMDqGBsMzsDY7E26JlyrrLIwl3X+bgVS5nkhcvHM0OQFezuwVWs2M872ER/wuBtgWZPzBKqtMpzoVpKshDBpRZ38nE07n/85G7okXuzBLY6W4yCPoj+FDymCUTrdHaZ4gZMwAB9cp/09lssxMBqRSbAvVxR+dCJ+ydOA4AIXAozxLruihEq+WTq6bZ2BySg52bOT9FPl6pEu/3N662WrmoobZYAxlJdx1ErOQeBoOhkt3hiJbhMPNqnbBWTlr2fYDgwcZofi/XDshJu04kus0FChWiHJqdqGs3TkB1trx/3ITxRJRwJaCZmlGnFoHSS92rFKYEjX9faK+PFi5ve/m9pVetxB4By1smBS+g0hRJWBx6YeWNKTjl+ohxacf/YIQYkof6ppkeJUD/uEX+o59D09s+13GlQvfjesR+z01THko7wHIobZ9UsZL2wFw7gqaJAWBktxtwN49puthXmkz8UJsWT6QIJ8XeyjkBtfK/dD9SG7kL3uzwDcyYgJkVIC/p4URtMl5j9FuLZ4M8uC4iXXmgrn+rwXxV3OPRL3GR2RWvS9hoNPkygWChAiaeBUPYw6E9xsC3MVYcvGS30ZZLoEkiRgJDV25XgCFMd9TCGEPh+EXQ7zbz1uNA/36GDwF7UTgwRSWCXjBqbD6X3u+oLTgnOqpyP4nmDD7/7w6bgJ6jsqdGynaLbB5qMcKKJRHX9Kc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2462796-9874-4e9b-a8e3-08dc2064eb43 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:54:59.6862 (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: aKzr4mCHETD2SwEsu1d2aEmm/BzaizXtPSq2h3+y6AAB/cqrtVa5qjl5FJ3PnrOU84LUz22GZ7M4XOuTem4cwoJc5hiHkYr7Hq8Zwq6KovEMtR+RdlIAZ8ngjVkfDZr3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We already have of_graph_get_next_endpoint(), but it is not intuitive to use. (X) node { (Y) ports { port@0 { endpoint { remote-endpoint = ...; };}; (A1) port@1 { endpoint { remote-endpoint = ...; }; (A2) endpoint { remote-endpoint = ...; };}; (B) port@2 { endpoint { remote-endpoint = ...; };}; }; }; For example, if I want to handle port@1's 2 endpoints (= A1, A2), I want to use like below A1 = of_graph_get_next_endpoint(port1, NULL); A2 = of_graph_get_next_endpoint(port1, A1); But 1st one will be error, because of_graph_get_next_endpoint() requested "parent" means "node" (X) or "ports" (Y), not "port". Below are OK of_graph_get_next_endpoint(node, NULL); // node/ports/port@0/endpoint of_graph_get_next_endpoint(ports, NULL); // node/ports/port@0/endpoint In other words, we can't handle A1/A2 directly via of_graph_get_next_endpoint() so far. There is another non intuitive behavior on of_graph_get_next_endpoint(). In case of if I could get A1 pointer for some way, and if I want to handle port@1 things, I would like use it like below /* * "endpoint" is now A1, and handle port1 things here, * but we don't know how many endpoints port1 has. * * Because "endpoint" is non NULL, we can use port1 * as of_graph_get_next_endpoint(port1, xxx) */ do { /* do something for port1 specific things here */ } while (endpoint = of_graph_get_next_endpoint(port1, endpoint)) But it also not worked as I expected. I expect it will be A1 -> A2 -> NULL, but it will be A1 -> A2 -> B, because of_graph_get_next_endpoint() will fetch endpoint beyond the port. It is not useful on generic driver like Generic Sound Card. It uses of_get_next_child() instead for now, but it is not intuitive, and not check node name (= "endpoint"). To handle endpoint more intuitive, create of_graph_get_next_endpoint_raw() of_graph_get_next_endpoint_raw(port1, NULL); // A1 of_graph_get_next_endpoint_raw(port1, A1); // A2 of_graph_get_next_endpoint_raw(port1, A2); // NULL Signed-off-by: Kuninori Morimoto --- drivers/of/property.c | 26 +++++++++++++++++++++++++- include/linux/of_graph.h | 2 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 14ffd199c9b1..37dbb1b0e742 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -667,6 +667,30 @@ struct device_node *of_graph_get_next_port(const struct device_node *parent, } EXPORT_SYMBOL(of_graph_get_next_port); +/** + * of_graph_get_next_endpoint_raw() - get next endpoint node + * @port: pointer to the target port node + * @endpoint: current endpoint node, or NULL to get first + * + * Return: An 'endpoint' node pointer with refcount incremented. Refcount + * of the passed @prev node is decremented. + */ +struct device_node *of_graph_get_next_endpoint_raw(const struct device_node *port, + struct device_node *endpoint) +{ + if (!port) + return NULL; + + do { + endpoint = of_get_next_child(port, endpoint); + if (!endpoint) + break; + } while (!of_node_name_eq(endpoint, "endpoint")); + + return endpoint; +} +EXPORT_SYMBOL(of_graph_get_next_endpoint_raw); + /** * of_graph_get_next_endpoint() - get next endpoint node * @parent: pointer to the parent device node @@ -708,7 +732,7 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, * getting the next child. If the previous endpoint is NULL this * will return the first child. */ - endpoint = of_get_next_child(port, prev); + endpoint = of_graph_get_next_endpoint_raw(port, prev); if (endpoint) { of_node_put(port); return endpoint; diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h index fff598640e93..427905a6e8c3 100644 --- a/include/linux/of_graph.h +++ b/include/linux/of_graph.h @@ -57,6 +57,8 @@ int of_graph_get_port_count(const struct device_node *np); struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id); struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, struct device_node *previous); +struct device_node *of_graph_get_next_endpoint_raw(const struct device_node *port, + struct device_node *prev); struct device_node *of_graph_get_next_port(const struct device_node *parent, struct device_node *previous); struct device_node *of_graph_get_endpoint_by_regs( From patchwork Mon Jan 29 00:55:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98830 Received: from sv.mirrors.kernel.org ([139.178.88.99]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFvk-0001Ds-0c for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:22 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CB4D6283C26 for ; Mon, 29 Jan 2024 00:55:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16A1B9441; Mon, 29 Jan 2024 00:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Qk1R7AIg" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2111.outbound.protection.outlook.com [40.107.114.111]) (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 CAEC28F5B; Mon, 29 Jan 2024 00:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.111 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489709; cv=fail; b=s6eWiJaEzYux23uM3fpUGoI2Bi0zIo0zQgw29LSHy/LX+dYm2819/NO9A2ReT/RYuTKM3U38sPOWoG7YOi5mrF9iJXm+MQ58Hbk8gyOM2z0mJvh2aZmldQUvxUiW+xLNRVGqACuP4Ui7UCeejhbRQfNdeZASVTX7KP2o59CGOJs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489709; c=relaxed/simple; bh=O71FA2E42UYsMrjWzxnrECf7lu1r2wSaetj5Tv9Gp2w=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=HPXL3fOdlZiClkySZYGeFqocSxfQUhA2SKVIyW6DdX+zejxNaztIt/bHBOwpFOOi8oCzXAycFVlGkjcOE0Kf0nQRsy7A05g+IzrnomA8JiXkMplqhxLl4BsCQbJW51BwIK39tvwgwT6npStCjUsVSlRc4Whv+vl04v4CRK29O0I= 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=Qk1R7AIg; arc=fail smtp.client-ip=40.107.114.111 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZcadDx1MEVNpNXvF3dBpUgsgE6Km6BRXt9zDXOI70FduQlDAsty8nAT7d0w81ms5b2zjdIWA4EsDLMXdCwh3sFJKU9x0QZ8EiDt1jRB56zh+vy9JBbIev89LO6Q+ZOo1V1Bn8KYXK9N4XFRxtK1RHzYwAHRhoOZOTNmI48g896R9FipQCEuDqXY2aJveftA/xNn9KMkCu9Yw5Tj1ovxqVdROlE8ZMsrTROH2mxPORFZqQGR1huu3+3sW4duHTbz7am9uQ4Ry9I6QdXxQuGUnQWrQ2fTIfMeqPexzdRGcQ4+85Nu2gbXT9PLg/N9okEENivJZyola+Khcm2PTj2jfEw== 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=3nOTCUJGIMIXj+KvwhKMa89nGXFB5+3ZjUbE8AMOrDw=; b=NMs0d2r93ZfXrZqEsOUv7Elbo6EbBIvQ1mzoCCGoegX1bNXSNDGbLEqI/WZySXEPd9W3G6t94Fnq49iUp2tI6W9HVQ3Ojq1JgBxETGgdiOPkYPhyDay9c+BE8Sjl2JJR4JZ9o/ka9CHK/kH3DekNqhIHmGUvpC8omiblxwORiVKyr3VD+1LioPIb26HQr1J8vLjIvr+OHKVDDhU3ditbGp+4qW278PQIvmR4hGhPAbKobbKoqdzGhE2d7ET0blDXgG0SAsGhspKe4A5jM/vKphi97uOtwp+5MTtaknpFn1MZH1y7cMKKtyHmkTqk4dmraqureM4WQgxGYlgryNGn0Q== 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=3nOTCUJGIMIXj+KvwhKMa89nGXFB5+3ZjUbE8AMOrDw=; b=Qk1R7AIgy7fIalWT8C9s4nTGiwz7r/rlETU1WeZXhBoEnabBIaR4r3JdmvPpdA40vzWT1F2p9JibUWcjck8Ua4WDrvy/X/nbptXAFx0UFubUhnPrexf+emPppPfEDXOdxuGvm7JKVrgDkNyKQU2F2cBNHQe6+iGnmUFX89ryOWo= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:05 +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.017; Mon, 29 Jan 2024 00:55:05 +0000 Message-ID: <87a5opklg7.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 04/13] drm: omapdrm: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:05 +0000 X-ClientProxiedBy: TYCP286CA0249.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:456::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: 736dc3f8-a546-4dda-b155-08dc2064eeb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0KHdj1pYqpGkJkTrjQp5E03VMn43krHKJ5eOFWaYUvRP2qiF97a1j80tDLk0mqu0DUjUkFffKXBS+4BySWPbudr5IKkxMYfR5ivmRCpuRWKAbmwZp35QbSbY1h7R2V9yPLChfPpxs+bSRFEp8sWZ4uYe7RAxj/NYx2ZTkbQ9HjoTBqTbrZX1z/j/tQaRWkWamY3Ta6+JmcDyK6Llfewm07mVQKRBMyX4EEfHnGkbKvG3Y1/YkwQ3JzZc6zv1Y+WUCYRIJaPlRpa8V7Snz0bawX/Zzfhxv6Sx2nAGVPlGo/N0WKePjPySxmW5uWW/yk984SIYJfC66ywXnJIfJLmZ5XXl8unFk3qQD6Y/yzJ93/SzKCKSELtWvjCZoE105JJqde86LzFofkpXp0JT4DzaLO6b+upxg1f4l3lt2SWCpBDiEUK1W2Mo0CKITtgQGORB6uaYwEoo0LTUE9TtWKzPA5wkDLiDss+MYnIH+rnwCMSHQOH/Xq7t0gJIObk6xx4mzWzCnJQs8yEWDrRf4RPo9YmyxYr+NwA3+ntmojL3HFIGfEkYLsVzyGenNDE7s/3VLk/7a8Y2Mv1vHZaZgtf+isOVQ8eGExLgd8lzNBQqxwNHfxfNeCGqmvCabXh4LDFbunh24x+/eXlgOwI7qE4e7Q== 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mwC20YEcbPremXTUySINeAiQ9nGGQtSzeWQN514EiJOila4LKeoLbmsXDUAwxdOb6TufQrcFEYNFbzMn8pmWwESjC6Kz3pQZcxIYLRoOfjnkxWMUisdbkcK6X5FXdgH4g/W+ItOlQxrGs6bShYPaI4LXL+SkD7wfMRTwe7Z/X6UaSxZ5y9k91WRZ8EKqGmhtWfBcPbDMvZgE91sYsM97O+tKkgdRxyC0aQJ9v9Dtr8N7JYMTIZsqfmCKv7UJSgra7Z0UEaQwxXp95wwFeiDKCUvSSdknghAiHcA3YdoqCOPuE1Sl4DZoIFDoD9Q21ybJlXgLXm4iob7C90Lw8H5g2NaA6jDVe+P2W+MUydywbTh/1btTrqz8RXfyw/FSajn2oJMPhfMu38/z0hP6VBzPp9ODePeGMhs59Vp/Rq6XKKBghFFpZB6Ws9vc7/Eku/538YidrU/g7z/2tXplcPRh2sPnxt7b3AkBIvNNXrPFjgyrZbLeWpt+VapV9lQKfcwC8KfQlC6dMsjpbEfyn4uiwE3ycHw6sfzbYK9hsZdTd8ePMFVicrSSXJ1omsAKRI2W4Rp9jBYvMj/pnc1OwiAquvmnkDYN/3JxuE5nDD6Wfg8D1WbGWEJReun2Tqjn9mP/Pe5hdxPE7dZhZ3GXhj+MKH+ANoxKT0axu/H3wIJM1IVt6HWXyoL1KkVo/UBNP0CiLgadn8/wLo6CXTi8P7mRiTtemPiJW1aRDG5O2HDjHzSa0hGPJ4siL+D76ib9BXE1gXurhon0iU9dKPCSoutodXlvDv49lQQabAtgXe4Xd2Sg6ECh3lLZI2byvKTNKQZR+MhpdKQkb+AiCL56pHGOvZGDYyhUZLPeRSndL0TOQ5FbYRWqP1EVJ34IdCQyD+TIVlmBjn8vpF+YqNxkModKqzOABwku6AHvjoB2xI7fbCr4vtCwpK2IgiW/oFOAa/tMI05CjALwgVj6hAZQc2JCgaJfQlxio4DFvf16yx745Vof4/pOXk8OovJCqVwQBzF0bsUKlOKDp8FsgK2o6QM42lRpIhDGMbCJhzYO9ZeJ3cILOHYqO7HNRVSp3KbjAwvEDYso/YdXobBQdYM3B2HGGHoqetxVC2yda6rejZFaXo6DYD4P3wN2PvTnlqMnh0mOD5PetuY3oZVnLfrV25OMADMOveirFFAVwjXhdbu7UUl8JwD3MlFLzH5hty5SKQeUpTw8N5R9gVfxU3diWNEzRYrj0gDEPcseJb/UxNQoYrtHMRuIGwJn95RX99eNHwYD7Kk0gjT2bNI516ToJ1cGCsc+q9WZUYgvsSDMNbAYfg4dTMujMTqJfGadOGmxlQ+2752TKn0NkLYP9TjSxF3dFxFBmGftVCUxe1tbbwUB/yBzjTX90X+mUSGvkwE5aCOX86zslSf38cgrXZ0K+cmH8r6K4fqovSyzcNCaqheiBy6vxVdMYQsr1mjoflLZHp+abL/ZCeO2res7pAeCc6Fjc35A0PKHlWyKw9ZiSjLGcs5QeZftWfkK7/gxo875BRFSu0uFQp7j9AVyBnyhJTyCbDNoIUANiMshMLFGl5uI/dcHTJ55k1NlWCToxon9gp3XitCjhd02gqjBX2/wEBmCuKF/I+RzswQeTduAO+548l4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 736dc3f8-a546-4dda-b155-08dc2064eeb4 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:05.4253 (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: 1EX6Xli5VZarnm3AyxXO8dWOZ8TuhwBaJ22jFUifi76cYxIbGo40Qmuf9n6lYY1gX3Ni3EghWJ0IapbCdOt1QT/BrdNzLNq9VB9EQhGGMw4UdNEkMbarmYtqYjNQ5lVY X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We can now use of_graph_get_next_endpoint_raw(), let's use it. Signed-off-by: Kuninori Morimoto --- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 030f997eccd0..edcf7f4fb149 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -709,7 +709,7 @@ int dpi_init_port(struct dss_device *dss, struct platform_device *pdev, if (!dpi) return -ENOMEM; - ep = of_get_next_child(port, NULL); + ep = of_graph_get_next_endpoint_raw(port, NULL); if (!ep) return 0; diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 91eaae3b9481..0308dfc00058 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -346,7 +346,7 @@ int sdi_init_port(struct dss_device *dss, struct platform_device *pdev, if (!sdi) return -ENOMEM; - ep = of_get_next_child(port, NULL); + ep = of_graph_get_next_endpoint_raw(port, NULL); if (!ep) { r = 0; goto err_free; From patchwork Mon Jan 29 00:55:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98831 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFvr-0001FA-2v for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:30 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4A6E81F23094 for ; Mon, 29 Jan 2024 00:55:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 116298BF6; Mon, 29 Jan 2024 00:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="QyBJAkdE" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2126.outbound.protection.outlook.com [40.107.114.126]) (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 E6ECA944E; Mon, 29 Jan 2024 00:55:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.126 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489715; cv=fail; b=ktcRwoazzLGEeapHL10x8sr2Mvyhge87d7T8MM0zg0DkUYOul6o3eapLwnqcFK+wuPeBlEv2C7i5hGAUirnCTm7yRTIDVvWYQbbF0j0LGGtlmSK5wQkjUW+Re9G7rPjh80+pIq/ECOa+3UK4tZ3RY3DFp0r10c4sZ85rSCJz3U8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489715; c=relaxed/simple; bh=ffS14aV1Ln+TfLGSo/g586z4rf34Vf14zbKTRPb7wEg=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=m5kkTOqelxl1Kx3EltAUr7vh8NoQ06VKBX+rWlOAqCqTmVd1qSqZ+mRsAIzYDgL3j7YI7qlhPqoOkPbCxS2iqrrpouI4+BGqOh5+g4foPtQV5XedGr+nwhtnfcyXG37QtOQo+Eb7RAwqYkjT9CVW/I65fkfBC9MwullVtnUledM= 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=QyBJAkdE; arc=fail smtp.client-ip=40.107.114.126 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W7Oyn4gWZK+eIhpByhHaIu8U6e2FWj1me7N/G1n0aIcE7cUEn9GMlY1+Io50kYBRiVYbMn1TT1NwMWfq2b66NRGJ7UPRBCeRnYx1KXgDJA4hG2vRuwTleOtxASC7VlzHoy4bKwtlgoYV6tBjG3AyXZGpcPFqTlCtAsZGdswpRHHS1gRIMzlAGeMcRouErPe29Fo78MLmM1yAEkEYTLSjkO0JtLmbzY6ikbn1Sl/o2HN3bUkfhvSeHbaz1wMZkmy0MpNCcYXXZ2itPUFg6y2h39BZoL/1PH5HJz/xf+gIpkTay6h7MCGk5Ng6/BGTUieB7jbFgHTy7MQnLPmaxEOsMA== 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=doHBcvAYo0yrIjFUYG+DMNg2fMRtjrbfAePeAn8BweE=; b=Zt1RzM/155xC2ZWkq7NTvKQKLy+GmmhHRpRkZp1mm8aFnRyktCqKk2HLOJQ7EL5B8h1qvuKNMemkzFkJwgk4QdcVRi2DXKYJYMzF34uO/rmlOC8kEY+K6Ifhcw3PbkmOifQJq0I6sLpbIxcEzpNEcRBpZ6eQlCtsU4z0R79ouKjJ9E5rpx//PkDAyhHkfaekYwjQwbKGrUEBbsHOI14AO+adNo3DOnSASWVopz7DkrVI22Ulrc33YMH6xIuFEuUybPlqMzDSOKhOxHymFRy3S5SfpHSfXuoh3qlHTePWpb7EH1daAdC2dy9HJO9eIdVLnDk4D3dM3qVIut8XBNJQCw== 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=doHBcvAYo0yrIjFUYG+DMNg2fMRtjrbfAePeAn8BweE=; b=QyBJAkdE2c/wp7iHgpfdwRll/MajIFGmXwrwJnSVHbOIWBLwfgrXmGnwhJzreK6B4YPrMPSPoR3RysCHTQ14ruVW69QzZjrfxMeV1P3Eds7rqnxMLwPQ6W2FK9M3gEa7o4jDzP2w9Cmg40Znaz2ySpYHpN8g3pZumRvDSNrdOnQ= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:11 +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.017; Mon, 29 Jan 2024 00:55:11 +0000 Message-ID: <878r49klg1.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 05/13] media: xilinx-tpg: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:11 +0000 X-ClientProxiedBy: TYCP301CA0011.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:386::14) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: e4120e63-ad3a-4ccd-6b09-08dc2064f242 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6a7qpKU+JzITN/5CfOCoBeF7UO89LyOf98BRvsEbuxHSIVJ/02lyBi5lwADl/YoAkAcb7pvZK+3zo7jqcAH09w/w7BASaqxqqJog5mOUzO4ax2b/bAKgomvwUaKW0lzK7uNOtbdFIc6wScuo3pT31cNjJ7+eQfOB+qbaaFZU4CtnLsiPezdgArTZRPI85EzcdVLfWZ2uPKM6wrf+3jj4a8DN3UJnb9D37m1UnhIXc3tXPkfukr0+oacYb9fy5iK9lZwouHjDcCj66LBQRwex40s5EC25Vj5koUXOuFxjGzzhl6FeFUR24kDNLvL7qLPnvzCQUYb/a1ouVRDPHZaUqXECoSdS+lnEsEDmKVfxMfAkDjU3A8DjG2HDSirLsCBSpJSeTynB1/7gwFyqYHfLfwy0gT3D1z6UwDz8yHAfE9ZoYcl4ILXA3KYprHeS0GCWsCRpWa/RFFc7z0C3gp4XAU+YAlSiT5JwzQUgFDHRKhoczoalAp1NWfv1BCcNFtDu85s220+CtvU67oGNPk7YV3HsFQC/IuTP6QhffscF0ok0STvklob2ERudD1rMntS57Ewrv4C4MkKjTnXAnZn+OAOdGfddpkkAMp7ImEHNhTH2tb8YHorFyc6qkvAmhIsr 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(4744005)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KggLLHbv1+OsUqtflHxvz1vvDryAGWkeaH2hWXrOoZ0wZYcvc3zXasaBZZvOCCo96IlyUw6vgPjElSpeczdbeS1LtVwSFDU0+3UiRW2iTaRUEVvhkmr7dMkDzka1V2hvX1grJlezEpqT8UuK2GHUuuG9KugvdeOvTpFIz7ymCSTDbtHC3iMyE9GnMPyGLDLw9hf1QLd9v9H6JTYGPvJPd/V2ik9E5zqtQRR0gKr/U8J9lBG/QwbME2sXGbbw9GEz4UFJuO+RDiHCB0TcjJgQ0sKvafniSwpDAMOXwwdW3WCXq5cZenDJebsCY0YYe0fA7oE2hwNLhUdXLVCuHgPQLja4py4ZJQ0IGkCjVX3nzv7ncTtsdIhBuiVuocSHkuWRvHD14oKc5t/TmuB4cPgq7gHc6uMJOhR/uX9xJ4LO+RPwjByA1gxQjz0nSkG7UjeJL2qz1NvmRzUpVSxSGanIf0xZXl8OnG7BAZrSxLaYg+qD/HV8dYylGrY1EiJweZomQfYDNsFcjGgQf1K/Q3esKZ4ibdyeuf8FLFS04fxEOpHPFLddIJgPbNBOflDcd6FnVIvztLAX+wz1ZwqyMRGIVYr8TdNF4z74ptmvsZ0dem0s8X56swJnMQej93gk/hYvk+gJmhBpc1vr+YQA3nPl5ErCVfSeFQDuRUDSJqKucUc38xaJUKZj4/QPc/lNltaWahcsfsZKu8QDQ5vyJMoTEkTpXm8e+jZTDjamRnntcGlHznfQ1Na0jDe19C/8RH7dfdDJATXvz2qZ2lcyHxBIH/WuwK0GnYhsvnulM7lo0MoCiBc9Q5JDsUTR8vywri1GN5ZfjB2PbhgxiBz56YPvpsqEdCUPMBUHJVSLX6eSbGjIjKjGJY+pDMICZF2HnECSthBUq2wRUxtBa1Fw8SNwFBs6zynrFrVYNV5G5ktDOVVq8yYJ//Qcm4wytgOj5isuin4wgNh7JloOiqSyvEFENvzERJ2kyH5nBT27LJt3RnxbDibx1KeYupvty/YfDGmUes+Zr/OeFdeUCinTWhpkM2TH1LrFFVPTAla/3ym5r2UNDo8pDlZdptrDUCu0gVfn8Ojon6mp4oNGUwFJ4p4GgKjmkqaltR3HGr76lwBXmxdRcWe+wqg8DIpiBWFLWjJzWzu1SVPdjkvptO7uVIu8HBdh43txtofsH9JfGiKnPqtEWMq89g53e8E8B6PmdAUUnJlvSgLmE9faB2UMRN03NR/O6kewex1f7vs2fKtl5HstaKYgHDD2t9ChWprzdyQAnJy1299uiDdQJ7wEGuPB+YLmBGifqRtjcZfbLlaIQGtTW909WoOwNB2/Tw2zkoAPnq0CosPcedbHf1clN3r+i6UzF/cvd+NweykaQkwgkoAHdgqxiBNmVlES374jcJQFo6WItSvwd5/cSPUVOa+TLJPyCmJ8HlBK8xlfAiFmi5uBnVeRNH2S014t4JkCrInRZPbPS7b2MbItZvAOGcO3h+gRhG5HuZVUjfmB/sg7KnuJGr7fxEtKxXG6VGgEPXeDAvN3664YoIglkPCk0z1mz19C2mkoRaHZmSCh+BHVYVYGwIDYdKPlgNMAI8jtyio3MnUsEMTJEj6/Ak/mG5sXTmRDYdh68gObosAU3scN4gU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4120e63-ad3a-4ccd-6b09-08dc2064f242 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:11.4144 (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: M8ahWDWQbJ/iPu8ANJOnt4oQEvCUEF7qTj6HnMrD3GTxttKwCvpL9UcztXiMXr6s3LsPFFwrxk9WaTiRwi4pkRI1H4p1K6mnBYWBtKoH4+OKqYk9qdAPjzRQmujYJemf X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We can now use of_graph_get_next_endpoint_raw(), let's use it. Signed-off-by: Kuninori Morimoto --- drivers/media/platform/xilinx/xilinx-tpg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c index 80353ca44402..97908533466c 100644 --- a/drivers/media/platform/xilinx/xilinx-tpg.c +++ b/drivers/media/platform/xilinx/xilinx-tpg.c @@ -745,7 +745,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_endpoint_raw(port, NULL); if (endpoint) has_endpoint = true; of_node_put(endpoint); From patchwork Mon Jan 29 00:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98832 Received: from sv.mirrors.kernel.org ([139.178.88.99]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFvw-0001Fm-3B for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:36 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 140AE283CD3 for ; Mon, 29 Jan 2024 00:55:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42F289445; Mon, 29 Jan 2024 00:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="U+G79z1A" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2091.outbound.protection.outlook.com [40.107.114.91]) (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 281FD944E; Mon, 29 Jan 2024 00:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.91 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489720; cv=fail; b=peedkjjrTfciL7hFWz7SKqpomY3349Rk7xq/U5l8GuD2uf1cXjLbixcGUW7bUCruEhD2WWNwli/Uv+GkFAryowwnUGhl1C4dPOiZ69WOsSyazaKDenGAHK+agicmrRz4OXzv0/C/c8ZXIE3mKBPvq4Og5bZl0tDc9CREEVGUico= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489720; c=relaxed/simple; bh=+OSaFJVpkTcck8y6XebnUqDqSPv1A7z8UHFNplh5zRk=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=ZJeWt/RDp38EyUXesyaKP/0AxPKC9RFpV2s+3EjOSI0VTYfXXrPcJAVrD8ljNO2gbyXld0o3Tx3EMCrMeN41T7FJ4cq/TFte0LwrNkVGJknKPdlXyu09uoRyKGRCkfTJbpkZS7zVmIdTVQ9TiMWlZicMqWBlq63JgH5g0EOizJ8= 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=U+G79z1A; arc=fail smtp.client-ip=40.107.114.91 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cQ5S3IbyMua/zSOg/8zmkykkbi8TiBntrG4QGlEm3KR2F9/BnO6RmHEP2G+ToXamNUbbs80xZZjX1HS39OoYremUSB2E8ynDHR1HN8OWOCIOnjaBjFEPDjCNMgoJJgddgJfDek87jYTvViMbfaO1BfaQAxUWyeTD3yfRvQVnbvcTHxDwnH/8rdu7ElvXQT/gtx/b6/Evz3qfFQK7x1rCqd7THdQpwK7k++wTYjmhDmQ7ztwa0QJ2ekjx/KUUHWOPn4Jq2juGj9R8kXkSxrSybx3zF67H8u/fN4JwdgvoVHzBEl7Xs7H5MvtLLDM77SVVY/Gthy36gVQAMh+ZpYUP4Q== 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=PMIqf0muAwUfbN8dQK2ocuBX9q7rm/EQZ0Dyn6Kcphg=; b=lo4By1Kh52htE1qPVTp7y6X0i1Pcb9QsXOiy2z+srB80vif5HizTyc0NOzlfPMpmbwUZ1uIDcvt5Ine28ZO4qo/y0jyB9+xzNDH14oER9bNnYTCHC+8CXElpgFRmvaYyVH0asW8P2noqCxbaaXBFG9Djz3Wh4yVmhDTc2YYhrk6qk1bKnb9R5Jkl15A/Ta+ND42m68UBPZOHagu8lcsG4v7XzLbbuqRrgghziLl2TK97sma8aMsNBPhbrzmvMM9GsrvjldCd8rUtGjiusF3S8V/JAOz/F8bCdbgPMIaqPveLxPh3N6ODDqmd0kyn920DAR4X6femipCiA/aLXMZhqQ== 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=PMIqf0muAwUfbN8dQK2ocuBX9q7rm/EQZ0Dyn6Kcphg=; b=U+G79z1AHwnyMdczzQwOF74yjiZGaWGeoEjrwn94qOjErM+VDw++1HJn9qw/d2VTYhUL6LwYIMKGHj/8U5mFhz16R4hXbpqXBs8jdWdAiVbxEX9mdNPFjMdC9uxWhQJiRwZk7OqiW8fj9vQj8hkPNZZiG0OmexxfEJy2+daIqgw= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:16 +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.017; Mon, 29 Jan 2024 00:55:16 +0000 Message-ID: <877cjtklfv.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 06/13] ASoC: audio-graph-card: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:16 +0000 X-ClientProxiedBy: TY2PR06CA0016.apcprd06.prod.outlook.com (2603:1096:404:42::28) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: 81234255-c482-46b7-f5af-08dc2064f581 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a1tt+C6jeUihbXLkrOUgzEhFN4+OdCwcw+PVpz/WfBas7x4UXLwt0DQMjsdsu5KcghvBnQvziQCtVjOmp4/eJVj1hlZnu/TYFAd+Ezn4nqYQu7qaf/NSjAB9VvpNYC1grzCcZYgvRp6bbXTnkzy/3MgTyi0XJe695lAyiEwzvkVTKQQp2OcTO0GpuryesrIfPgIoX6fdfUKmjedS51NI6kV9UkGLXGtCgXa5Z96YrJ6W6LM11+UBKfsH54cASLCTKVxayxlXMosvZ6nNxJcgvYP2rrAJTzHFMQre5midhTG9N72ctBg9XwTayaV+TXmCqZVXI6cStoMdhBn7lxVn5k43DlbWOTbo0SW2fLIZWJx1UHFApUnka6S+Z1iZqiq5p6fsXCbTVM6CcNDwDhfzSzCX27YA2CwhJLn3YjbSJu5wjPjNn61BsOwwuDRYtM4XYeUX/nnktiQHaeNtBOmHhA05C6zxfiIhcJxZxEwtuplYQU9CGJpAv3eriXTPZGO/Bm9ZDuymQR+ZWt+ulX60Yda+fMQvEXX5RBTGZDV6Q84vWNW3xJ1OT910kBbrFQMVxKB8L01M4sU5du2MU+Ofa/TXHVoeft9NpClBpMvN7oqG4YyREVTtOWEfxkDgC26VxmcWYiSzAhRLdd+u+zAHlVEPDTIOowx0MPe0BKGtXsY= 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(4744005)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007)(2013699003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4eC/qlyhGRoLtdG2Rs3g2BodsB0Sp467jsLG4ML9iT0pM4T1Pb7ZCBl7GqFr5Ak2YsO/p9BCFzC/4nqY6T9iKIdJZGWn4z2nQqZ3+ETTbIVDjHRad2liQRfNsuwAxNa2G2Nffhyvz3CB2lI3/ggeCdqY56XNybZT0qLQrFbSW3I1xn50XYhUXKGB4wuD7dGWHGTCucf7ft8rW0b0Gp/7jfZeqHOKbhr+HszBiXxg8Bx8JtJl/8y/hD2XMuQMPvIp6wyePHfn06jjmg5IvbOzwyvItMk5MysyVWUblQSfxgemnpgiDsdyJVyDo/Vx1N1MB7xUtFnI/g8W0by5fuMxpKKCyaWRY7sJ2v0jTzuUMOcfQ/iqgl2jeQG4AXddD5usgDl3ACCwgYmoZ0iaj7BpGnsF74P/2xw/a1YI79xUatr6rfVJGcIYNQ5PLCI5drzXxjtA1obV+ViLoChPSaSZhWOoI/MrHEJEgXHZQ8d0w1y5x9goYzShewMYdqi0BeGsWyTEjka7Ojy3s1en0QtKQfacrOswVmMXAdYaP5hDJzInGU+sK5M7DmP2cNxxNx2llJvsVjCgWr9y2oWc7Dy6VCBTGkk/KzAX0hueGndHkyUvoAFVAhc1esbQmAlM/6CoKKaIs/8ScEVAMt12xeUrP1Q9oBurxff1sAa3pvH4PBVlpWhvWmxHPlMzMrR2Pmr3um6k+qvQ9VvkDUXxfsNeHNLK+iIyfFvODo3YSYZjZIIS+x4m6J4t6BKGwNHRCY00EFp+EMdCgTE3KHdgYuMOoXJ3GHCoHfLeKwr63VrbLvJ6SB5B37BtxEmPhYBjMN1Xv0wcF5GoO0qDipXB/8wJHqeYw7vHLtkSN6vzzNLxYCgIYctYOtGhRgtUlejgmTeav9BKq3D1PEI4qjFgsl/G6NA5q6dVNKOzIFvzDuWv8Y2uL3nzWTGJ8oPbF+pvc42RKsspJ7JBdZ1oOK7dqOchgPv3EKCzal366TR6vlP3MVRxDnks1jMddBS2ydXERq9LVE6jL07hsn6gcTFY05zvVB/Ge4+7ngRzLV35W3HapJIHkexKhJaHmOeYRnDw0s8gCUQnN0LensWr8F5Yszpo3h+FH8ThzHwyFcMj9DQQe4ZDbWKqFj9qcvVEpAzV62zd2FiArFnyawBgmhwF1skIXZVLH9J7PJK49a/KALTND8ODZRk19yAfLOn2npmRTeFNli2M8YCMoPnttAKPmtmwp475qYv1qyty92tfeujxvr9zxMxvO1INGZMBx9XO8mVlTxuAGg9WCac2l3JrSTBpOdm8/Cb2JmdZM61d5/TngFOWCC99BoEX7kmPUhjzzqLrVE+9bcgLWYcJju8tfRjJ6Xq+Rvs22Hd8p68+FIh0ZqgNdMFF3uUu1RyfQxm3Xu01PN8HwL2l8d1bI8DLGmB0tWj3fFLBusoI8Jx5jwmm9QR01d5802xaAekzyDIUfLx3XHqnbHwxhpP25xVq1LGaqxVv6MgQGeYIuLK8ndw4++5D9RE8P/4X+hQzTiYZGeA+9lqGf/18m4XDvNgfoWJsRDxmT1PjJEWvH9/kwHDETq/zbkOs73W1YNxLFZS2rKDph6EZeAUT3rUeWqrCixuEz5WFsb6otVXMMIxgQquuX80= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81234255-c482-46b7-f5af-08dc2064f581 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:16.8873 (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: T+kzJKChupgjrajqqA6B/CUILLZ+DEnIW81KU6/UXTkrwvJn3UCcczqtEUZ6/dGvpFXYNvhlgorzWc780toDA3r1MeiIqodoAC4gOyvJlNjXHdlzYakXoov0eDKrhOuA X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We can now use of_graph_get_next_endpoint_raw(), let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 83e3ba773fbd..29bd7c234fed 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -344,7 +344,7 @@ static int __graph_for_each_link(struct simple_util_priv *priv, /* loop for all CPU endpoint */ while (1) { - cpu_ep = of_get_next_child(cpu_port, cpu_ep); + cpu_ep = of_graph_get_next_endpoint_raw(cpu_port, cpu_ep); if (!cpu_ep) break; From patchwork Mon Jan 29 00:55:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98833 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFw6-0001H5-07 for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:42 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DB89C1F2313E for ; Mon, 29 Jan 2024 00:55:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DCA39461; Mon, 29 Jan 2024 00:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="DB2ioQQz" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2117.outbound.protection.outlook.com [40.107.114.117]) (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 62CEA9460; Mon, 29 Jan 2024 00:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.117 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489726; cv=fail; b=hmq/wqSWl5wJiAa8jNXqSCTp/jrvb/bQ9pL4xTuV3YB41p9UC+oTMq+eu3Mk2YeVkpuGf43Zrk0uKJ0dD+ftr9/hFxEKLknHWoa7zkFfX7jkP6xMmoDH2bQdX8Bd3DJT6mkGUjYQadXBOsu1cbyL5G5/D+znZcvqaSrkf/sr+f8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489726; c=relaxed/simple; bh=tynbqH5KYpLUg6XYTK9TNh3jy6TatTHv8KxXvkIsYI8=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=mP7+9SM/iyzwAV1ptlfDsg7sgveML1mVFfHV7hNWACaPmqsdsA+ETcSAnN6d4GacFCNrxjssnbHkjMPPPe0F7YGNLYAbi8JGvWw/SMNbq5PFO5bQztZrUQVBxK80IQQWJfP4FUneF/J0JGBf3y0ZdyZWonQxigxTZQr3s31CYpk= 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=DB2ioQQz; arc=fail smtp.client-ip=40.107.114.117 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WNxog7pJRR/Tf/PRM2/xMM+ECmF2Dbl9k7/Y6Lf83wMR2dad/+ZjFUE0UG24Wc8PhJnDLAwarGoscmTXQpmzuHL0fYdS2vpY5+ciK4gUqN3e78agyDo7Lw1za0ZvzuHosk203eUvP9dKPPHUFJH9dxUPBbsgVvLktYIVn/+rO3GqiLYEgb0QNe82VOIT1QZLjbj/es31Td+cmeAfQru4/OOGmP4H+9wdxcKthiWe+DY+07qH7hbrjBqqV59TOLcimu9/LjveXQwRuHup/gbADyoC6U7eCua5iAJqUqtx8ONGsWBvzKzMRkpC6O2Yn+zGFiDfB0kBtf8LhW81RuG/yw== 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=fpk68IL/BvflDbGBACJ5GaP7BhSLRxtc71o9QOSAGOk=; b=cTOfODYpM87Guz6F7GZc1aiIpcadKbsDwIZ/C4aao7roRLp+zo79ZX7hLxdB/8qowhbZQvnzp7B2HNp2+6ZI2POEyemWnAlymOOgMA7L+YABVh9Daddsc6qfxo1nre+s02xzt+oO2fesHNYPY9ThuvcrluJezNHG1fSzYcHUwTMMjZPdbtFjRBgUt5cCY+jG99u+DowQwYfcZBnJU4kM1ji3J7VKEW7XBXAC1c23NRkc11AuE4yDkVpv/X0Y+0GVKHtAq/wgjSMdVlq81kaRYcK7OSI6I0QIg5sRaTYXKgepO1/wBVGUJtRYgUfgrP+y86hzRWBUsjJt7JyZQYYLZg== 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=fpk68IL/BvflDbGBACJ5GaP7BhSLRxtc71o9QOSAGOk=; b=DB2ioQQzTjiv8vZtFuPIWmSiBiPVR3Zn8MAouUFTz53ebi0jA+2g4+YxIU2vlszv/KjEmwjVUHNAjyyTTDJ14vrNBfx5+C8bMgJmFQETv2EK2av3cS1cHfe0GIcWOjr2wV/zXhHMV5hqX1EQGOv2sQ3w6wa1qM8BNfwj7ZPSmI4= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:22 +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.017; Mon, 29 Jan 2024 00:55:22 +0000 Message-ID: <875xzdklfq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 07/13] ASoC: audio-graph-card2: use of_graph_get_next_port() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:21 +0000 X-ClientProxiedBy: TYCP301CA0005.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:386::8) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: c14da518-c333-4f48-7855-08dc2064f888 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xZjqiPdcfJWhOLGQqO/1oDbfV4D6p4XOPzBROMykKLHcnWeHF2X3Q1TdD7Yv2PpPqZT5Zeh3slE+OIe76UL9nT+w6pzPU91gdTXqepYru/KhjwwG7he1OYNvOKrlpXR25JD9BTcYilZUTnuOURp0ornXvDpNW5rqcCBjz4lA2pWPzmAGCArHPsO5LlOiamWOQNgiDeEwDrg3Qa8oLf/Rju6jiTQc23GAm4MFavzV2/9+OKTUZPaqiUuFJDPemrsgB8zlMR3f3P8C9MWq7C/HFVUvJxvW6uL7+rFx/uSD0zORPjmTiLYCfWZE1+v3tK+dY/pNtpcsyiYJmvmXTv+mNTtbDXGuEgYEbGSpdLLNMfHHcpJ7Vmb4z2KX0XS74kp6IQbZd3fUynZgBfkPJqHMyK1ahbVfXtktOM4M6xOFfmngZn6RtiVND1uk7W8J2zII9l2tSmmRUfZESBcMC2W4xR3VJP0AKfD6Xm2LuWIYzckZO0DiSLQU3JMaD1xJikPEzEZiiVP2qwhTo17AfH/kZYTPZ6EldJHN7wwoso89V9K+5uvCh5Q3rKHoi5JAnogeUvJ2bYiDJX0kw29ODPO35aHs0VECwa1dK/IVLnM2dM2iraip8jXUuKEjwMnZkGlNV/MaT5paV/E/A078VFwr44YrBQTkwq03gHMMcufR+sU= 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007)(2013699003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y5ypzHls831jW8Fy/x+/h3rwpOKFUhLemqdgPlBRcj7MLC4hkb5OtOVXtW1lCVwgQy/dAr0w+rstpvanqYOa9ZBcZPQ2Gv8lZ4wwQ/q2BgOaVAegdYLtxbHvGySRK+3kYGy7K0ja+5fmjkzC93Pe8ziiicizEaz00UJkgZNnbMpIpvplz2UB1jNb33u+fBhhlYnsB1LlgZK+ZVwU2oy8MQF74GVf5TYQrUS9zJBGCbOT9jslV7SQE7a0ZzHC8e88DLRvbtcUYbCIdIbyzbtquK59X6UVVZvx72IIJNrN+W0LMz+pcP5swp5/MsUwxZCwhWMKyOpEkNCq8cABH95BL5T6qTKUqYIfQ2M4JoNb2nUM+E+2hO/CCF0NPKBM4Nw1dxTU8lf9zzarfYioybWbyk7rH6oe1G5f1b10FUzOBlCMcgcP9rbzCYBQGOjPmRh/rCMJy8FXhTqRj+ZauoROAIjIvcT/PouRUEcVkwCewTPVTFIDlNzQ3ogZsw7D/qcYYhvlTNoAebpOlHrjQyIxeftaB2UjIef3GPZ1amYVFznEiLqYTUz+qXrymqGrxv2hJZ1ICs8i+1XFze/wO4WVQJnyggHm+HDn5C67H47nvRLDmwWnoOzgV9kYWoUZXgVxqo5YnnMSTXOsbM+E5gBN9q8VhNV0xEG8/35LOh2+C62kXDuI8txcVU4sf4JYpaPvKMcumT+T7vynmnSJL4E8bJEWWdAzVbzt1QW5nJ0IhSZIIt4D4jaChVuocRO0o42LbmH3ZBdmK1X9dW1QXAVfXPXHqczsb54PyBVlP6AUYOr5cSWL51DJ4aYEoh7CjDVK5gvUqH65XInctDwiMgXWOUIIdNkHKIEyIOrHcmHSTL2vqLhVkNpmixltv3HFialWwgztiFsYSh4OmEaMkY9PrFb7M8QkoxayYiAeGRUbG7DIDKrUmpu3pWK8JERiZVVADIK4m99egWO4AFn7PWAot2hMu//43G4t7XLTyOGM6ex0qV1F/ak4sjRLh8tlNXcqjRKwl/L/c0XYtI2egjdm5Ttc+3P+847WwsJnoiBzRJcOe2FwFsW5zqhCxJ6R3/JkoQwrnD/qpk2lmRE531voXZ1HaoGOBBfd1QVTQN1quHVN0XuwNLzcYNqjmt++Jl0jxw9yhCvNabs90O/lwfXKjbH39yWGbNp+kh2xbwkATGFCoBlriCsIdJWxRUw2ozaNi0sSKOPV0/ZQ4qCNjbVPtikhT3XnuE6qZ1vYnn1mjQXx0PobxmXpPvZR78/4OwVM7z7f/veO6FRxrSj5aUDwfGqygBkdLeTTGIn29s03/ZcPBeZSg0RuFCoyfLrTzHLBeAtiST8/trH7oXrRUeMVSKsfi++/f2KC8ea0SSk/q9mWwdsCycK/GK4tENtL/pInIbzyfX+BgSaoHLWJTdggmGpvoOIxGjNM+BewNe9V8ma2YlvTcZ6eE9gpwYbhOsVt6HkEc7r0Zo7HakvFUdPvkAELN3c3/TDt1N50QuQQKc/Z/+tH5BK58s90i+q7k8i0dHSZgfsVsb3F1f79X1Q5jNIViJoXW1V9hr6jFdGcqfnCFTp0cGGHJfXHfcNlxOFGEnR4+lkrWFtK5uBq6op+8zUjDQnBAsdrECxyGOfz570= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c14da518-c333-4f48-7855-08dc2064f888 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:21.9875 (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: 0L84oiVTvngAOn+BansiKXFhAzT122c6s+0j40IEclGXGtf7FPSbewF9+Rm+BHXM5o3RRtypCrFtTVscsLJtlTDAJFTmxOA/HKZwOX3KHBD9tBQT3rYxOmMTPnXU6iMA X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no Now we can use of_graph_get_next_port() for port parsing. Use it on audio-graph-card2 driver. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card2.c | 29 ++++++++------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 62606e20be9a..59a5db12bb5c 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -339,12 +339,7 @@ static struct device_node *graph_get_next_multi_ep(struct device_node **port) * port@1 { rep1 }; * }; */ - do { - *port = of_get_next_child(ports, *port); - if (!*port) - break; - } while (!of_node_name_eq(*port, "port")); - + *port = of_graph_get_next_port(ports, *port); if (*port) { ep = port_to_endpoint(*port); rep = of_graph_get_remote_endpoint(ep); @@ -539,7 +534,8 @@ static int graph_parse_node_multi_nm(struct snd_soc_dai_link *dai_link, */ struct device_node *mcpu_ep = port_to_endpoint(mcpu_port); struct device_node *mcpu_ep_n = mcpu_ep; - struct device_node *mcpu_port_top = of_get_next_child(of_get_parent(mcpu_port), NULL); + struct device_node *mcpu_ports = of_get_parent(mcpu_port); + struct device_node *mcpu_port_top = of_graph_get_next_port(mcpu_ports, NULL); struct device_node *mcpu_ep_top = port_to_endpoint(mcpu_port_top); struct device_node *mcodec_ep_top = of_graph_get_remote_endpoint(mcpu_ep_top); struct device_node *mcodec_port_top = of_get_parent(mcodec_ep_top); @@ -572,12 +568,12 @@ static int graph_parse_node_multi_nm(struct snd_soc_dai_link *dai_link, goto mcpu_err; codec_idx = 0; - mcodec_port_i = of_get_next_child(mcodec_ports, NULL); + mcodec_port_i = of_graph_get_next_port(mcodec_ports, NULL); while (1) { if (codec_idx > dai_link->num_codecs) goto mcodec_err; - mcodec_port_i = of_get_next_child(mcodec_ports, mcodec_port_i); + mcodec_port_i = of_graph_get_next_port(mcodec_ports, mcodec_port_i); if (!mcodec_port_i) goto mcodec_err; @@ -967,7 +963,7 @@ int audio_graph2_link_c2c(struct simple_util_priv *priv, of_node_get(lnk); port0 = lnk; ports = of_get_parent(port0); - port1 = of_get_next_child(ports, lnk); + port1 = of_graph_get_next_port(ports, port0); /* * Card2 can use original Codec2Codec settings if DT has. @@ -1099,21 +1095,12 @@ static int graph_counter(struct device_node *lnk) */ if (graph_lnk_is_multi(lnk)) { struct device_node *ports = of_get_parent(lnk); - struct device_node *port = NULL; - int cnt = 0; /* * CPU/Codec = N:M case has many endpoints. * We can't use of_graph_get_endpoint_count() here */ - while(1) { - port = of_get_next_child(ports, port); - if (!port) - break; - cnt++; - } - - return cnt - 1; + return of_graph_get_port_count(ports) - 1; } /* * Single CPU / Codec @@ -1197,7 +1184,7 @@ static int graph_count_c2c(struct simple_util_priv *priv, { struct device_node *ports = of_get_parent(lnk); struct device_node *port0 = lnk; - struct device_node *port1 = of_get_next_child(ports, lnk); + struct device_node *port1 = of_graph_get_next_port(ports, port0); struct device_node *ep0 = port_to_endpoint(port0); struct device_node *ep1 = port_to_endpoint(port1); struct device_node *codec0 = of_graph_get_remote_port(ep0); From patchwork Mon Jan 29 00:55:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98834 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFwC-0001Hy-1S for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:49 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4C9201F231F5 for ; Mon, 29 Jan 2024 00:55:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E45EECA6F; Mon, 29 Jan 2024 00:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="MXB64GV0" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2127.outbound.protection.outlook.com [40.107.114.127]) (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 79E034437; Mon, 29 Jan 2024 00:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.127 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489731; cv=fail; b=KQyxhbOLSLn/8fd1o8yvDd6Aq9BVInkLpOtXUYgFCKMQc7n+4EaT3NbIYTBtD7ladimzTcavlSTcKMdpNCthnVcm11e3/tPRd0nUDJeUDklonHrNcAfafnqdE3u15xIsYLrBayFm4Bkat7BYbhN5TgygvKdCGq7/o4sy7XACeUY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489731; c=relaxed/simple; bh=V3wysxgtpraf1FD3rzXyb67aBJ+ub2E5Q1LB48ROvSg=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=nNwnBhuUXKgit3uEwBb89NWZBnrKrdXwQ30MpkS/h/zFJAFyezjpl/1PpQpejyCAnuGQyGsH3CXKEjERN09AKezulQs0AnVpag9utioOxpiI2LikQ6zqB6fHNLe651gPu6loIMf7FwcdVdWtlVKIH/LkiRkSADBd+ATkWN8a4Cg= 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=MXB64GV0; arc=fail smtp.client-ip=40.107.114.127 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kTS0SLF2SrbpwgyOdScIBms5VmlRHyMcFNeSNBudL1pHq0GTYNmresWe1SJZxvJpMXQRyrZsccf+hlOfHICNQj+olXsteRO+U5GMNLR6ZSpYnJasplxLjgAtKL9GOuXECBX3SYMyauJ9pyeJJo6RuppM0VMy8gggXmt4/ERkZBCrDBdGvcZOXgluleXhyS0iEEIUnV1mWPYwvIvYWbrWWuvxhQmU5YwYuAftVBmFpouRqpz/cOfxOHe4k/QCzLN5k18oPs4TlIyhvpyI11b54Uoz8XC29qVSW1fi6MEtarIEdIZOk3LU+rNvqgiPK5KNhxGom79icC5lpdB7Tw53bA== 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=h+zbHtJG2JPjss3ic5YyQJsUH4T3jOKFdArXm1iaN5c=; b=hQ+HSqdv2MTDSwbbck2HwgbuOHbuL5XgFG8GYQXnWV5syYTkAH22VOC5nxhCCcPMmepC5D6w1p4HIsoUZ9A0kXdHyu355yAcAhujvmOaEwz1+7IjcF7HDM7FG4bwJj+64A2J77IlWEdpSTVHS5XFF6qU/8/1GEaCS/QJgnM2oR16nYdsRoLUZolzePj74WjY1GdgkS0lZjT89Nt0jQfMyByznADTYrFERyKxG4xet24eW9f8tnNCukJ3qTIFr1yV+OTigFFnBG4R2fw8WcSwpQIs8iOuITAhEilbImPbTEYPmv1pDLHJoHbkEhf2ydNtfARDsE4J8q7a29glQhIxCQ== 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=h+zbHtJG2JPjss3ic5YyQJsUH4T3jOKFdArXm1iaN5c=; b=MXB64GV0EfTyDgnpl7ixQu2v9Pqoo/urHMV2LtpmVSdv4caURlees8xypsiZmCEzRNUx5u1uaSUorOG4QOXpA20vuZrOknWj4mmJu3dt9acnusG86WfRpCTiFduvAoTxhYi+K7+aHP87XkBtOMCrEocb2bWChbTNRVvDGNxmCoI= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:27 +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.017; Mon, 29 Jan 2024 00:55:27 +0000 Message-ID: <874jexklfl.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 08/13] ASoC: audio-graph-card2: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:26 +0000 X-ClientProxiedBy: TYCP286CA0222.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c5::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: daed1450-303c-4a67-b01a-08dc2064fbac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NeUuqYWMACGKgzfnvIS+I52nnnPv3lHjEnwZxrenaDDvCv5hdR5DYNQqScK5e4V43kFPEu8CapgdDCVMDdSskKQ3gwKYFHM84UxJ9VdhpZwoE8LzN5QqH57GRr7qfPk6OBifWAu6W49HYAipv+QS89G69Fc774Pw9QkjaQiM+wY9XWvDd4buUXfi8U5PIPI+6UUSALujbcBYH7dAhr8Oo0yelxsrrQssyapXBULhU37VWDg/FjWY2GAZ/gGdjKcU6Qi7fY/qFF2rgD2+AfCoJmOb9dsp8cBAKcfWSp6S1RH3TYXcgX0r+AOYll/3BX5SrZc05y71dtwkA0mFYxJ6crPz8qinSpS45CSfxW6495v0DQnDKE6XwNUB36GA7K842vDgdOnYRCE6E+/OM4fwwka8DtrYMXo2rxklpSXZNG9Q3Bd0jo/EJXn1GZ/THVo5QKhOZI9vFZeeOOiZaIlJ9dTAfrJymF+smonEreLoASuFoUjHwu+NGQyOC0vpTB3TZoaJ3OGwpKFJfiS6qTeUsio1rtkYKWT73MU0luEPSqara2ieU6f9QJVvNJSqeikWqBi2pWItzqO7OL+nzxZZcTpjAHo/tlKjT+nJAnvc04SNyLDQMgOGOxJ+8ang6KZI8p6xLSEqyDoGDpfKvOR8gaSxgHDXmFHA5C1nhEi925w= 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(4744005)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007)(2013699003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AmNgNgY9xyd66eQVLYxxwFEK0X8bHAXs5uJGPMIgoUGJFeX7y3h8QclFa9sL+AxXLCQfhinG877kgzYh3QjPW34B76qcuyLQdz0F8RwRfiPe4PFXg6z/VswvGMrZiNys7l1jKCXyPa/0ec54BiLHUrx0EOvlO7D/gUvsKp1GoCbNbXxop/v4C/CYlFmTLKy7Ndi/uJpAqzQSQJ2da+Zt+VHXvuf2F33Sxu3c1v/iHxrl/c7gRwt855PyH1eLQ2EzJZalWbx3dJCExfScZS9uUVn8T0wXcQkKZ9Fe/Qrj8KZCaa6boLxmYsJce8O6d+wx8KSBqN34Dz60MpQ/D+XRLEMQEUg4pHN0lSFYLmlS7aPjwBfri+h7cn4cOwLpmQhYQrs+BNPwiDytKyfp/sJsa1YqO24+R4rrOvzVt8D4xE1XiXMzVMeQsNmn24qIwYn9tBv8Y4MMB4ljP+JWIH0fytAz7TbPiJmJEdSAAGzwbAh6+JeDqo97nu+w0cOokRbZPC8nNpxgUYPqCs6Cof+lzOpVmHmy/Z/FqBXSwZ4gDWZzb7vfzC3eN5TIGMXE6GRmPO8I0aI6Y2AVqjMrjHUqACTSl5gzWsZUb/O0UbzM94S2RIQ1pocivo71WU5+5IOVfeb5qESEOZEey5G+ztb9Z8/x/kQ0J/hc/W2FLv5Brj66ilN56QIOE7p1waHIX978r+dKnjJ0pIzcXhf6HKkgP7WRIo/y2/0LUIlSeeGZhhfru2vWot7p9OsSGYtypaPcYVzszSpenXrYUQp/oyDAM9UIrjd+I6fwIo+lOTPY8JV92J93Hmw4lII6NzFq+nYuEmTs07hA3vWPknn5hXEVicJ5pxqOju3UNGZnGRknqxUT8wl12J5UJw57HSKUjwDLSmVOGZzO9lItkgG3nRE7B+5n0KZ8Icl+6Dby1ZbdXXBShwgcZnKMQhD/DE2/dIGsJJfpPM6oR1JciUXfbQO74U8SsKTb0LTVIaVLc0qCnTXHeFGELUTETNEdwzdnAyRu0Iae4LmzUA1Jhp12rpHRha9QXkO4rM4+rY5Q7Gl/k4L5KV7VMNjJUOv37RnJSMAXRuXnlKc+xkgNL33sZ5NHVHokSm+uoHoGKiKof6DMj/UlJ8tDmDgXKoH0/QP3pnuGw/5+JOioEqt7gE+hy+dtl7pGuidfl4PWWsCM5y3IGu6b4F23IDt9VbZnXFfhCfPQkOfVqtujQ/KlojSPApXYGXmicMwW8RXxGsOgF4g52ecc2zAAuok40tXnWd/7EGmXnrr3GxB72cjE+6ay6fwgo0WFuYZjPCzxxCc8fFTZmHVGOdBlVxHSCXME6fjJxrozF/PT6EG1wiT2bKFq+q/VyJXjOFnnp8KgU+lVS5bdnFb8/GymA8ozdW53qQw75ikVpQNqrK3XD9x4RvfiEwai2tjyensG+/AevKGCYTihZ0rZEVLOdDmwL49UmTNGgxEgZq1bJ/HgeFuYgkeQCAlEvRYp4v8Z678Ml0LT3kFeqnxefOFRuyHCxr18CD1j3fqLMdrS+nbx0TBBoKz2SkvUUW7XKd6HeeNQtTCz7iGvkrBZ/wM5C7GQ6qVu4Q0IZRwIb4uTZEbG7/dkXJgWVyJNNAO1Jhabm9gdbt978cKqXPs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: daed1450-303c-4a67-b01a-08dc2064fbac X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:27.2256 (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: MlAMKcG/Z6mTbCQUY8UFhUuycVNQjygxLO2otHQ8bRzJiDmOtI6MH0HuUCIUN2D/jQ8GmD7IDRy4tv7EsMR/sH+JbvSLjU88AAapE5AYUw9UmbU2jNCwXIxETFmex2hK X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no We can now use of_graph_get_next_endpoint_raw(), let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 59a5db12bb5c..d616a82f05b6 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -555,7 +555,7 @@ static int graph_parse_node_multi_nm(struct snd_soc_dai_link *dai_link, if (*nm_idx > nm_max) break; - mcpu_ep_n = of_get_next_child(mcpu_port, mcpu_ep_n); + mcpu_ep_n = of_graph_get_next_endpoint_raw(mcpu_port, mcpu_ep_n); if (!mcpu_ep_n) { ret = 0; break; From patchwork Mon Jan 29 00:55:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98837 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFwL-0001Ii-1N for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:55:58 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B79FF1F23179 for ; Mon, 29 Jan 2024 00:55:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9EAA9457; Mon, 29 Jan 2024 00:55:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="IQZ2oXHL" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2134.outbound.protection.outlook.com [40.107.114.134]) (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 C5D03D268; Mon, 29 Jan 2024 00:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.134 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489735; cv=fail; b=Dk8ODlFtvSc/sGapLHQqZMLKaP2n2y804p2C1RCVnLLlV1l3udpRjVMhkxUonpESJbEuiGmwaEMa7FdL52hnr036DucaIbSqP53LH8kt27V2jEQkjVg7b/X1ukq/URTTv3/SqobDS6IKIGB70P4q4pHaA67StWySS87AVXOXTcA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489735; c=relaxed/simple; bh=2BjPQdIp6UHDlcmv00uBrxqQJzZ4qHWJAJniszuCto4=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=DjBZP+KGlc0tuTDYQ9i51Otbwj6eAT7dX1t54326rpXkw754zJODWFlG2pvcOPhpUqsvT4PR6hNi6w16v9oKk9VwFUCmHNPihW63DyoXwlEC4XGkFDbQzuXY5y493c2wxK8DlRr7nO1w/ZI56mlOiv6uxBxcxW6Zdu/pjRviYhU= 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=IQZ2oXHL; arc=fail smtp.client-ip=40.107.114.134 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c2XUoi8XANY9vfNRf7FPzqdYeBB72Em3kw9fxVoRQz24UdZb0DI1jUvDIt5P3A9G/XSTl5Ddj0gi4cKAdbb9LiNDsgi/APAuaLcTAyhqpuJBWIrpJf1Wb0DICTHrWjGcgWWcRthL/WIGV0+mUDkB7i1QxA+FtdmvI9MES3+zHle6kkK3hB8EIp0mRnGAc4Fjh/FNPdoedbQ/I92NxfRjGRmVSanw5LzBeAO5/UXg9GDqgXlr9fPq6iMb1yfsCZuvh+z/MIZT0HDN6ke7CDPV9falz2TYLi4IF3uQusv5x6gS+3Od0tfNkdzxJmILb8PbXO/tararTSFjYu2TZWsKFQ== 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=TB8eKp1LM0RONSWqEImVz5fkdtmN34mzUPQSse4mj/U=; b=NVbC4lhFA+/FIJcI7wL2PYL5NvMgAf1a8qvB++XoyJ3lMhIl7cMsCvpv9UbXpSbByODb0rYwhAmsQwr9b2O5kR2v4y3IxXRw97ljtsglJhpXNiw2FSWxuQLffKBFFJ2DzlFbUJoYcLwQ+PvieoOojtGMCfbXYzHh7+UgmhHrTNMjVBEvVQOeV+w+UuxJo0k8ldCA9Ue6ROVBT7dYBZ5avgLSD1PKzsaN3M6W5fOqQVX7DQ6+i57RLdB0hu9mLE2KyI0caZO4r+H0x85vLzhsRSPGJ/1IFU1X3/+RDYYTpBgrtxoqrtnqq1QAsKgKYYQlKibLoTEmlf8uJsOlR2anYw== 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=TB8eKp1LM0RONSWqEImVz5fkdtmN34mzUPQSse4mj/U=; b=IQZ2oXHLSyDcCDw1msbdI7x/EPOvIp76nTT+j00PuR+JGk2TvIJ7XubytrxGtRHhRCb3wUsdAu4fq3zosEnPU0Tau6zbJaa7JAdd+m6FjYyRtFidkeNA/5r6qgRcKpxQV1OjoZnWO3QcaJUZgSX/QgVB8Zn/xo0z1miorvK70Qc= 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 TYAPR01MB5996.jpnprd01.prod.outlook.com (2603:1096:402:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:31 +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.017; Mon, 29 Jan 2024 00:55:31 +0000 Message-ID: <8734uhklfg.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 09/13] ASoC: test-component: use for_each_port_of_node() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:31 +0000 X-ClientProxiedBy: TYWPR01CA0008.jpnprd01.prod.outlook.com (2603:1096:400:a9::13) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYAPR01MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b3bbee5-d5a8-4567-2962-08dc2064fe56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A8PBvK7fHSt5ERef+OcoLIqJl5/xtmaX7UcJ6olB9Ht0HrekZq4aZ9fJysufXARpMIBpB338pZOE1aHNpfEs8e0GmTwaDXF+M2429dN9BAkMISeckAQVQUrw92TDNFM8/f07VYCtyWwi2jrmklh0ijEi1aa2UAsv3/EqsaB08sgoCGv1Gt2lYQxnciMezTVbR8t7ycgVfurOMx+3W3v+kjCylMDvoBM2jfQY4FgwpXVlhuQMjo9e/SYX1dVAYWrqLwWkZbRyMEGgSbotRUt2aEO46q9F+Vo6QA/T9kPQ3w1Zht801hyQbXhUiB9N18/mnX4BGcuWtggBlRTAOqXgCyEnYR5po3kSae8y10jNUjydV6NOM8dGPHAABig2X+eFyRJwxzDHENtgHW3S7MqrLlQJxR4AWWrY2Zoe2cZ6xO3Klbg4bMbBq+FIDUfNHbsjqePwACvxn9KDgE5bAft1VLh6ZH0CQG4sl7Ce5eRWHFWXOlxQRROi8j7dU7tiKkCO+eA9r4MdwLztdSMVnEgjCDmyKGc7svGhV0ChzUN155Cn6VVWzcP2CHXG+6DnHnqr/KFj5bTmW5XyCJqvzoc04gOfzjMFE2H95+0E9+r00dkPRbnC/RvPYI+RlxlR/CBQgt2ISMIm5JKX8hJp5BF/ZQ== 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)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(83380400001)(6512007)(7416002)(6486002)(5660300002)(2616005)(6506007)(52116002)(478600001)(26005)(38100700002)(4326008)(8936002)(8676002)(41300700001)(4744005)(38350700005)(36756003)(86362001)(2906002)(66946007)(316002)(921011)(66556008)(110136005)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9+6ixCgkCAMKmwaUXm56kB/3PNc+lkCarP07aMD+RvgmGi26724B2RHR+jfKXFt99FFZBAOsXTKr6+8YokVpvnVKDk1TECoQAwLqkZhKg35W2x2Q5Byg4rF3w2maPIyfRi99oT6B1AIACCDm8VNavbPfTgrUI41ei4RJ+wT5r9yRuKTN0JXgCx4TB2Laf9N7xhWx3oq1JPygUZyThnqLd5F3BqGIi+WF4U2ZNNdpDu2bdxHWsdIEhVPjlJrljXTpHDg9D+7pIpuP6PcRlcREQpbP/o27slBAKlC3WlrQel4x3cUErdd/YLeN7PGGoP4iQm8YZw67ggfc72Rsv2FsgMll+V2WAgNKzgGzNxsmT5UB7XxW2Wi3voyDnGCD/mYwBgV2dkduMfTqfknKp/AYEAdnW/k7w9iKZd15phVemAmxdaPL+oexZDGfd28z2q3xHULiAHs9vHm9XUzNICoAV6PabCTHswJmEQOJu3lHI2sCMfwOdEExurIzrMxLiJbKX4BjXOk7KvQTJQF2iO/eOqOymH3BqgietxgKZGf8Kgq0MGEp0a38xgtEaG/Qpm/a0nvqAqqjSHJOt1N9gcAeN3xlDShx1JrWNQsXJVQ1GXfe+3S63aR1eAHG0KtDBT5miG3R1IDmZK6gD8fBzk+aMo9jfa6a6uCGEFADVWIwiv0hn8H+tPyMOdF4NXa/2FcGq+eV6jgfub2FKnZ9G4nHToVXl9FBhGHAysEaNyZwKpQsOXuqJhQgB4LR4t2N8PZhoLL8nCxCgZCiOdLPMV8lURMdQxaJRry1ATKmVQ5e0cDU0t7v3c4Lj39A8kFIRUuKavDg/wrBzb1/0+BIdJTfqEby7yoEEddkZWQM4wjHZRthhlgw8lWfPkggDEvqbUFLjNJR8ZNyS7Wpuf1KzS0eTaKK3mRXMiC31SRKKD/RM+PGh4WgPbbGJ4fkKD+zbMwrVPDkwV3N4a4aq6vsm8yq2JRTylb/178U0pSh2ECeA0+e48JoqUoVx2U9OiP5aJQJo79K8FdpsZGrmbY7etga90pGHZSA28m9P5u67y36JK58Y0gz4xrplnIw88OZSdt2yDNd1Yiw97gIg7zeGTVvFA9+6d3iXyxbqqEQbiNEGEcHFIfpR05+z5r5xRgbI5o/lDTt73Mx9WWRzp2OL/7AEXfhNze5eQ+Bw7IdO/nPxE52g2MWuTvG9j1Rkf7Y4/9jI4RmjTGYubi4ENlnH5XMyaH/aI9XDiEJ6EKpKeW+cucJMwabF3X+SfpNUScXbSM9nV3n22+xeJIsg++LG6ZEuK6wt3U5EzUmUd6rZeO4iNiaWDP5hWZStAQqJaJmQ7Kn/ZPlOhWsfx9jo6YWHwvgRoo/RsPbo6t28V19atNtVpuwUoz5IMjVozc7993MkEB51EwzgVwTu47BOrj+anPbguXWNmA3D8mPBsv3w3/2hrawgLUhDP0DvWhBydSwZmfHJci6Vj4r+4iVU2LEIMP8H62de21K3X82FqoxuNrMWVvr3Tm/WmCQ2/EyL1urGLySITbwHjQ9Xa5rqzAYfHvpFAP9Ue2VZSBGl3LrisBMqRDfw0HdumWUNJLUzeLIMS4pKxPtW9LIKUSxdPMV3g+VlsrylUnE2D5lbU9yjH2xh2w= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b3bbee5-d5a8-4567-2962-08dc2064fe56 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:31.6790 (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: dodn5/r0YcuPYr51l8Q3GYSgIlnREzm3jfvXi7YYfy/C5GZaLDVyU5UhW9Pe61dNHtx4yw9U6mdBDSIpYWL/WArPoYnBckOIJLQZipVENPzD8acNnU4bVYQpngYfisME X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB5996 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no Current test-component.c is using for_each_endpoint_of_node() for parsing, but it should use "port" base loop instead of "endpoint", because properties are "port" base instead of "endpoint". Signed-off-by: Kuninori Morimoto --- sound/soc/generic/test-component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c index e4967540a2e1..4bc83f141fa2 100644 --- a/sound/soc/generic/test-component.c +++ b/sound/soc/generic/test-component.c @@ -600,7 +600,7 @@ static int test_driver_probe(struct platform_device *pdev) } i = 0; - for_each_endpoint_of_node(node, ep) { + for_each_port_of_node(node, ep) { snprintf(dname[i].name, TEST_NAME_LEN, "%s.%d", node->name, i); ddriv[i].name = dname[i].name; From patchwork Mon Jan 29 00:55:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98838 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFwP-0001Jk-08 for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:56:06 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 51AF61F23248 for ; Mon, 29 Jan 2024 00:55:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31EB1D268; Mon, 29 Jan 2024 00:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="O5HqOncI" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2093.outbound.protection.outlook.com [40.107.114.93]) (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 1D304D502; Mon, 29 Jan 2024 00:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.93 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489740; cv=fail; b=SmWKY7s3p9pg77Hu3kv9HhKvX7GIo7bsUCxMFlHqyCDwxN0pba0sKcMKYvS71BzxvVeyDAyvYL3bn8pazhPUHt9Scur+EoHPsXv2WhupP5cPhDtKD8mC9zGmwf9jfk68oUC58AGpmu0ENWg/jKeAoudUafVGCqlz5QmWMT15ea8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489740; c=relaxed/simple; bh=LetAszaW4dFo7pIO2qLTEWoszjj1mQlZBYH1VKPluAI=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=OUfB4tyI1EbkKlYdXZBhpdhLr6gBJwLjXxdUKSgdvRm4YTbInTQMyFTFLTGSZYNFACyBkg/EN/e69C05+haisoaZVZh2uyXHNd8JsXT2m5vdcpxCshz0DFyOYpyKovb1CtZfnUNxcgSKQUUoyglQyellIOnHR4bCtyjSbgPPgb8= 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=O5HqOncI; arc=fail smtp.client-ip=40.107.114.93 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OeMLVxPcWV2G4JGz0lZ2aeVxAThDFFSOzQQArxGH3mXHarA/mu0OlCgSK7EhejpJVDNy2He4zAqkAI+TV3ZMFoSLnfno3gchFqkSPRo5c+PZ2cNkyrfC7gAp30HeC4GbUYmvkdeZH7PeyHNmsDl7249vKL7gLnA/UyWH1t4rtguhSHf4QJe4eGSQj1mCA2wK2TwM6eC4T7C9Nfv10ED5dZCc22roJH2jwp3Zv7eSdCVdUzemwC4oxTxBJWnL4coss/FpQosaGW1jGaEIymyJSqXcj9Q81D6+uexqe5Xul5hRGwbhCWmn+GgD8OoHuoZ86TvqjPmS+6q3I35wIG9z7A== 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=J8kkPI/MwcS8I3GYRXMHAPjRIL5uTgZdaY7byZyINHI=; b=fI7Jfx8vJBcyntUqRoD9XTHs4Lpl7SmSamxg9b6lRzt2vaC83Wy1WuxpKfJo2HQZnrZp7R13ZufoptAx5+yZXOD1LLp9Vjc86WRTZBIRfCNzLhjtlBvtM3JXmMKnURb4h15eF0ndrkPOy/s2z1Qoo0tHfhOKvh2OXYnDVqb75YMJy5aobkMlPU9fC07O+eeY/ivZM6eqPLomcB/Enas/SdDaHfdm4uAE8DYvjERl0ZkppR7M8b52KxMR6TyFDkBLtiEPBu3WKI7IGdJQCqdyYf2A07iiDtt0mhC06pcfPxeien/NP8ENkhgFFSMD+OAcu+Q+vZ3src4zoWIgriHT7w== 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=J8kkPI/MwcS8I3GYRXMHAPjRIL5uTgZdaY7byZyINHI=; b=O5HqOncI7WzWqUXYEiJDwgomA7hSOfXseOB6wIDUN17/yuIJs3c+YTOaSW6Q4VU+5ezKMb0cgAawGTuaH2Nf7qRB/i8oBBIt+BwbaGxDvxJz9ZO8ZH3VihdJHZuVvVqFw4293wfTdnA0zzKkp8/tWy+c1Or7iS54KoT8JxDRnxs= 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 OS3PR01MB9881.jpnprd01.prod.outlook.com (2603:1096:604:1e8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:36 +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.017; Mon, 29 Jan 2024 00:55:36 +0000 Message-ID: <871qa1klfc.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 10/13] fbdev: omapfb: use of_graph_get_remote_port() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:35 +0000 X-ClientProxiedBy: TYAPR01CA0163.jpnprd01.prod.outlook.com (2603:1096:404:7e::31) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9881:EE_ X-MS-Office365-Filtering-Correlation-Id: 2358d8eb-01cd-488b-e34d-08dc2065010e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fqXEytYqwC/kswyx6dBvoa5zwyAk+OYPmLuBhPQzc2NUcs7CHIlUe1vQIBVD6/x8Z3BMYVYQsEb4Mn4kmL0+GljCujg38XVgdmgsAOpetLB12W1jGFfXgm03sZnCxxrnlsbabHAQd7U/13/qexnulNDQ8bkAxVjfpltmrYUPFEPaeB4X6ruc5V6Jkdgc0CS3dsdwOqNQsPZNQ6ragsxDuUBmgq66GwYEFPnP54zfz+SX3rUhHKfWvlmueJrCvgs/p3DjPMNAjrEVopICcnIb3FgMgytIel6vAuXOOZILLcuMGCE7A/76C7YYv3ve5orAPn+7MdPVEnUpdPwphnfcb4OWwKgK9DfNLWf3sRaf29Oza2q/eEsD5FDnMxP/T1gWnR9CVoUEeqYOWdPrFrpGNkf5/21A5bPEhVkMQdmg4TsTtiMX/HY4Me6HHpvQU759oju4SZeOZOKZ2Er2Q22IRM+R0Fc34wiCrCdtq3Ig+oSnLsLxUdW97jV2kSHA5xUlrzjWbB9Djiq/2WCxp8QyQVfZ6IBIySX1c0E1gRSI2ZIywZ3niUNvwayAl96pNnNlmrwyDD6LewBG9n8pY/qFfTqQE/Rc1ji61FpspjQ07aoMyrrrtygUN4yMxkEcxe2z 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)(136003)(366004)(396003)(376002)(39860400002)(346002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(66556008)(8936002)(8676002)(4326008)(2906002)(7416002)(5660300002)(86362001)(110136005)(66946007)(66476007)(316002)(38350700005)(36756003)(38100700002)(52116002)(6506007)(6512007)(478600001)(6486002)(83380400001)(26005)(2616005)(41300700001)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V8WlN41A47MjAOpa86wWww0lGk8nohHlTB84kaBMWJeMhcESAX8ihR1bEI/h6xTE5+7YOLlMZbL2tcdiw2HNQKH8j4mXIG8sGRrra9flPTp22GFD4qTkp5CPCnI+CxTVC9QetEVMRJPKfF31NeZ3pO2SH7a0rd64PKxwZqDttYKjB8XewzSWCNlzJCYBdpXeFn9IO7ZuNOzgeLkosesHsw2uPlbbfFyc51Ee68ECfKbwwaYvI99NRSL37LVEJgfL9HdyhvtsNtj2nO4kai9WD/LMOIPN89KFA2cmIL6Z5eoi4FBss/R23N0Zftbwxgl5muCUhwzwJHD/xUykKsTIEWl0H7S/X6kIp0v3IgnnPltkviHFu0t385+6gvTyWYVsaNNPp61uSlPr4OorO165rCwEOWAMFCnAU54JBrwtxYVyIGRDQt6bf+OF2cOqNrvG+1+M48MxaiVG7ePQ33yfbCcH0a407S7dXHIaj478yycohkZAvM96zKBFiE+vh55zGBw8VpKT33ue0hXBU6iq/u2WWWYsKioVglBg5cIqMslp6QqAbWMokFRY7xDfbNzK5rUEV3xPhLDoPwyhNuHu4JH2TccgEK84IQTdmPEQebZDTfSCT15ETniPIc3PNNTe+cFQwo27Jrz5wb6c9jOsYES2cg67N9EPBCacty1zbTOLxrV2odTa+uuWjlLkEHIP+uZrQ2ADIMLBohkxXXm5S/ytXXjyPmbUezhRB48EggtHR1eaTtr0JOjzmgZ5tON0mccvahqo1CjWsfKawnhmeUbeAd0JrPh8AG0ndw33zFjFQJTEheQKISsoZ9B3VOTZFXdfWAhC1ellhsNetdo+CO0sJ4mAwFY14MFCnWJVH6vDiQMvo/MZHAMWAv56Pmnj8U+ZY9KNEE1HRwEADWKmGZiKaheS9Jo1N/jaUKBcUUn5JsKsyma1pxVvipzjq73rRV8OsVV49W2B+tMgLNdaDxNWB15LAl9sU6YbmAt0v1yQmhE8L8SqUi6BGxgXONTMPoAJfd10srHYzO1eLPTAeRwgY5KMV5beNs8DV2JHbj3jVlKYr+1i+1j+4aAmRF7GIwjkcoMTIzy2ZlU7VGuzeKEuQ38ThEHOXagyWzGm4CcYneVqqZ/lau6rud8bvDLTtbAlxv4tdrNxgQkoSgQFYPW3LIFk09a7KK1U2+bxEGdQx91XHfhR5bZelcNbbg54mszsxtDq1u1Dcis36pAdOXuWzHsTsI4oCfe7yrIIWA+4iwbtl2hn2ozhC/hoKP9GlnsVPZ1NvpWeoNHCUfHnfHKIDajnMMgjodiprscYsXqULL2KNKgVI05+2Ywd0g+hxRzUxoFbYZ/qRNnpPadaGgJLS+w9kIZsx5BeH3EMmU+dcXXGNwrtoGAgQ9tYFJI8wKLpIFt+PyDv9bJM6st7TmvHH5YooUdcSZiRoXuCx8c6MzWKgufYO9zc/8WI5APQNFtlnFOmy6gy75pWcH4PmJ/AUk0N9FcWCXiWfeQWVzomygTi1I3rxmGzYFvQlJGroRPuMob6zvgnTmVjoOcz9SbwRfIOFtdB7yuhq6kWn1LaMcBNM/9vvfst+lC9qN6q/NwivbiW/SfDZvJh2h5TInClPgu56Zm+USUp8IMG6ys= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2358d8eb-01cd-488b-e34d-08dc2065010e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:36.2541 (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: br99x1MBb40e8XKcqpuifFSAZP+UyICFqhoX4DDZRtXTVBsRSlIS+VQ2ewL35yJ5ZX7NX3/hH7oC2oqbhCBkpHKFqvW8U+BDZ9r8lpyT384Pr3VB1+QQCXaGeVvWxNcK X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9881 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no We already have of_graph_get_remote_port(), Let's use it. Signed-off-by: Kuninori Morimoto --- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index 0282d4eef139..fe6c72d03216 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -117,19 +117,6 @@ u32 dss_of_port_get_port_number(struct device_node *port) return reg; } -static struct device_node *omapdss_of_get_remote_port(const struct device_node *node) -{ - struct device_node *np; - - np = of_graph_get_remote_endpoint(node); - if (!np) - return NULL; - - np = of_get_next_parent(np); - - return np; -} - struct device_node * omapdss_of_get_first_endpoint(const struct device_node *parent) { @@ -159,7 +146,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) if (!ep) return ERR_PTR(-EINVAL); - src_port = omapdss_of_get_remote_port(ep); + src_port = of_graph_get_remote_port(ep); if (!src_port) { of_node_put(ep); return ERR_PTR(-EINVAL); From patchwork Mon Jan 29 00:55:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98835 Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFwW-0001Kf-2m for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:56:12 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2BCB5B20DDF for ; Mon, 29 Jan 2024 00:56:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FE5ED534; Mon, 29 Jan 2024 00:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Z0sfHBDl" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2094.outbound.protection.outlook.com [40.107.114.94]) (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 2C813D516; Mon, 29 Jan 2024 00:55:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.94 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489745; cv=fail; b=NWn0xcX5nQw7pnWsR1MaBprvlRIC5oYhnhdHBC9OuQaju3WRU2M4lJEAe/m2MkIT5eUYTDcKrquvXnBSSD3pqYY1A5dk3tI3+rYVezFbVjrdB5+pjNQwmtAZnrU1GVvECBpu8VmPIcHBpL/aoQuNJ1kvI3vzZZLxBIv2pE5o3SA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489745; c=relaxed/simple; bh=5VAs1KQTNTzCnb3g7QL1QAT/oL29+yJC87qcISM0iWg=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=NAjCBqFkQufKnlnDaQQsPZeWn44s4tn+ltZo76uuB2QdP/o+PE/n5nnLWXqVZb7w1tbtMvLsFWqL7B7v8830j3SNpGpw4kKIr/j5WvS79PwiWNTN2uErEr2NdtOP/0VAjni1FBViuQaQXy5G4LqqB39ElHzmbq+pPPf60ZdM7/8= 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=Z0sfHBDl; arc=fail smtp.client-ip=40.107.114.94 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ciNOfKRuKuKAnbnKT2n8KoJ7insCDhZiwJm4txWkC9MEVh0dn2pHam8trgs9BPExxC4zhp7X94T5tDPJtiuN3wAdhcacO/S2R3TP7+OOAlxDHlLVyyOQmd1+t8d/F2l3epSS+HXCVzlJbS6yCrDogc/KUd+iq0tSeqAxSKP+CM/EbeqjR2mFm20CWXQ6Fp/C8K8DfQVn2hemAHztG/TZhTno24fnIFEQ5nMrfiTzctG+EPlasBbs4ud+/74gddnwCuk+Nq9lRseHNV9aSEgeNq0QcOI9eYe65+FF+heCfLBVU18QPKxxNqiGYM09m+VAv+ftZDxH3EoAfePDeVKTyw== 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=VkQMqMHNzGBNFV13iuUeVRTw/iMGfmTezXaXKaO5b0M=; b=V+CaZ3lS8yuQjX9lV5tBV+lzPpDPd79ezHnOzmsXUoMoPNulm2chRFxTBFaVwrYgEVJOPlbjLrC4r63QLZ/loWeqerMYxwVXW/Om2Z70o5LRxupDtsAp+FfRNRyEumhVans/v0jHGHj4PtAww0u51JrFlNQLxzITMrf4vPhIzoLmGhHShxgm30FyX+VewL4hPEmUuaY5A0nvd0sGnhPGB+iONdGrEz56GyO5yFAn1rDq5W5Hi4PZvBfOh07Ggn6kywFDtBoBymxgo/KVPz3BIFmy3zzSxu4hVIXJSB1N0+rfSOys4j9tbefGi2DB/HrQUVcWVWo+pY7qqybZ5a4crw== 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=VkQMqMHNzGBNFV13iuUeVRTw/iMGfmTezXaXKaO5b0M=; b=Z0sfHBDlHpiAuJN+9qoxWMG02sESVx3jQjFwik4pTzX4uiGDR8t8xrIg5CreutPyYQsuwWiBQZ1mooEG2Ok8WpzRt3WlnQDRzyf6fyc0hKuv1Pq6Aj5rg6AqK53HxI4BJs3yHuLvO7aANPEjGLP1Wz4tojxLh0wpM7MLGnbr+1w= 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 OS3PR01MB9881.jpnprd01.prod.outlook.com (2603:1096:604:1e8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:40 +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.017; Mon, 29 Jan 2024 00:55:40 +0000 Message-ID: <87zfwpj6ur.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 11/13] fbdev: omapfb: use of_graph_get_next_port() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:40 +0000 X-ClientProxiedBy: TYCP301CA0041.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:380::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9881:EE_ X-MS-Office365-Filtering-Correlation-Id: 2bb41083-3608-4840-bbbd-08dc206503a4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GfbepQvUFeMHclDTSIxFmtz4yQJVDrpVsaO7a/Pmw1qx5r71ohzXCDOwZA4ColP50OcQBwe9GBrPKgGBgHtpRUPOrwxSu5F6NdmU4zQhmvtX6fKsnU1VgToXsLfPbwGBc3/TB+DhYg9iv/xAHvTuv2zWKfE5kIE9z0RPwmPW4XO31JrRBZD1ujNbqiV43OpDUplmCPY9ts1J+W3+IDj7HadRUXEb6Ltoafx/DDVnWXc+2V9BF8vBfpIrNQY1LcphQGlkVshaKKzHL9wdQmehkF3xbiD/NtDP9/CkcxXH5Gw6h6HC0Gk1nuFegMJYiA+KyIOkkUyX3m/pS3pdC+4cej1XLyYM5l8/p5haJ3PaBFdHSm2ioyWl7BKmSOfh0CQ47vrLVIxwYoORj61X9FGEWIg6N9EhdvzkG3QM05rRpzEGEwiBA1g3Jg1GlIg9q1AEE4jakmiIJmcgF6siUhb8O3xggrgHK+kVW3A2+r0Z+OI/A7LZyxXTr9IaPLIuyAwqGdg+aAKIz5AW8Z8HtHJspThVadGkHcuf9IlbH+YuK+hRNJqbUrjIFYqXgebqsvcOXnL83syziBE7JJYjP9qfK+4gVhtqU7j/xWaxbX12Plvjjg16hGq1sTwPU76v4Nad 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)(136003)(366004)(396003)(376002)(39860400002)(346002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(66556008)(8936002)(8676002)(4326008)(2906002)(7416002)(5660300002)(86362001)(110136005)(66946007)(66476007)(316002)(38350700005)(36756003)(38100700002)(52116002)(6506007)(6512007)(478600001)(6486002)(83380400001)(26005)(2616005)(41300700001)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wOEXD6nsiBVIFRHg03KcVoPw/B8Z1ASJLWzggrinmpcUuA+IUpGDXyCq0bp0c446lZrNxCAkXZV1M6yoC7BTuNbV74P2RYFfiEsF4koQMxDTBT7eGMtjCyqN8H/mTAYVMYtSjuTwTEnaZ4WIzGJ5PTuK3VhvToLoyNvNJ/2YePPxK4Mu90Mx5Xab3snsmUAjd1joH+F0TwEXUTSyf8KrL9zYWUs2vG/jNOHnnzHgRgNhTeweEyqIfwmsHuJW+JMfwGjJlpDghhvNHOozirVUu3Nn/6LOCIWWW8kTCcpkMlKNY4ys4kD+24zQThy8+uoQU4RcVooqMBv9i1i+z+7NyKoILxQ0FruvwVJsB4Lrv8c++kWfhWOpcL3f1cMqakwdqtVYEpnhISLMvsA5ee2Shdc79WtPDya0b/8OOHjE7dcdQqn44LqdcOcpAbIrq4+P43KuKN7/MAfaQxf61JnW/8a675bHVwl0Et6I/3Zx3lJ7KdtADoTWjkEo43pCehBwiewlZgPmDDamM/0Eox7ihVNIcDbRsDncylMlP2vnznysFTGzT9x7euMLyuZWB+cXPCmFNcTA1NrI5jLtVEr5Fr555BoKgBSzj2Eib3rkiIO2Yse5AK9Bp7UTlPNmz132Hjx2s6jEeJcgA7JrauW4TXSJ9s1USLEZfLx4hqYCsqb3rzJhOCvl0Wxj5HPGrbL9MwzD+flZzQUocBQx8D/MVbqjvc+xpWg2N5I3pHuk8nvwzsY6nQ+tkf9FZFjpvwxyr4NYMHID6PefaS2qkBZ+S1raDhAx53C7YUi1cChPxIvbxxC3Mjkr4CqIbR1CgyN1nOLf1fPB6XzCX2A7WwUb97Bf3HGxoOV64RJUti2Wr3dBPT79Mv7y0pMG3BwLLn9cFXrSp/RZbq/cz+88kuBBVE3z9TcFqbn9X4UQzoZgMVyTz9Fh5pE5TQdLipb/WSHTXHK0CrRkU4GWDtB7eWte0+Y4+7BvsUqP3bNJxiX8B7woIP70GOdb8Qyd7u21NaxJDoSPc1o4wfBy7MFADTUhoFu5mWI72vxnsdcME630BzXWhqvSHpEQGO3roE3/RV6zS25ZWSB/BwTId0X8S0d0Gugcfd4JipOvPySDQG+3MMfODhxO7E6HDzaPR8aWx1QXqtXJtMb1NwGTtRIB5asVJREoUXVf4S/+gEklDfeN1aaDzAFNMTbLuN4v2MTnjsnFku2KC747T59F67n6miu1sHAAdVeeNNO5U4CL/dVWgPl3e+XgCFIMrUBTZ/IsZLAthnlpoqycMYmkCjD+Xn2K3jSJ47h+0UZSnYS1fNb8f2O9EzWUJHe3uCfclfPERnRhVkOb9edBvr/15g/Rz2Wz1niFnNSBnshC7wioQG8itwk9i/+0Me1VnGC1foVVq4HCDDWDFaMO1Zf7f/nADkGnxs8e+wrdhMpqvOctMB+CcqzyOdqeNz7BfYUqJxA9YHsbdZmOAUYp7AV2bqxsoUyY3GBZPPT9p6HlniymH7zOoLRaOHanDrqjvHFl4Bxz8nU6Lj6Uscym5KeiMMvcWSt4D8mUJ3fv+b7K0dZU3H563/B2rAvGnu2zrzOqmXDJ43CG8v9MWelpGgH2SMOGwXMi8o6O0msGhFcH/UWPO7waFjM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bb41083-3608-4840-bbbd-08dc206503a4 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:40.5777 (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: X7wjZT301/s67SFJTrRDfkkuGspy3a1i3QDDRBpHNnF7hfqmDJ31oCPc1NlNLAw/utvlyXBPKjxpOZRj04A+FZCMbZzYklfv5j8DeyZXgN2f6cJq2uBm1ZxuErL5z+Cq X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9881 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no Now we can use of_graph_get_next_port() for port parsing. Use it on omapfb. Signed-off-by: Kuninori Morimoto --- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 48 +------------------ drivers/video/fbdev/omap2/omapfb/dss/dss.c | 9 ++-- include/video/omapfb_dss.h | 4 -- 3 files changed, 6 insertions(+), 55 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index fe6c72d03216..321ae18f2747 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -15,52 +15,6 @@ #include "dss.h" -struct device_node * -omapdss_of_get_next_port(const struct device_node *parent, - struct device_node *prev) -{ - struct device_node *port = NULL; - - if (!parent) - return NULL; - - if (!prev) { - struct device_node *ports; - /* - * It's the first call, we have to find a port subnode - * within this node or within an optional 'ports' node. - */ - ports = of_get_child_by_name(parent, "ports"); - if (ports) - parent = ports; - - port = of_get_child_by_name(parent, "port"); - - /* release the 'ports' node */ - of_node_put(ports); - } else { - struct device_node *ports; - - ports = of_get_parent(prev); - if (!ports) - return NULL; - - do { - port = of_get_next_child(ports, prev); - if (!port) { - of_node_put(ports); - return NULL; - } - prev = port; - } while (!of_node_name_eq(port, "port")); - - of_node_put(ports); - } - - return port; -} -EXPORT_SYMBOL_GPL(omapdss_of_get_next_port); - struct device_node * omapdss_of_get_next_endpoint(const struct device_node *parent, struct device_node *prev) @@ -122,7 +76,7 @@ omapdss_of_get_first_endpoint(const struct device_node *parent) { struct device_node *port, *ep; - port = omapdss_of_get_next_port(parent, NULL); + port = of_graph_get_next_port(parent, NULL); if (!port) return NULL; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c index d814e4baa4b3..5cab317011ee 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -922,7 +923,7 @@ static int dss_init_ports(struct platform_device *pdev) if (parent == NULL) return 0; - port = omapdss_of_get_next_port(parent, NULL); + port = of_graph_get_next_port(parent, NULL); if (!port) return 0; @@ -953,7 +954,7 @@ static int dss_init_ports(struct platform_device *pdev) break; } } while (!ret && - (port = omapdss_of_get_next_port(parent, port)) != NULL); + (port = of_graph_get_next_port(parent, port)) != NULL); if (ret) dss_uninit_ports(pdev); @@ -969,7 +970,7 @@ static void dss_uninit_ports(struct platform_device *pdev) if (parent == NULL) return; - port = omapdss_of_get_next_port(parent, NULL); + port = of_graph_get_next_port(parent, NULL); if (!port) return; @@ -1000,7 +1001,7 @@ static void dss_uninit_ports(struct platform_device *pdev) default: break; } - } while ((port = omapdss_of_get_next_port(parent, port)) != NULL); + } while ((port = of_graph_get_next_port(parent, port)) != NULL); } static int dss_video_pll_probe(struct platform_device *pdev) diff --git a/include/video/omapfb_dss.h b/include/video/omapfb_dss.h index e8eaac2cb7b8..426d12881132 100644 --- a/include/video/omapfb_dss.h +++ b/include/video/omapfb_dss.h @@ -811,10 +811,6 @@ static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev) return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; } -struct device_node * -omapdss_of_get_next_port(const struct device_node *parent, - struct device_node *prev); - struct device_node * omapdss_of_get_next_endpoint(const struct device_node *parent, struct device_node *prev); From patchwork Mon Jan 29 00:55:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 98836 Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rUFwf-0001LQ-07 for patchwork@linuxtv.org; Mon, 29 Jan 2024 00:56:21 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9811B1F21920 for ; Mon, 29 Jan 2024 00:56:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32759D267; Mon, 29 Jan 2024 00:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="pxb8FUFc" X-Original-To: linux-media@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2102.outbound.protection.outlook.com [40.107.114.102]) (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 0B11CDDA8; Mon, 29 Jan 2024 00:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.102 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489752; cv=fail; b=GEB5RSzwabc88M4Z3dh2LsGxmsmA9YDuWrT5vC1D4lmTQe3NTYZwneXktvipU4ZlAqWndK72TTp3b8Swg0xVplGOx8ZDE/50c/+hCWN/Yj2xn337vdSQe2P/NcyvuzXlXOybp9H4M0koizJnWU04rBoo5oCtqIjpj+AHysdXF/k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706489752; c=relaxed/simple; bh=xdcdHGRLk++9unFrWuwwLTfbcdoE19dV/F07gpyrLXU=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=LylcM8XBDKRTleHbZPILpq2OlTBwg1740vQFUKC0/prso1EescHMF14sCWJ/TqaGQN6sOAwpklksxpfsWQwHlZTjc5GW6W1WJKvL61v1M9LcrBz2yXirOiMgTHX8P0ggNZIDi55e+3zHyrKeeRqeH6RXqlSvASGzxXukv0wakhY= 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=pxb8FUFc; arc=fail smtp.client-ip=40.107.114.102 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BX0XXft/KTnyn2Mgfn52juWmICVMfjouzoSKBwqNs37mThlhp+/gq0boDIRWxLZJyMQYKW+3Efu4ShqBQNRwsX8YRA3489zVo/gX27idFoPa52Ocrm31pxZIt1VAQ/nCUO65Gn8wqFiJBwtOiSXL5Vnrotakh1iLaH8FEALdTPsJygaS1Z/cl3gX8ZD1zQArjILcrY8Ph8bBNrXy4MwJTOR5yZPH90Ydb2QmCaxokRy/raaFa/TsmWRFZbxuUQ2tkvy0w/hfV+/vAOrrWXcGCLkaWla1A9qMs2QDWywDENp+LBeTF9Rc6vrw7StTQSHMkV5FTD3oI0HTGyEYdnDbHQ== 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=cq2LsI7iLvumbZjTzkBs4ovB27srv8jhCkhgAMa4bww=; b=QVujTdDe9J1rmp8j+rvFTuHUdDguDDVP422TjsBwGzYk3U1/ubOss7Z6fQnOt2Az7eBqHMbYzfZS8usmll4T9ZOUsbw5M7qoZwc0at7nnaCDp3uJ+lzS6svDT/YwxhwHlomNowOU4+K5h53TkeKQEy/ub2jIE5RDk7r+BimGwQpfu8NduGbVesFf7H+k1S+VnggpNMW+Ms/wxIca63Fdln2FV1JwGCWV9Tf76w7z2cqedbuvg21MEWgWvKxrLI5nbK0mEMxQS4xlOIUGwlsSPFBduh4DHFYCuhveT84ZygxTBbCGoaTL9Of7/tudBU1bFJiLTNZ4JBkoYdYwJfz3Sg== 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=cq2LsI7iLvumbZjTzkBs4ovB27srv8jhCkhgAMa4bww=; b=pxb8FUFcoJEPKdNLOio2zmYXZpfnghg8xrOWowJiYGgNeQmKCL20dAK7aarkD22MRoRyAJ/t7pve0JGdXAU3POBJcp/BU/OiHRK2+YD8l4FFaGyhUFd0uXgX1hpgVEiQ5aEFwiiT1fiFEcjzjqmaZMwsjAo0wtQqcsNSCxLpp6A= 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 OS3PR01MB9881.jpnprd01.prod.outlook.com (2603:1096:604:1e8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.20; Mon, 29 Jan 2024 00:55:48 +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.017; Mon, 29 Jan 2024 00:55:48 +0000 Message-ID: <87y1c9j6uk.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 12/13] fbdev: omapfb: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: =?iso-8859-1?q?=22Uwe_Kleine-K=C3=B6nig=22?= , Daniel Vetter , David Airlie , Frank Rowand , 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> References: <87fryhklhb.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 29 Jan 2024 00:55:48 +0000 X-ClientProxiedBy: TYCP286CA0089.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b3::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9881:EE_ X-MS-Office365-Filtering-Correlation-Id: f33cebd0-7a40-4289-4fee-08dc2065086b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +/n4uptVyzYbOYsvBvxFyzB7VqJJ4+DI64H3k6BqdKyJOGoVGMEmrj1JwIkTUfO7wY6H3EEc8n9UoJqKSL2jLFnoQIoHZ6YsAr4LwIH67IDjo2o00LOGL5J7+LTBz69AJZbQFs2JDeBlXvEjV5QqkgrvAeGwlOn9teh08jsPrqro32ryohZJeO1q/RqmPG0FZ5wUezzP+If7+/DPnceINkp1v4rTKk2SZ2NJ/lCY++PbZLJpwZxG9BKgpnXs+mf3EhLFMuqBeyluk0+sf2YB0OKTKbKyZZABHNTymg2ddz373ZoPd2M9SELVnaHqwln3BHMzhh7/43HDhbcRwl+c8puoreNdJAvC2V4yCkIJQi9VnCSgqdkN46e5mifZLwoPN+f015PQIecdb1Wo4m/Domw/MaBnMaylI7Cohy5J19mkF7wducogPokBeKCouFACeycrZz4ZaDCzVcwXCdsyqXPQMSxVxlFcFfefHSGMVguobFunEjZTZIWTDkhv4trRpTmEbUCPQm7u1OGA/jdafkqRaZBH9kIGhphgK08FnxKYKIdAK8i6RKUpkQ6ASkgABrGDIJJZ4xaHpBNctnzRg0WuJDhQ6YNOkR9+4812/lreYVD13oNsBawiywz9DLMk 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)(136003)(366004)(396003)(376002)(39860400002)(346002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(66556008)(8936002)(8676002)(4326008)(2906002)(7416002)(5660300002)(86362001)(110136005)(66946007)(66476007)(316002)(38350700005)(36756003)(38100700002)(52116002)(6506007)(6512007)(478600001)(6486002)(83380400001)(26005)(2616005)(41300700001)(921011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FXBIYKZ+LO39Xnb8wSBsyRCJBFSkLZAPSgcXSyiUQ6pdAzxfNpsv8veNr1xLyaOeTpjV6iw4fr30rDc8/CosZIKHKYLhuiDLzrijMP/RUw8SuAo4uXvj32IbWlCwWodYmzBCfa+AHXUrjhWBfDHwNFOrEscgNwDa34WGg687GfnZW3A4DLOKC1KVAnIiGorOCNMHBHQ0Zy7W/vZo7XWds2OfZEYBSg0INiVdGJwzWpKMc2BCLNfd7wF4CAfmTFVGKCmqWJCJ6Twp+Bf5SRcEHMbpYurBlO+8QBuyEgRSPDzt2QgJPRQ8IS6JjtqjN48j4VilKvnlPrPyrmn8v/h3+BhjigKzgIgNW6RvQjfQuR/stpCw7CIp4O4vgY/ckZ1V7xbJcHDomgkNKvIGkSG383AhUg6GHqXrw0LZzlYjtR6G/oHEXLWbHRjjwddFoUvv17m9LnKlf5gwAfkzroUP1wkuvMB/BINQBsqWSsYo9C5imo75syfi45FA2s3+zfFOWk/lSFVEOIUK1Jg7Ny8CEmsdNns5B+UMxeiB25W9UmOJ6T8kGk6gUSbUvt3WLGrfLKGne/QnH4Xel23Yd9QhTvWvmnCgUBsDLk3aDWTMx5c70Egl4jTbYbNEt2SLpDEG115JqZ9COqhxYiTamCMq2NCguUccrhOHVaMndazpBp6WcO0LYAht/eB5shSQRfcIojbOn1cYKNkAPYa3667BCkvnBZxGT5wpUX1ztRy3ksnim4MFwQYpmhXOUyVj72HWFBQs4/2TVIVA1OVSZHohwefztF+IQJ60xa+kTwNiRXt/A7Y8XySw7xE0y71T4KLTOB8dk0g7goSMfemw7556GOyGBZQAqS2RzHkM5a1GqDbPGmWFMIbywQGy9K3WhZD/l8FypHiMiMz0N52aSK0zMIZVxZIl8oJgHJCkiq3Bq0UinChUkAOsnlkDZ4kfHxn8n0ekajk7WFB4E3vaGT3L527Qe2ZADh5ls9YBo6VbFeS2c7XjWTBgFoty3q9A7N7JoAqeZxTK6SRb2ydC1W1OUSA+jBEb/L8fdZJVW1PriWXeFpYMZNM5B9tAPMkSfyd/Ev+E1HOYBMhKyYLqqo6UP1JcDm6AziUFxwms9hkuijOxBiVw6hvOOklewE9junckx059B+ep+PLKtjpsWhoDBDJE1rIrpxa1SvDf+T5dMTHBhOp1upMuYLjh2lqdSYa7LNoDY55KVcpAv88Qjf75XIB0tylFxibbO0O39c2PS15BLo+yG7jfU7rQlFtpeGDTCQS5HvjvhwrzP98oHNaksk/aNYpnLwRAT/fKSptXiiwUikBRB18HOTyrucqPTsSxTKhdqo0lr1pKazTXTm/xvBAqrV8T4rz397R0GoXcwMdUt3JY357/EZFWhrydmDkPiZpvDuQXablI42zrUs27lx/ikeTRJ7rmLRXH3k16MSO9vcTWWxgB7uWMV0YbG02gXfgUyghxKiTZty8UPJi+Hr22FxSDd/BeKtAFbGNxa8nuEMcXJKtZc+MhGahwWPJVcgqpXlVR4x4V+0549fPTrtflQvU4PNhxOh+zlObmw8pYFKEk85bdtJ/l73XmIsMrAqhFlz/Mivq6eby3iLP8A78bCWx+DLPNcqxOTVyNWZU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f33cebd0-7a40-4289-4fee-08dc2065086b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 00:55:48.6240 (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: v202N+VDBcNo9YjxpJMgl+lyPJKZQ8fe45DmC7VfkfaEOJw2MnW2BXQ1hDW6SkBChADGEJQBcKrbNInzg4zgRyj9YsxdPef+wcMyF55F8BHeb0okDGon8XhuwzIn5j9t X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9881 X-LSpam-Score: -3.0 (---) X-LSpam-Report: No, score=-3.0 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no We can now use of_graph_get_next_endpoint_raw(), 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..c42c00850f0c 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_raw(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..8aa2bfc2825f 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_raw(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..d25f6575e557 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