From patchwork Fri Aug 9 04:22:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 818467 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011067.outbound.protection.outlook.com [52.101.125.67]) (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 234002208E; Fri, 9 Aug 2024 04:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177349; cv=fail; b=dclKAXNffehWpBdnjK0j3M6CuslvCBmGULIvLwtM1Txeymh3+tzro9FoDwfptOZauIdPua/6h+HJOWhPftFCemt4FSBsJchL7YNZYPReuYzbpuxsnIWnPYqEbdLWYkGoSD21lNsDwTouqaiTsJgo37TaXaPjEF5YWME992EjPVc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177349; c=relaxed/simple; bh=jjHzsGxOUaMiRX5WLxUB8M1oyJTVAf+MOvQwk22Lr1Q=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=B4pUXqyBF01spVWBkXZ801GGxPOOJ+JUkMjKaotyLP6h2NV6gKW3STABQdCNw+sxVTNSYRW8YxQ+xna/XyCzF8v8XawVp1QhZPehGkjK9sqBhbccY62zkXNmyb7gtAp1FQDYA0Ova4ubYUI8lhsrZuQVXJk8uitr0L/T7XG1Kbs= 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=LgLLO/yc; arc=fail smtp.client-ip=52.101.125.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="LgLLO/yc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dhIFhOwskAwoFI+qrERNqHSlNtW3nNf6GovlmC7GIFE7rxDZ39XWznUADsia9K22bFRyiBKuHBOyhU6X0Uko6cTcNRz3PLDanvAEG6GogwuQ992VVWkPgwrPedWAmHgCzE7SrNk1I+NLmXK3L2oNWf3Zvy47RX47M0aOer7FrE7v+nvhqOaAqrn+fUWAidIh+rr3nQ055XZW62KozNu4lzlW6wZDU0BA2sFOfbmYfWVeTPJUd7eL4YUZNlb2unxI+BxPFSIEj+vnUa60mxMFGZ8w4BtBnqVgYJptHXulIoC1nmbjrw+1EHwKo4uW5BwcrV/3II+8hCDdLPcZ/Y6Znw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yxYZARE5YIAVlLCOn5vCZq4OcG85LHMVzjMRxhWqpK8=; b=sUTKHb2OIJEQreRaxN8bXQ8b6CU2H/H7kK7qlyVg0p388Gl8DLbSTypYy9f6NkFS0KACBXZ7GexmqAZjBUeVpvrCWzIfuQecO9gSTQs/LjzYzkcKDupqXumrLNosTxjQztO+WT3BJBpAhoF7Ff3g4HuacKV56/bDhwwP4HHjE5ELI5iPC7zcDNDTek3sPFHB9BItKmQc7INRFKCzBPdfuUZtkhjoYIX14+FEJac9rSTpdtUqF+k/7MRZmz1bMn9SI4Ceu86LD9hGh35RMPV+BdssGfmYFLCVQ84VgtS5vyqI9mTfyd9s6WHG0k19jImdbnXqQ9fdmznWaiZn6rCucw== 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=yxYZARE5YIAVlLCOn5vCZq4OcG85LHMVzjMRxhWqpK8=; b=LgLLO/yc3VW00kqYwaP/LJs/nirzvao+wbb+QkC5Eq7iwTr4HOU6WunDKlniO1zDiDSeZOYQ/09dS/gApg5BY/CZm8VlsPMvDPj3bb6ahxuX2dW7CnPCkA4T7tTD9lQlfdRSKud40CqDdSkCOVwMDGouepxREC1bOJQvmZGI8ek= 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 OS3PR01MB9639.jpnprd01.prod.outlook.com (2603:1096:604:1cf::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Fri, 9 Aug 2024 04:22:22 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7849.014; Fri, 9 Aug 2024 04:22:22 +0000 Message-ID: <874j7u8gw2.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 1/9] of: property: add of_graph_get_next_port() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> References: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 9 Aug 2024 04:22:22 +0000 X-ClientProxiedBy: TYCP286CA0045.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29d::19) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9639:EE_ X-MS-Office365-Filtering-Correlation-Id: d1cbeb3d-e069-4c01-c282-08dcb82add7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|1800799024|376014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: dLxi3Cb3W5HPd15o+MIW/6BgnAf3EfNbAOqwlNZbL3udeKrvjXJvrbdnou2CWPl82D7dwxjttQIeYzLKXhb3ZlWE6o2Ok7KNYeESgZvCSEhhNCzNk5kevZ7U80b+p999T6bB9snwTl6yjsAbzqcctVAObHTrldRv6qHWgz/Sj0S+TLd9KKmv1os02BJR62BiiMElAsJrDpIFH9X3hoPw3VrnDVexccl1MgMlEsnsgZA3YEf62Sgy/W3+90Hg8EKcMBS5BQw8aoMrt2+lZhxUZjjLCa7zP+/cJAb6yUvx2d9RqDtb+e6ENu95j9ue1ZBfS2edJT57djCxnxwjuJ7/PsVKwvh/GHMXWRTuB58ZjmMoqRl+jxWPhNvs+zlLv4w4hnXPiYFUK+VQqsPw2DGnThd9lt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en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(7416014)(1800799024)(376014)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TJ05b5OnsEvmj8cofx8DxYLA1eGTsvPvpcv9pZk0OOn/HEsCvfZZeN70b4EsTgnkU0ucMpjVFQJQzswXhxH3xiOhk/9g5dBYuntP2wHJJCxhFEyLMLfl+utb1taQIqkj4ikN5qJ4TD6jmDvuCaeWCbS60ppclDTBCMgmM/a4+s0aZNY3Cmp3gGV3fKQQk4WnWRCqlfcUbO4qwOx1HPkl8EP5gJLypr/DC3MClCeMsml8SGiSBBb2wYHnOrmz3rB25IaQZfH+hAgBgcGHM1CBqjRqk4ZV4mOxVwf8/+9Q/YQ9AZgUEn2u5l2zub2R2O7rjo+O+SQ/jv43WxCC93rHzdhGu9UsGvTwwrC8r3pfx7cMAPnOUVAGKuZWXV4kI5BrLgJu5uKAMgPlVgTNjEoEzOB01jAOIS0ATACfqtC04JtTVSuCP7vdxAfefiwydz9lMYiNcSjpVx/JMqq4OqeVdPgzsLXaCayuoeDlvUl+pg7ljyXmH/1UUyO5uKF7r3scHLpW4w1OOWL/hVWVQrMJdUfyz0yfgW1W2XU+pYCVL2KUd0wbsW0B+2YpJAM7FJKTco0AxxfzFM4eptZV1TKTuwaSLKYcIbznzJmTq4T2uSR4C03KmLbmJyjKOy8mOOuaqsQUISj3/zluSYxm2WokJa69DSjwZzFQSMciufqYkBE32emVYayw/ndBeUSkdHHsdIKBmXtRjstma7ASeklvr0jYd6vhay/v1vr8pDowa+ZMDQmM4vJeW+byc/ZzE1O7T7WheO277JWccJcEXSWAlBhDuVxwILttoO1lsItPGAjBO919eB7W6uGq0vLhVevM/QDqaElRiTGYIf2dUuIhZLi3tw0jd6yYqD0n4kUze8PuK2axGCcIA+Kwb3QggXGELGzG9XiV20B+Z5CSlt0VJqm9zdkWMluyWyL4LcYVOkdYp0/pYBQvLpDGFu1nqwB70mrX0c4cXq4Ehbj63BjFSbAw1VvcyxCsU45cuCEc9hL5LQtmuy9oCJpH1FBuxc7ngNy4sXtKIMwKEW7LCOfhc9qDmhLm2tlH/umrkwVU+fpULzl3vIcnRW3V3nxa9fNhpxl3HutpGyhC792DIV9eyc1CautMF/aYyuYPcom/OKeKrZ8tdZL8GUFlxIZQWO1iFIBA/uwC7OjCB13YIkIANK4ZbqKL3rkMDXtysbZBPEdptKG57nq90bvBFYTA43T2PFtjYUiIVIpQbVRr0gM2aKnqjchjVop7rLDBfzTBANfLsXDRBAt3VCUkoSPwZfZ8QfN2dHwPtbBmwJTdunQpKNjZQj/RVoS1AcOxbjoFWD/c1A9fIe9Z9OeWB1h7STDKlgDz4yeSUbxVXw3C7nE9reNbsbnwYToHmqfq2co7ledW+6KMRu0A1wwJTwGm215jGmOCq+h8ojm+9HwSNoVMjk6SAfyknG+OfFn+hELy3HxVHteKC0fck9o2krExR+dgqxGOwaVi1wVm4IvoRjFUQt0up72UQnfU6nChNqaYWL98LzdpdL4uO3kLdt1OCY89nHyfwfovuL5/2at6kqwrSyR64wEoBs9wyANyxHzkZL/DJkUXobNvBztLQAg8HVyYxq0CCCkaMDQVQxvdDwUlWAZnLFfaIaQIZ+e4zjpNkyU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1cbeb3d-e069-4c01-c282-08dcb82add7b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 04:22:22.5227 (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: j2HmD28QVV9bFjfEEcg/WK0T96T2XXqKvKGv8/E9dlYWIE/hgLOIv/8N9iGJ4uD9Q3AMnxGHW0ghcpDZeJJUR9f8uzDhXA7ZCeXBPFrB3NKj3FAagoSrj2fhCDt+DXHX X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9639 We have endpoint base functions - of_graph_get_next_device_endpoint() - of_graph_get_device_endpoint_count() - for_each_of_graph_device_endpoint() Here, for_each_of_graph_device_endpoint() loop finds each endpoints ports { port@0 { (1) endpoint {...}; }; port@1 { (2) endpoint {...}; }; ... }; In above case, it 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" via for_each_of_graph_device_endpoint(). 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 {...}; }; ... }; In the same time, same reason, we want to handle "ports" same as "port". node { => ports@0 { port@0 { endpoint@0 {...}; endpoint@1 {...}; ... }; port@1 { endpoint@0 {...}; endpoint@1 {...}; ... }; ... }; => ports@1 { ... }; }; Add "ports" / "port" base functions. For above case, we can use for_each_of_graph_ports(node, ports) { for_each_of_graph_port(ports, port) { ... } } This loop works in case of "node" doesn't have "ports" also. Signed-off-by: Kuninori Morimoto --- drivers/of/property.c | 88 ++++++++++++++++++++++++++++++++++++++++ include/linux/of_graph.h | 46 +++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/drivers/of/property.c b/drivers/of/property.c index 164d77cb9445..e4d5dfe70104 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -625,6 +625,76 @@ 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_ports() - get next ports node. + * @parent: pointer to the parent device node + * @prev: previous ports node, or NULL to get first + * + * If "parent" node doesn't have "ports" node, it returns "parent" node itself as "ports" node. + * + * Return: A 'ports' node pointer with refcount incremented. Refcount + * of the passed @prev node is decremented. + */ +struct device_node *of_graph_get_next_ports(struct device_node *parent, + struct device_node *prev) +{ + if (!parent) + return NULL; + + if (!prev) { + prev = of_get_child_by_name(parent, "ports"); + + /* use parent as its ports of this device if it not exist */ + if (!prev) + prev = of_node_get(parent); + + return prev; + } + + do { + prev = of_get_next_child(parent, prev); + if (!prev) + break; + } while (!of_node_name_eq(prev, "ports")); + + return prev; +} +EXPORT_SYMBOL(of_graph_get_next_ports); + +/** + * of_graph_get_next_port() - get next port node. + * @parent: pointer to the parent device node, or parent ports node + * @prev: previous port node, or NULL to get first + * + * Parent device node can be used as @parent whether device node has ports node or not. + * It will work same as ports@0 node. + * + * Return: A 'port' node pointer with refcount incremented. Refcount + * of the passed @prev node is decremented. + */ +struct device_node *of_graph_get_next_port(struct device_node *parent, + struct device_node *prev) +{ + if (!parent) + return NULL; + + if (!prev) { + struct device_node *ports __free(device_node) = + of_graph_get_next_ports(parent, NULL); + + return of_get_child_by_name(ports, "port"); + } + + do { + prev = of_get_next_child(parent, prev); + if (!prev) + break; + } while (!of_node_name_eq(prev, "port")); + + return prev; +} +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 +893,24 @@ unsigned int of_graph_get_endpoint_count(const struct device_node *np) } EXPORT_SYMBOL(of_graph_get_endpoint_count); +/** + * of_graph_get_port_count() - get the number of port in a device node + * @np: pointer to the parent device node + * + * Return: count of port of this device node + */ +unsigned int of_graph_get_port_count(struct device_node *np) +{ + struct device_node *port = NULL; + int num = 0; + + for_each_of_graph_port(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 a4bea62bfa29..a6b91577700a 100644 --- a/include/linux/of_graph.h +++ b/include/linux/of_graph.h @@ -37,14 +37,41 @@ struct of_endpoint { for (child = of_graph_get_next_endpoint(parent, NULL); child != NULL; \ child = of_graph_get_next_endpoint(parent, child)) +/** + * for_each_of_graph_ports - iterate over every ports in a device node + * @parent: parent device node containing ports + * @child: loop variable pointing to the current ports node + * + * When breaking out of the loop, of_node_put(child) has to be called manually. + */ +#define for_each_of_graph_ports(parent, child) \ + for (child = of_graph_get_next_ports(parent, NULL); child != NULL; \ + child = of_graph_get_next_ports(parent, child)) + +/** + * for_each_of_graph_port - iterate over every port in a device or ports node + * @parent: parent device or ports node containing 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_of_graph_port(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); unsigned int of_graph_get_endpoint_count(const struct device_node *np); +unsigned int of_graph_get_port_count(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_ports(struct device_node *parent, + struct device_node *ports); +struct device_node *of_graph_get_next_port(struct device_node *parent, + struct device_node *port); 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( @@ -73,6 +100,11 @@ static inline unsigned int of_graph_get_endpoint_count(const struct device_node return 0; } +static inline unsigned int of_graph_get_port_count(struct device_node *np) +{ + return 0; +} + static inline struct device_node *of_graph_get_port_by_id( struct device_node *node, u32 id) { @@ -86,6 +118,20 @@ static inline struct device_node *of_graph_get_next_endpoint( return NULL; } +static inline struct device_node *of_graph_get_next_ports( + struct device_node *parent, + struct device_node *previous) +{ + return NULL; +} + +static inline struct device_node *of_graph_get_next_port( + 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 Fri Aug 9 04:22:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 818466 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010051.outbound.protection.outlook.com [52.101.229.51]) (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 988C72208E; Fri, 9 Aug 2024 04:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177363; cv=fail; b=GYamSDihQcecNQzbEQeSOwKDHP3cSRgIAY1ibsz0XmxP3b21ImHDVCc/U7rtxoXHo3al+Cg9XhcUa+nKSj9P04j08pFIDwoptoj+cEMDClsXQYT10hj2VQMW2yMsTtBS3RGntIdm2gMrNs5DyKQSk0be1iavWAA1Ol7zD3+vcAM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177363; c=relaxed/simple; bh=OSXjaN9j3GACycTjnv5rUG4HWuDDbz8UjyI+e7aT38I=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=JEBeRTU2tiFLFSBmf+dtrVYDXcbwdutqtutKvhMT/qaPgFNj4OO630wzNwqi5vKnSiS5I3SqfJ2V43xm7co6ONL+0oRurMuv5DIU0CWdEA675ZMETuI5BxKqNa4eWPmoMQQWBzUatIbJWGQASAyncN8evaczD3O5U06Q6Nj50o0= 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=iFvnxf2p; arc=fail smtp.client-ip=52.101.229.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="iFvnxf2p" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wral9Xmtcuk3Orj5PRbX7+w4bXeiVHY8heNSQ3JCDo+5KDy8NrUCc3Rh87ub4vDpOqC16bI4dFJcCIO1FfksJgdYC4eOUV/zL2fQDcbfu7VSKibAhjmH2p592UeZCFtCGjftjLerxqZPHHCIKpmGLufvvgfPt99PexmXXgzwcbXCslQGk1pZ3/qUKsHWb302GVf5xBtQ2lOpTFza8JeF8cBaOgHmFlyNr0YJ3Av0EkQrxo8StzY5zsNUrhmga83f//PvOBZnBaMH1Qquhe+1Qqe2OGpIhD0s9aO7NEQqrntrNutXERQte1JS4pctboaRa6iEzeLzISIHgZGmod04yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1oY0qoi/gJg9xYf1gx9k0f5cIYZLqGIIdG5ovK6TzRE=; b=YmBvqp3TI6QqcilvQD0/r4LRKz2vvweUWOg9CJoGgTH/G/5mzYxlwPr2dD6pPM+Nzzr/MG+Qd2xkqs/WKcyuVeEUwWQTyXoltHu3cdriP4DJM6Nr0XurL4TDqgxdqkbMnLH54ub4FEk7vfX8LtdwaQfNMT5wfpWvOOOQLIwZAZEjKGdvJ5BUS7ZoLmPz6JRk8UzVJdHgO70XduLM2GTW/5HzUvbWCNKoC3QSvVWACJ6pcHrsCMRl4DMty0SVAzYra3r639svDNZackzfwM2Oqa/8rLxW+6cH8df/PkYVV2YI42J2XTNoCJuXI5wCYea/JpalMb7kTt1+loHa2arFNQ== 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=1oY0qoi/gJg9xYf1gx9k0f5cIYZLqGIIdG5ovK6TzRE=; b=iFvnxf2p7XPNOqJuYrWboiJ+N8S5JoBh3PFoDWy6/BlWg8TxTcjcrCEfTUvEhGl5D2/X097LStLyW4zGhNhAC518ynlgrMvfy1LiUcETwCxrNjYs4vyWiPhC8L7CObSLXttkYccq80izY4WGpFTEoPjxXU/WpuV8jyGmBtZfKck= 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 OS3PR01MB9639.jpnprd01.prod.outlook.com (2603:1096:604:1cf::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Fri, 9 Aug 2024 04:22:39 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7849.014; Fri, 9 Aug 2024 04:22:39 +0000 Message-ID: <871q2y8gvl.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 3/9] ASoC: test-component: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> References: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 9 Aug 2024 04:22:38 +0000 X-ClientProxiedBy: TYCP286CA0196.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:385::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9639:EE_ X-MS-Office365-Filtering-Correlation-Id: f90d7454-78aa-4a76-44a6-08dcb82ae750 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|1800799024|376014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: mO5yGr61ou1SSBAHHlFE69f/kkWoHE3G3a6bpRMWza2NoglBFTaf2Zf2vaYsRTFxslz8PZ6OylP6VUVyoQIQ+p8BEckTMrykS6nkiwszb5ZeprzAbIYI7MT03WfhzYtSJgHrHo0c6wLo4feCT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op3TmscVBE0n5vFqStmk+P8kj2cxKlI1mj+BEzG/j6ZQdI61QfB5h/b3ypMs1KJdrXZgaMABll3jRXhSqByDsqgXRPlp30+xQB1x0YTfLOHgSqxDuCGtETqUCare85JzEavWFc6GT79KOi9MNWnRkvOrFzgIJSxTo5s6TqC5Q2FX081Sk4RxXeZJw/4AsvRVx+rHf6MWxVEHM9+nWwD+u5EqSbY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(7416014)(1800799024)(376014)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Xxfu1B5NhdHXtWM+N/4IjYn3hl3PCtD6phVZekVcctqsMII5YGHhJ5CAmDPQRhPvYq8Xn9AiXF+6ZmzfWUWexI2ZxvVOk/19OZz1kolF+4ikqdOqDLmWQFA6AZ7eppyzSL6GdmBHh7O/VWRgojwd7bhm677AAeg9205k3WmIx9QxvuO+VufoOE//V10o/y37xMx87qiIw9UpGRvd5nZE0cFALxDYf5/as6owG/dIwj8+Wp1LnzootW7m4KAfoQbcrW/mQKRwRQ+Y9bo/YxNMo23FtjtzsrwfSS/5TGRS9d8GuO8+IakN0XG5Sto7adgM2yB+WJeg9u8S/QcKbcaYM1mvpO4epJcu0yoSRs1cSGYeFHtX6ou8jWcDryQOE3+FRtxrmyXePh9rjF9nlYhkjxWZdkEFtPshZUAswvQyl5H9+5KwRnHnIe5UbY+KqmBq0nz8W6bgw3vtWD4RHVIE5uzwAUIq51xbKAn/ME1a0UC2c6bIpTXAyxqhPAhFxCsVtwbUP5yb/ySXF0Gq2QhLkfPRJdDUieoh1Y6vk9o+naPO2CSrBd7TYJpuKVfrNJBLelhCBA8Lun3awXIdEkbo2brsYvzOJRtcgecnAsA4DBQhQ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-44a6-08dcb82ae750 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 04:22:38.9825 (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: G2+MPAOYqzzgffPaUX6yu4lGZLqga3LVfAG+hyYIF5Q+R/YmBKy1Qs3f+2qUrZ0f9xt0lk8fLq2dCYF420YbrJy2DM7SgqByJNaejPsPc/X5h4YCTWXriUBRMqLIsstH X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9639 Current test-component.c is using for_each_endpoint_of_node() for parsing "port", because there was no "port" base loop before. It has been assuming 1 port has 1 endpoint here. But now we can use "port" base loop (= for_each_of_graph_port()). Let's replace for_each function from "endpoint" base to "port" base. Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown --- sound/soc/generic/test-component.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c index e9e5e235a8a6..36008f3a31b1 100644 --- a/sound/soc/generic/test-component.c +++ b/sound/soc/generic/test-component.c @@ -530,7 +530,7 @@ static int test_driver_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->of_node; - struct device_node *ep; + struct device_node *port; const struct test_adata *adata = of_device_get_match_data(&pdev->dev); struct snd_soc_component_driver *cdriv; struct snd_soc_dai_driver *ddriv; @@ -600,7 +600,7 @@ static int test_driver_probe(struct platform_device *pdev) } i = 0; - for_each_endpoint_of_node(node, ep) { + for_each_of_graph_port(node, port) { snprintf(dname[i].name, TEST_NAME_LEN, "%s.%d", node->name, i); ddriv[i].name = dname[i].name; From patchwork Fri Aug 9 04:23:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 818465 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010008.outbound.protection.outlook.com [52.101.229.8]) (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 31C272208E; Fri, 9 Aug 2024 04:23:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.8 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177388; cv=fail; b=CalXP+cu5d/jq601ceBAS3+Jf4DL6ciqqnFuXN0HsRZ74hy30QQbpF8BTxOLxXtXrn0DNprGpBjzvHdHZLN5IrgO9oWEk1s8Ee7o58fMalg7ApjoLl2397JnoLC6wFpOicAgv5MrIYt+rJ3GpFQSc5jTj+vBePnMJIhKTroe+C4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177388; c=relaxed/simple; bh=uyX1nDUiWWRfJH8Ml8E9zHblvmSvMCCDSyUnzvr8ewo=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=gMzQLwffnmf2uPK1XYKvHOOdEWgCSml/SUJr53x/EIxYP21BaodKUlLp/bPsoni+kgQhFcS4ickkSCxnj94PBMiHomKq0df0k5avxGWgMx4RaEeKUhHFBO/I4kCuwtOOcDp1m0+mIyDISLchEDp7kLoVjsXYDkxmJR8X2v3RJ8Q= 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=mdJ0zwYg; arc=fail smtp.client-ip=52.101.229.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="mdJ0zwYg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nsFS5K7b7gk6IqIVNedaAxXByrp4FrSwfV+iYbXXIYzLiMgjs3jk56UJqAqxExbJbL3aSUwnWLTU85HGliap4QikEQQs1qpmiQqGhIhxvGNDf2lN2GH0zrrXNPlE1EmMDARt5iwd5NkMDeiUz4XTtydDA0K+5Sieey6kVoas4adNenuGca3P0Qh37cclG2FlCA7Qbk0VXUZksoNR5fEKRfESqOjr4s7cBSFaj1SiH9X8Woo5DmRSvUI/HStc2N/M57rocBvsfQEq39nFrHzmxx84HubCKJHomjyt6D45yR6wXJxfT901q5/qxujJ9kyB+E0bfnQdq3aDADDa2ASbzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qK5GeS4438G+wuSpWRz4kw3OeJYBGQhsiwzGxzWZ9zY=; b=W6Asy736AAvPAUkwbjrU+6GVFnde3IdSnD2WXWwQxIrzTJfLTLytw1Jm2xyae3R6wh5/gbkJk6cWN5gxyKngk1+4gugai9JsXwsdzz5byYv1y8iT6RS5M2jwlmsAejpmJon7l8QhBnJJP9UpxZ9m+6nQTTvAo0EVRnIggA5Pg5agQ1ym/jIBaytxpmQYLKG4mAwXA/5k0xTcKjPuwjLy8g+aYQ0DbjEK3/0wytldDaNgdY3nNWbYukLx+7DrB3VxmOjZtzZ3HMgw8N7a6JahpnJLT8T4uXejl/A3KcWStH12Vl4Iw79We8LX3S9333oWt/69UdyGGucX7VAjvg9+yw== 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=qK5GeS4438G+wuSpWRz4kw3OeJYBGQhsiwzGxzWZ9zY=; b=mdJ0zwYgla9Lkvc/R+NRYhL/MZzUBDC1apMVWKw2/Oh0saVWTHKlBYwhObX5lWP7t82BzpuhxB1leInANnY39DaU6tNsolh7WRDXXERJvGMDEpmUHXC9BSbKY2b0PNZRRGbbyY8dVJcwzciWnoBDy/E0YJatvmd1qtV4ca+dGJM= 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 TYCPR01MB6400.jpnprd01.prod.outlook.com (2603:1096:400:98::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Fri, 9 Aug 2024 04:23:02 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7849.014; Fri, 9 Aug 2024 04:23:02 +0000 Message-ID: <87y15672ah.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 5/9] ASoC: audio-graph-card: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> References: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 9 Aug 2024 04:23:02 +0000 X-ClientProxiedBy: TY2PR04CA0013.apcprd04.prod.outlook.com (2603:1096:404:f6::25) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB6400:EE_ X-MS-Office365-Filtering-Correlation-Id: 4fac36d2-4c49-4c50-82c1-08dcb82af578 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: KoZKWCcxh1FZvynaTJGS9O750Mmy+Ok1U4D4LGZ41bZvlad/zEzSEZY1/LcrQytgGegU+nBBGRIpOkKzoaYMVDCpsb+MyrDALf9GXKpzPT96SpbsEYvOWsdA+S0G8qnRZv2LWUoQ9n7+37CUvldP8735fkvYShsLQ9hF8wXlK/IcR2U3/W1gD1enzFwCqmqlQyy126En7vKup3uLt5j5c7og3/gfcNtdTBGQVBvKKHX6oKiDjWkRl62n9S4C6XP+ZjBEYASO3zO/nogG/oWTAlW9VjnH9gIfOV7GojWqHMr4bjusBgrILA558UB/6xsPnO5Oq8EdeP4w9YUxT3FZ8WOx+2KS6pMztufeYjfBCcRkVYCw+GwUOK5it9oTEskDWa4dSBofabroD+7SswM3BIJRJL/pOUn7LLVlytphn7OhSjo/AT8htRoqaC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NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l4jhGplhiB6Y0limBwtQHlCL5BDaGfze5uAMB06JIBoPVQIZguRzOptF+lUgBPZm0JexXApuiy8PaOzHp7VT1XJ08xlUmKS8E0T0r2DqksddUDVltSZOXFdekYZItdSCD9/letrPulK8OY3bGMYEUbQRT+2ywJvg36BBd5bUu3HUg7fSizy/d17dQUKJ1DYxi9IuQnGyTE1VdJL+uM/+/x/oHinwyGJFSYbEJ1y/XhGnjCfEPzeDUnFOE4jn2rHltcb8vhc1K9SRi+CyQneBzW8QJ6Pm4SGjkcmwfpIMhfYJWMsGXdkfFAsFN1ts3e2Er6E6ULEKIOfSH+fnI+11h/hiL5OxfJGhKYZfwME7qQgVAPCzgDRnk9ryn3AnqVQ4xEhfPnPoFI77yPZnMXGnkpEkAq0IWFXWDgkTG7035owW4S4kQs0gZ+mhAC7rc61vrIJiO+mf6N49/7VUILheQShSJjSitaZ2lel09YC3gbTyimgP+5EuVa4XkIczrOmkK70j4T/ahh7Kt0qJJd/chu5BdVQEjFv7dyV6sf+ygbb87g25NUFdZNkJJFEB50siVP1Q+8VMGg+YWgl5XqPVShTT3PK7mNctBNFqN7wcIFgFt2121bzlImTrH3vHeCyEwJyEoAzY9Tipy9qb42JlevBn1a3mHcN+i5aRF57Zuxf+GDvewPXhucmanZmFcjwJ67Ik31ANxK595OzrTFwaPHLlFMDRoCp84yMidVUbVr8UFHKVmDrxA09mhx8To3TBA96FTARAfnoS1RDi+qmmCDlpy3hJAzlZc7ZCvyCnTVptapseWqXeuO9w/DMVu0Bs227B1NthLe6c+Z5NQZbLKpp4Aq4WUkx7wUQuQz60u5UMYVBZm4mXCN8pdO6ImO1doiFEtl7p2A7dB1/K2jG9YiBlg/mLCC+Q76aqJpQm/Ij9S/nLNP3DCSQyApxwvQ0CP7uZNHq3xu1MsMNUPhUn9dDd/6+yS7qjj6SKEvJRFiFfM0GVpIGvkzCPJJH9FvbSkt/CR9V/ZFXAa+O/0CAO4ii/PzQrQG6TW6IFGSOABz10ubBl72CusIW9K+lmPBGXp0XUn1+KT1wXfHCp5hcqn6x93c+ToZAB7MzXXiDmDnxPzvX0+qAD2YJ2o/GOYk1+nUYkj+Kqe3PWOeaD2JE2YNvcP1IFKy7ykpv3aSgBUbJiEKYqsmoJdgU7MaVXD41XaK6dbeWQpw8PhOk6C3zTacSKZs+wjQQjhjkpViKtEzz6lHeFNI7YGE8PeRRvnK/st6Rr++7ByN15uTlQRKcV/WD5su/Xq3NbsYg5wnSJojcposnSAeo4jqrapz06Qmo3HNWhRAI25+/AJrGUWAWwLMnz8DYkV1FvcxwSQyRV8u85/TEne781nCUrL7+hPlEtRoDWCmUPwI2Qv9qfjQNrS8NbyZ5i3VAk/5CCu/4CgLYdJ5cnt1JEv9lpNy0lGM+gunLlEDiB6Ai6BN6fh2z1BOW3dOBSyDRtqw8nV8AntVZ+7qUrrqy1h6gNt3brmpAkR9AW3wVzU0bkI6L4lv/T+xmkSHNNLUbEmSJ2q2J4CG6jZTYy8xsbRG10ISnmxGHgyC3tFPds0fCCU+RFr72YArJ+SrRPL2xmI0q/V9R2dK0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fac36d2-4c49-4c50-82c1-08dcb82af578 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 04:23:02.6943 (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: folpO/1Du11IA5cbclsJvRQ0vpNAhua4VnmKsJcoOj28zOecC7E+0X5XABIuW0njSkf0UVRJOe67pugc4UoIGXuIYzhL3a9RLVoBq7W0ATmjujtoNiwVKfWPicq7+0v8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB6400 Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown --- sound/soc/generic/audio-graph-card.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 3425fbbcbd7e..040c271e13c6 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -376,10 +376,7 @@ static int __graph_for_each_link(struct simple_util_priv *priv, cpu_ep = NULL; /* loop for all CPU endpoint */ - while (1) { - cpu_ep = of_get_next_child(cpu_port, cpu_ep); - if (!cpu_ep) - break; + for_each_of_graph_port_endpoint(cpu_port, cpu_ep) { /* get codec */ codec_ep = of_graph_get_remote_endpoint(cpu_ep); From patchwork Fri Aug 9 04:23:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 818464 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011017.outbound.protection.outlook.com [52.101.125.17]) (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 DF7231649CC; Fri, 9 Aug 2024 04:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.17 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177404; cv=fail; b=L9CiHexvFiykI/aD5v12FSl0qPpDS1oOq/bacbP+aNVdrRvH0tbOIiAS7gWgCWMbj+39jkalsDuJbB9Ryuu4ECYKDwqPbgv2mugdP4lVIk8D8ZbacowmTZsKbpmLFRAJIFBoBEHcDcXrDNIn2z6L7jV4/87lwmHhrfa+Xlwkjjs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177404; c=relaxed/simple; bh=CwXhfIInKsODBS+5jf9i/d70mHTXCFNBAILpF1Odyz8=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=Qqjl7AfPuTCLfiL3TGckpN6b94huLSR1qb6iFCIQsQgr3p76rNsYcMg3k1UwtMb5jcAMV0xqxSabS70FhetbHRUx43gnhegBHIvzouHMatJPILimv3EvJNENZmrsSm/V+XraI/JLXR7YFn0JPee+CNw1MQ1KQNyEWmPwYWXMmOY= 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=ZQht448R; arc=fail smtp.client-ip=52.101.125.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="ZQht448R" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ErToRkis1yq0Ulk1F50yFrTMQAKUtESmZmLyXV/0YzEIAyQfhkqnTCnKP8II8a8wTT6fL59XqJjJITmTpY+KG1jDDmLcvaFqWP2lGoJwAYR3mdEJ6kk2zKth2/j+hq72kcxa5iKD+b/52VW57PdQxzfAzPtreTKYsK3C6yFgS4HfGOHT/IKnZJNk1afCkmOzSDMNOseZiutLifAEQ3hihnQFSMW4Mkm2DjdvYEgM8PO/HnbBaK/iQd9nxg5Zuga+94gCaKTlB1+fb1RnPFyfYQ3BTpZpsBodqfm0/4eB9ji9EQVYfa0Puc9kCGlShD7Hb6swbUZNnrbwtWM4fPLsUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OJTI3fVU7PXFX1tjVUU8Ye9r4QnjQGrtjmmqI2Oz+XU=; b=nvRiSeyuE7KMP5NQx5Uil1pMPHsuT/kOpKAwVkug7sZbRRp6ARnrbnvk0KpmcQgu6TmmHaqZ4H28cmh+U5Fq7bLlOIMCx7xrUgP6Xy7trpR6Uf6ZVZ7nl1GTSxGnQo3tedljQQlF2un/KAhUPkwiwDmylVdPVIq6GLNhxHKCRaTpPgJ/A5k+8C5MKlJ/tDux7WKocT12sy+WNbnvKPw6TzybPMuLKBM355hg260ZQqtrFQCiOeL9gW+4KStQ0jfvD3r4Uga8VIRhLeuHyQEg0cY2WwXjbPXRlFrjN8NfeuIVRdl2ESQ7F62WruoJQhETKDKUv6EVnxa8vg0JQWdD2A== 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=OJTI3fVU7PXFX1tjVUU8Ye9r4QnjQGrtjmmqI2Oz+XU=; b=ZQht448RcfE8uFrQ41XWg4nb5X60h1DgUMdTH2jXFqPBjPsTwfS4YwLhz/mCTmfPOXMpvpdH0ubxbI27Rw8ULw5ENlI0j1JQJYThSR6z/BJ5zoWgzim/BaxdhHkVYYltkkFStafd8tKV73wCMmKKpZ45zRaKX444haUQtJy+Z8A= 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 TYCPR01MB6400.jpnprd01.prod.outlook.com (2603:1096:400:98::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Fri, 9 Aug 2024 04:23:18 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7849.014; Fri, 9 Aug 2024 04:23:18 +0000 Message-ID: <87v80a72a1.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 7/9] gpu: drm: omapdrm: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> References: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 9 Aug 2024 04:23:18 +0000 X-ClientProxiedBy: TYCP286CA0061.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::13) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB6400:EE_ X-MS-Office365-Filtering-Correlation-Id: 78cce64f-0d1a-4ba7-e9b2-08dcb82afeea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: iZ1V49iah9omc0dKrPofuDkjuWB8Pm5ZhLTX03qnwFmwST8sxSeBwuJhUB1/akaZ2ZtgZ0iriBRqmdCWGZbc25VKZWQi+miKGbwG4rcMR6cV5JHhbmlKoiq/UAK0RWxUvEFtLOMk5PJv/CH4PHnwrKWHJPp8BvICI4/X9GBzT2CSDESLABi4MTZtXq15SoVbUHKGTcMexlR7NBCq3VYkWfPsZsZDItwwXU6D07/oPimaxUnASHgS8Em10r2xTsuf8nO/eb2w73IX0Ro90w+HTiPyH8PRC7f5g4vSXG1qC2mkwUh/pA5i33JiRFy8cMYKeHRf8Cxp3O801BlB9EfyVyVqA4sIVQTSh45glyFiiHKr2fao+/pQYcgJXXqlEI6aSVduC66coNGR+VkfYlL4a2kAHIxs1ZcxX2J2dqMruucggnA5LyrM1Dw+0zdh/2MffSIRQ2CmupIlgBFQJ0rZbifuZbCXTHxvf24+tN6dNJHBH6eP2cAC12mE3Lvn/mBmz1RgyEQjT2ipi3hgrCtmpQPSk50P3720A/Xh+OpgFetvhxRc/6qI/Z/17kYaHyhHQa1NEFqgkNJrd4RytBzPtJGF0jN0BFUng3IuTaYywKhlBlBVSRDn2xre/+vwsVvdJ6+o0vYHZnqVQh6NvEKA9h4Fy3N93H14HXLfyluc+y+Vg6lovi2QIooiYpQwdvBFlflcLagIvw9hA0MlFXfbwn9IOk3qiOAeLq4t9mR1I0S9nVohEo/mFnkdrkjw8uzU1vEMxUeUcqNsDzCAGtJSYXGInLEBh3BsxwceWBqeyP6ZsK3QlrgPbQFolOqmiwS4BMtbwKyGfstQ2sSxTb/nyc5oSmgDBwovC89mf0j/e0vD7HNeCIehTPdAHyuKr9TeAV+Ir9pUlQ6IKF4+xAgFGpe9Kha2GtXbROeEztES3AvAS+neT7TlQHvHypGah3BCFzp/2TQBMU2XleK377P1Att3K8pfngdqnNY3Kz3x8euXFZ/lGeIwM4kapT7qI720C3PCWgQ5DOCN/+V+Y4PqTLEhFTqjVYearhop0yw2seZY0baNvHqjn9EbUohgseJ8katZFmG7P0XzFMp/k0pmw9AS0bs75OTEJZEFaXoCbiccQHh4E0+Xk2JPrV8jMosOELaQVWcQLnRU7trb1KOrBKNmV/s8Okl7AMRFqJyQwUpoaCkN53rta20N3p4gYak/RpUkKn5EXaIBQNIKGPvK08Odk32DwKx4YGSO84SKc1Er3PtBy89g417uQ3PS9NaK9GEnWWmQsdVPgfzvsDGKCU+0NgfHCRaW1owYM/46JF/Fk8z7/9FqDRZYqHhbDqiFdUFFjNiQV0PbbkxBLTQZY1/h623uTRd78Erv3vk//KlUvi9xyBYxAA8TPJ/3z0hL/eMB+Sw71gmV+IzqhmJg6uqf5rBobpUAQuX+3Acsesk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fnJpPTPUAvoGA9zXKD88pfQpNjN6ZrCgl2mTeBXoTUbFIgm6tbwKezYJeuhZV5lOYTVv/2H30vVBp1lyDaC/bZCmaqvjcxh6Z14sLGYJhcgWkPA1SS/KCQOOYj8/UXKCiN4h+Li0hZZRMZYwkQ8zkqxDAJB49sVNwFbyxeghviXAGzuo/WEqF6aa0sPeIoeSZgOQMUBVlx6wuy2eer9OiSMHoQ1KWcNyL110ZaQHTx31KrsP4E1IBEmw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y1RIrk+AX2mqEIe3iIfqE/5k6DlNEvbpI7vt7k6ImhIDec2mpyGc8KTS0orwlT6HyXhhOs8wOenC65OswzkdIU5PwdszF45Rzb1eTJkGYtVIN9HCjotxH/whr51axwoLqJPQfJDa6SMLUmVBF2FrFRnl+sEDwBPrVm/+j8lDTPZR4wSv5EZMQw7mtFkyhN7OCGKXJ0jBoOPt38KYlSBLMnMEpZ2d593JlEGB0PubIk3O5zUzD/fVhCnb3eQAHl1VRNowGOm/iREDrR62B8lL15tKe+oJUcKoL7/PzR2MyEhN58i28aiFRkTPHAgmFwK/AxXi8c= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78cce64f-0d1a-4ba7-e9b2-08dcb82afeea X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 04:23:18.5635 (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: jUSA/4hJ2Z9MjjR7zxlReDh5lgad/opFMP4s6kmTH0w+V9vsmM8NOmKhWzGXm8LqCkMNeeskKvP2RyvzWiMQnoEDnpTByN67ltm40Ka41ryK2oXYzvs5oNwp5AjvCgpZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB6400 Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++- drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 030f997eccd0..b17e77f700dd 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -709,7 +710,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_port_endpoint(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..f9ae358e8e52 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -346,7 +347,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_port_endpoint(port, NULL); if (!ep) { r = 0; goto err_free; From patchwork Fri Aug 9 04:23:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 818463 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010042.outbound.protection.outlook.com [52.101.228.42]) (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 E34FB1649CC; Fri, 9 Aug 2024 04:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177414; cv=fail; b=qVY3veA1IO8hedWsAD6yNjs0VuFl43GCNMLGV1DFIVEWx5swW1zUi5t5/UIGuj6+XPp9+WcWRp8BXzXav49JVXyof/VDfHl9Bob28dLORjWY7aWimp3kFgeSVBUsGGg53CACczA0KOH3Yf04p08tNixRq89RxNQFo2KIM+Jkx3I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723177414; c=relaxed/simple; bh=F7FWRqwOyXN4mcODiD+bX4p/mC0QH1LIcYbk5AhFGlg=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=dksciubMiAQvcVNDiy7pvlEHRCp+ZQDKWpkrZh41GFxqkZGjVpM2KWJPeTJvJI3jUEeVcJ3bR4Ra3/E1nn9Nz3sLDZHb+2PhwzKSCgv1wVSotC65P55wUniK3himZUpc9nTwFpTZTVdj9ydpUEZR5LT+46HUH2BX0TeDth5Rv14= 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=OcESi0Wx; arc=fail smtp.client-ip=52.101.228.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="OcESi0Wx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=isiONdOzon1+uqxZZUQnpOa5AsRfG99MFjlfFMStHCxNnuyLEMNEd4BsfGoy0r10ZrDgnC3nrmFYUQFkbblAoap3ORzL+XkzAwXK+oUiSAFCWBiyqCha7NMheN35AXcmjdX+d6DqvYsrVt0r/AFanIJOUQMNUbYg3WuB6+0XExpYjc0RdjaNwp4TaRjOjShasRQQcJB72lKwGL/5/SXEd6cVEwwIyIleQlhmlC1mAKBzSVKIFIpeHbn8bFk2WA03bzGWO89RYcc8wNaRSIyD7/sx3LstV663SxjmnOMKP8EJKtCavCWYzExzOsCyK91XPr+rmm+PDHkyP0kKg34kqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DMa4X8LLtupPXMyZE5+0ksQmm2ZitVH6UX9JA+8F9BE=; b=fXTAMLxfr2Cz2oWMQAgZfr0AnyC4wWU/N9yiBOH15qAo4mTwS6NXNHOnrTSW/x/+1XxuAAkBoApZPOJIL418nwLphcA4DVqr2ziC3eCj9h53v0Lxf1mQsXIszOaJ+3Wyq3NW4q0GJK3qcX0gSBAMD+XY/EXQK8xXstyTyZju6pfma8V2zZUXPRL1EzZKzYJXJiY+TJ/+gAuqcvEAUHiJclbR5dF0L8x1nOi90GyGx25qiPgw9Bqj5WH5HwZR7YoEr6vcCSTE5G/5gsLWKgD3YbaMkBrvaIpkHPmal/xx50dJsVZi8zvoxKhP/BKXS4Qalw4OoePSmyPIrLI6MNeRkg== 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=DMa4X8LLtupPXMyZE5+0ksQmm2ZitVH6UX9JA+8F9BE=; b=OcESi0Wx87FFQNOXmkFJWRJPPN5Bh11tI/MuoAENnPJO/SAnA/TD0Rbg/3MUJYWSCy1sH7PFmWUAADBwBbdDXRWwD5qjcng/bHz8TGnukVj1kdr7stcXsXeAc1NOSKvlDRFH6OUKNtX0j5GQOeSX0EgqFzjtDilhnekjZc5E0dY= 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 OS3PR01MB9639.jpnprd01.prod.outlook.com (2603:1096:604:1cf::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Fri, 9 Aug 2024 04:23:30 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7849.014; Fri, 9 Aug 2024 04:23:30 +0000 Message-ID: <87seve729q.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 9/9] media: xilinx-tpg: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> References: <875xsa8gws.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 9 Aug 2024 04:23:30 +0000 X-ClientProxiedBy: TYCP286CA0101.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b4::14) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB9639:EE_ X-MS-Office365-Filtering-Correlation-Id: 635ddbc5-d810-4299-c446-08dcb82b05f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|1800799024|376014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: 3ihpowYTgzKx1LLjr7b0punFRynYA6RbEgEg02adb5TSN7o+exg20g5Q3hJoFU9cxsyhcP5Pn0Dt7vI+DHxRGJky6k9A8k+R60aBNvnlGiYurIUVw2IKLJzD/gUub00Gpv8Wex8MVcss50hXJGhwpndElLGt5M4R2Ek1c9uj8hF8GEwujKfcZ/QWTj7kll/7bL+BYKdguSuXQvTwqjvSuER0E3bKRTpIKif5aT3rV2nZc4cZnKnm6GXi/jVMtPZVwYeg+BJa4G1eEvj0ZalMDy72nI3PzIl5fFo0FQAEj6bya4PyV1rt4K5vIElBKR57CxEeH9AQaf8HItCBDA+Z9dw5bLtCxiiDCr/hQJhj9mtPfviJHx72fsXunAJx3/je2LQwf6rKyHUi4J/EtOUdlJQAP25bVCG55IM/vB3NuTGvlbOYK/zm01zdiXRWK8Hw0Xqn9EcMPQBqL4Nm11W0sPa/S1BSkji0vy0p5Y8wJWduhFHw4kArlzJhTTECWtIr7MWXGFb2gzWenCBmiFDkDBXPL4bHpG5p3TX534wFMuDRPkHZUppZRBqh6DzjW6KPsRAFGVZYR3daiSq+ejNjyXcROxIsKfC8AooYrOrsea3r2NUZiuveXo3Bgw/FtwY5oFtRyEKDRAqjkL/UZCkqB0LNZcpLs/ZbonZWIrspm+3FKwn3DVbqqofUWVUwyKlu6jxVaXOBRfGW3h6ggKL1PBQZYTMc4VGFwuI8HZ5V1/KSEzMyZyPkQA9lD2AVw+GK1DHa+x9u6XQk5FDvL3XSjsVdgo3wyMTtcBSlxARq5eNXNfDaKTOoxt8Q6Cj5OtM/RmueogG+v+L/1DTzRWU06MgDbiZ5UxEyPRbtFt6zz6HTD3VdR3VfN5y3JyRi0FKUBBi4yHasi3hFOhbp67+7Ic3Rv7Kk9oDGq1quDR0mXQGwWOPxV6ouYmUXiuAfAImXOUqOait3RYTiUMmaSJb5ZvXfsXC0vFN2yoMONFC2hUQXR21KUbemfOQAqwkOr6U8HagliVkB0kfNJervIBQWEr/mxFQ1PQ/R2dzoFvHSHedvYEDavb61RNKpHGrn7Ekn8gRoyPgnfGrNc9u2SZYCKDRHXiAMrTqTKJnMpIuJvQNKhg6d13sEOpK08sHovxKrIbB5lkKQiWWCKt/114Jktgal7Ix/cILrN7sXeIaRHtlgM9vvVk4VRQcVMXIx+CULwn7ZE3jKqMFCbV+qPDPEYUng/GNb9Po/sRuX1OzMPh/uvN97J3TdaLhltKS5KtIXXxzFwg/cVnQZ9q6DgwSVPAt5tvRepqMfEEB8DagwczKYu8kbj3rbO63vcUs7yZfCySCWLmfBE8Inh9dNvaT/epk7l9LIsoewq8rbEWebIZtPtiN56+TGv1KbU2WDiSIfjveB/beDI+PWygh6pUyy9UfWu3RUpc9y71YhpqanQZA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(7416014)(1800799024)(376014)(366016)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cQ1HX9PVBr9Egez1yZ0DRdRvmmwyFmn62DyWdSjHnpSI+P/eN+5T9hc8uUHNrtY54rybZd7Le3hkwAcBBCGkPqoU2HC1mdUG/Zrv4j6leWCO22W4Zsk+h49LnyFEyqiZJyENZUEm0lX7lPDkY6qWyPp0nYgkWnDywPvSnPxB8E0BY9gTMT+gVObQWrqJj4in+rUoqq5lC7oWseTnLQ0XZbJ9x9Ewxz1YE8hSE/wNULNPpFgrraCxknTJyCVC2Oxwq2wmS8Tz2FviHBcBwtDvuNBEnRgUG6uB9lsyKpEprTWDKdItBEw3I9SQo8XYnkTJ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Bj7QUamk+LRDWJxxL2abG9wdUWi8z7Qw5fDgQ+Y4ZcIKMHUUwvSGYKBgVlyBmcfGsy11Jh6nELVu62aoTK1q8DNWlO5vA2A+RJ41C9ttgBej7XY7HLTcEj2LhH4wScY6b1Vq6wpqsUASkSDLLntWvjrD7WGfTQQadl5t8r480D5atWP2lALZxALQkDdLD/C6WfQu0apgaEJNbClNpAtNl+ESrxs5UkzpcAJUNyJSH/6Xmz0Q= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 635ddbc5-d810-4299-c446-08dcb82b05f5 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 04:23:30.3644 (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: gscUlf3+vFCqKyzNeQBuvMi3bXKDHwXTJG1hd6vV7LdW7cfFgjYsBI4kNiCippFf35L5rMrgaKDp/fo6gEbtJUCMYP9cUduGoaCiOh0FmkAYWPco6xBXqUqRpbPO3+Jv X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9639 Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Tomi Valkeinen --- drivers/media/platform/xilinx/xilinx-tpg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c index e05e528ffc6f..a25f216b2513 100644 --- a/drivers/media/platform/xilinx/xilinx-tpg.c +++ b/drivers/media/platform/xilinx/xilinx-tpg.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -744,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_port_endpoint(port, NULL); if (endpoint) has_endpoint = true; of_node_put(endpoint);