From patchwork Tue Jan 23 00:03:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526547 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2103.outbound.protection.outlook.com [40.107.113.103]) (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 D874F1FB2; Tue, 23 Jan 2024 00:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.103 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968234; cv=fail; b=GFCfhlAX1pVsS5isg6F0duRbjZlCYbNwS3eFza8XVIdfqj5FZ34oEtPKeSUYNfQxHb0prdrCOWQmKgK+uP9G4DK2j8rIgpw1aKAlDXw+XpTWakTjFwOJUoj4AMEAaOdMWdnwkJLnxMSruWpRlfUJbfKxNOksDdFiQJ8x6EFJ1U8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968234; c=relaxed/simple; bh=yvewR6pc93N3Y0GWnksPNQTrp0S2Ek0rP4C+OOW2ccA=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=D5swNdZ7BIMoIXrEolQV5KxYpUdNOKq/HE53EDRVpbnZy3zospcnUSsUaisQ6kKLcNGO8ne5FhlQRgFN9tcLpaUBRg0qIaQlQ2l8P+wtCVJiR52XiOl8BbaDg2UlrMcxfMj+eSNfDFj8/WVBw+o5rP35ba6gOJ34bnAbmJhyibE= 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=gPOYuFDT; arc=fail smtp.client-ip=40.107.113.103 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="gPOYuFDT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/6oLH82UY47Jjo+8X0iOwBSv+khg4m8tLBK5mNJFoOdBx/EJiX2B72lEFxF4gjcu3dneIT1UnTBqCELbuRso5Ca2LF4kgq4YSESbHSneyLmba/jEkeC48j3TqIVqYXH3eIYDuN+zD4tCaLAptTbB1vohWn5Tlzt2EH5xAOtYM2bJdsXr0bje0u+Wng45lJzD3qWKyK0m0E10zZx06HgS8jg1k8ywTDRcHLbOgDszcORr2u8g4vRE59pu5hV1emPcGET1VywUIlUAaQr5xLBP56PKrONr+hkTYaOPojaMjoZt8gNY3uQ5FQrzD/AqDuTfHCQtWcxg9rUiU6b0dj5nQ== 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=Dq3Kh7/fGwIN5FvnAhyW7hP6ZAzzy5HChuvvWfKeNfkdR5Adq2FFp5BmdNd529uKjGrRH8/sElXrRDEZMnYPmazhCcxH5LPLb//ZNQkl3bFQT+JxI923RIQcKVxAFssXIN2esKQ73wf30x24fhJ5W2ejvwaNpVkl9xkWBnlbotF5ZjS2Klw77AU7mf/LpB6/BNMUUe3TSamLSAmV6BaFD6CMaycQGaZCBaiV2BzosO8ONv3WeDYV84XR5uJD8v6Q2Oqd4DhUuKuwlofWP/tUF8ByJZUMFIm32KKnqmYo6Ifyb0gymTphWm4sUse6rAgJeeekUahl19dVUYSzS6i13w== 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=gPOYuFDTvK4Mhpk5j0Br42P6rNRDlxsOAAmW5Xjzj39V0rO1P+5KEOLd3RyybDC2A9TO/bxi+yi92eM/rBhd5yDzM76AQ9zDeMJIF4kBAANr7UeP+74wz4kTnAEMt9AARKfIVSCHJvQQhFUX8lUOdQhPE4xj7V1yl3oe9p9SGtE= 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 TY1PR01MB10899.jpnprd01.prod.outlook.com (2603:1096:400:320::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.15; Tue, 23 Jan 2024 00:03: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.7228.020; Tue, 23 Jan 2024 00:03:48 +0000 Message-ID: <87il3kud98.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 01/13] of: property: add port base loop User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:03:47 +0000 X-ClientProxiedBy: TYXPR01CA0066.jpnprd01.prod.outlook.com (2603:1096:403:a::36) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TY1PR01MB10899:EE_ X-MS-Office365-Filtering-Correlation-Id: 7442db6b-035c-432f-a802-08dc1ba6c5e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FhPNGpj/q3KyJx9/vyGJeTaZNDWSfXc5NnXZaXdpS2gYJnVHdwJ6Gj8nqSCgaQxWSEWxyfROvVSUyqYTOUZVf2gECMuwF1OiGjvB9PWNsrnHE3e/hYL/spXzzjc6OxLTpaw8sLwADrNFdK4NMRsvvXbrrmKxY5UV2frELlc5tDhORMdrrvGFF5RrHiSsJVdadMHw7YiNKVvtccGl3lXOCDn0X8+o3AeIbqFQ39yD+7WqTO7XItavDh5bdNxuaLiv586CcLC5KlAVfQa/g6z0M6/BO5KZD7IvYu/uJHhkqHTj30QzIQP7kP1H54ZNVguIFkpOzN/8q/WWfnWZ2m3+EwgeHQNhkcJNDYIqRA/94EF8/+fS+Z49DrhZEUD0aCPZ+GbmVfdaUvRtS+RRXeRHsmBR8SD5vAktDNHjnvkVGVUATwUXzUu+cAfSUSmjeKkdMF7xZM0I9GwUFnXIoNHlQf84ypcA4fLJYUGkZfBJ1MILhNp6std/f+I4svf1Z1QNatplJ1d2ep3w1ODx7Oap8WZOxuhfadxQl4+N/Vi5fWDgM6lbPXHWiEl+oHyaAcrYonTKVIpIqsJUF/AvYdyO8njWbOL3CxU4jMtLQNpCLCO+J/W3BZz8efCEZUz/viwEG3S6N3EeNRQRYVIod89xuw== 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)(366004)(346002)(136003)(39860400002)(396003)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(8936002)(52116002)(316002)(66946007)(8676002)(2616005)(6512007)(4326008)(110136005)(478600001)(6486002)(2906002)(6506007)(66476007)(41300700001)(7416002)(5660300002)(38100700002)(921011)(36756003)(66556008)(86362001)(38350700005)(26005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JI8it9GyVIw16Z5K+/c6VvgoFRDMGeQwCIDiIq04J0aIJsQbX3U8kc+8q12g1leXawfAUvIK9I2ShmiTii3+dT5jYfDquaulxuYzED2AcqN4WAhN7JW/LHC0qmNrsqLKWL8PGoCfE/nAJfb2zdvYGS1Z9u/77rBQGmDHgDdfulpxyLVbsNsKiKcYvfTFC0YMW2XVzqFmqFLeAgiEs4TE1IH1vN2PWum4Zcos0VbPCj/n9xR8RtncHlWuz+nYMSKofyMooVXQESPjgmhJMSJap/LGd7w0J3VA6F1fd+z6c8Ttz3dF8yObFDgLHchCdS1xRUr/jdepkbgM6l23nw9yJnEw26ZjL7K3z7DCSqffL7uQ4IJ8FKezwkqUB2cEQOeU/wQHKHivMZNWuFUROefYlopJbY3RzMjWi9Byqm5mqjcm4M0KYLh9n0ZCUWNfzdtyolF81MLs7cszKkyMSdZSv1T2l3laNjoypi/o7QvmnVyngwHtfrO/YhP+s/wrGZDUnbSjHjqEOJ1N/6+aw7lOIbha5QWIphXmkzO415zhLbjXfzPXyD0DJaisVTH1MONIKTdooam1XIYBhPmeQRIhpl5Xt5Q5h4k1E7cycBm7DcSIDF5fxzSCihSRAQaQKGMXZZTgQSreNJF108bOqJdp2a8bpAih9x8SdsrehkSo0fmCCLqROE6czy7wTUjRTnnh/wJ293nYPNC9G7NMp6hgtfZ5AYN+HwwqcEjypFqXbikIXfmKr29ph5/VENdnUQMg7TMlBJurjVVa4m+LSFRYZi5OWitmcdELjz3AmN49o0S9DgzhMdHEWhld9EfYO+M0Mp0dg23g7k3+yIcAOxfxyxslAlzIOpPNQQQ48tino2cJ+vZHQtCHomEkpM/rBDlINxW+x1Rttw/pmKeaAiKA2sFXsuPNyPxdX+pE8n6exQ03Vf3ez8ulxHpcTD4Z/r7bvK3jZtwE9ZCwlyJzM+qURm1ja9hUxtVBhhxYVav8Sg3n7qOrHoSkTCpN2dSqNNYsUEfyKlfLCDx3UdIqwyk/JMEel8BO1u0+DBFH3HXLxbq88ZKJMcBuDqFtifRGFzGC9KrGth22350QdU5OeZdxxpUNLeBAg9g+DeeLnZgeelYB6G4Ak/hYuGgdw+ty5M+ZJmhuZW9PK6NOy5uVsp6zUPRTpWNQV+bubIcdk1INpkCWZVM5vcQOhG//fzrzJ7TnePBSLdcyKDGu/uFpeVAcV4ydrylQyPpNf5Yc0PTeXyeCHw6WaJxrkXSV8mRGDBumr87OrRc/tx0FGF+cMAcmdhxEkXzZ8q1Dw6Yqt15nzfT34d1i8IMGpQDgZs8jTVeq+exFeO0TM0EqrVXypQp/P8A2bXpPeFLHnFr8NJRMff5ZguIIncUncsBVX2gLBgTRlGLEEO+saVoo8ZrC0Kl+F9aP4901OYRGUiG7onnCa6l5XwrTEABrbcagBRb3LDKewG0ViAGnyu8WIOM9/ycIzPUDtwN9b5YgNEwHunEwupYGwZ10LKH5v132e51KD/FgAaTTY0SKVbJDy+G5NceCfsydyM30SXn6+dwsn8j+N/j31f4hfbIOYYbtqb99QRumd3YJQl7ey5Js+wRL4s2RGrk+wuktpTFRYru38wKES6M= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7442db6b-035c-432f-a802-08dc1ba6c5e9 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:03:48.1160 (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: hznNz3yOS/m0rOV1vdeuEpVzJIyJZFBUs6dev1/yIoSO7eo+VHIsVZmMFZVf6pCo0vI+MM5Zodc+SXCRx2vFFYY0Z/RxnMb9yQKix+UA8cGaR/2MNTKuGeN+nzNduydx X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB10899 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 Tue Jan 23 00:03:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526548 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2134.outbound.protection.outlook.com [40.107.113.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 5ADDD23BD; Tue, 23 Jan 2024 00:03:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.134 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968240; cv=fail; b=qqVs696G88Nn3eH/JW0pbFhITWf3Mg5YnbKeM66GUIvq5xRiaH9HJW3WRwGOrmXVFGoOSnT07wYKE2saiifboLCt4pb7SkBSc5Sh54Xn1iHYrMlNPmN7morAUEm9ogCMh/VqhO+syglbteH58i7uU07S/ptlKwuwgqJON7hQV0E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968240; c=relaxed/simple; bh=LNx/Y3XVBWXRP9qbZzJewNGqiMJzZV1/IPJ4MkOJ+mQ=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=r18+6tvNkAv+4dWS1Bxc1Pj5P23joGyEg6Ktnl7gb8P9Nu5R6VB+TRG8+HsxAlzP8bNMPRYSxugpwS9GTjRYY1TUqnVT4JWOTLUCKrJ56I8xRAJg9sbv5LjNlNgruF922AOssvoOaHjSPPqnQB2HXqXKYkeRDe9fWDhy/gih3uk= 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=Gx9+u9Uz; arc=fail smtp.client-ip=40.107.113.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Gx9+u9Uz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F5j02lPiMHFhWBIx7Y1qWfPWQAsQW3Qksmh4Ge7G9zIgRFTC+cHrxqzpVENvvZ9IgK0Ocr/ERyoBuCA3tPPa6t4ROLliqqRVPmyq9FcuTuksUqbvcoZ2/W1CKDYiC0Xel1itNozL8yomyRWylhjiCtS5EmZmBrjAWsG/4joKC3ldlydLhG1ajOt3LkS1O9TmMcQs6FN+VizPV46/q6fENd194smtnsXLyrQ+yeazkChxm66YA5VkN7XBd/po3+pVbl72KtOvQutPOHFPfoq1KpbQ1cDV3HBiO0OH1EZyfnvgG/ePEQPsfMYCRLn1lfYLDh8Spg292tTTap5dJy5jig== 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=Mie1bFNhB0GA4RfHt/teqkmHYuTc8eOeJsdF4f07UbO3NV/Dwi0wATlZlWyELEAOJtxAYn+r0LOGbQbrEEItImyxyWPAlo4JLekjwtLOOKpgSBdIRrHeaeNG+vOqcKcwxtnAyi0ZYoYHxFbWElA79QlU1hZgO4Cz/xlaUUfD//6s7AZaNZCl9yMvSrdIUoPpILH56GBZY7+sftPAUFdYbQS53VMkEDP4fPO63goS/JX6MsPpQdC7MvVPgkaDjsVtsnt/LDyU1E2WIm3nth84VRF/axDnLPN0Q4fWfy3LPoxgoH9rwPHEB1nUKdGbs0/X9caE7eLIPPRlxDpW2n9S9g== 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=Gx9+u9UzPWLjy8+Qyjer9WDNOvdRUTD3lRBGCp8WhNVM/pEaqjyV87Ba9bco/OYg4I2uiAmzSFzqG+552/PpLQMveYON3VCNIeApPqn6hGTCrmAuI5BYgoEQ+vfNlfke275AyH2ZEzW7spHP1/6ai3ugt4rmpcEqSv9FTGDFvhI= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:03:56 +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.7228.020; Tue, 23 Jan 2024 00:03:55 +0000 Message-ID: <87h6j4ud90.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 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 Date: Tue, 23 Jan 2024 00:03:55 +0000 X-ClientProxiedBy: TYAPR04CA0020.apcprd04.prod.outlook.com (2603:1096:404:15::32) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 12786880-fa90-45b8-adc9-08dc1ba6caa5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0RVjouyy7R3LZmyAeAUSaZH5DlobK4G7F6pD5mwe+bIqbK0/fAw6gANWaJHW1pl983ARTHtn8R2WHWCjolnp80NHQDnld2A9u3VS+xL6aSNnKG2myXFPB+ZH47PQAd/F71zlOJ60C8qDl4qMKE6MgIqHdhSgNkewaRFAl3SO7F2lasIVM/4fsSpJDzqex8ilFM8eMzhtT3YqJ8fO56QE9XLqgTqvhyBYV8hq2TfBV0aywtn1EnneoUVD6aIEpdF+8Rsdtjh8WwGMQWT8M+DbIjNCh4XUADbmh696m5kXsJh4MjTe5kfJ3/BqdTF99BhZ80b/APXHEzIxEEw63KMvp5p7T1wir61e5SC6Fuj9b207ru7CnfODkco6vJjNB6VNfuURyuWy3y2rgsTGr+leq1LziH1y67zHuRO1hmklBVmIrh5RCkgPuWJD9EFSurGgaZ3qpDDGqe9YAIoja0z2WAc6ZFHfADPludFCtgwPqARmfUXCXxxJmQ85kIPSByacfv5r4Izp/pcF7dv2niVJpbFtuHMs3Clq7c1C5hcxC58zCPfhcEVTQhkAquZf8BQE7GqmaHL6RwsDd7b8uZLq1XCX5eHcuTff7XyXZqjIeEFbTBjtJDw4gOJyfwZEnFQh 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UmhlPfhRwfzhojmRdFJsIkkugW9zvyMVs6+hhMZOIm6S51H3zXbFJYDaOBGZGtSCj4fUcLnypWaKmIla26642hkAJHyo6h/NpSGRz9VfXbwch9sTlhrOjRAJkDtiJ0BWfat3ByR8+L7GCxfgargIctWGuHOhKMJk414af7UpnRCFADGqAFMv79qo/SZW3m0lk9wNLgC8bEhbh2Rauw6wlBOb22iSikXt7RCkvG7w18d0B42V2Bc83CM5dIr0hNRcf3jBeczx/hAH6+zZJGimG0uYSr6I6/noMhtsZkxyK9+EhOzfPlXOnZ+bg0zSAGx9+hp/BWp0rEpsdntDzEFCgpQoa0BsdGwMknTAYA8bUg6o/pGp4XZu4CTB9H+1c0tCsYpi4Pw2UKwX36NeZLlAUp1PKP3oCEImf5CQwapn6dqKzaWmPeDNVLwubcZPgg6X5itGqH/ucuw6CGqYe4k3h8pF+v4Ln/j/xFpd8DJVohCNSkDVPt0RtPRiyXAwFubn+5ewDhg7ki8u2O4qNa42xALYMgbnuiIH1wo91rofEphBuAGSf6gGB9Fg7/+H0UU4ZJzV9IqrJuMaBISnLJpkA3Psk5oD7gGhy7a4KhGNc6hqTIIwPlYp+PPefMRDu32u21L8pS583llQinKru8Qt/zzGWPKmHpnJiyQAcFtYPdPy60LGVZYEv+XtobdRBFncXkeIH4pHY1df7pXttzBA5Yrbnfm1/3xTWxPEt57+iVEjpmosorVYGO4zAXZFrIULnXwb14wGSB9InE5g78kk7Pgvkxx/QbuWF+TQfoEt9Txkw//f8ORoIXpXTmXGFdRjDvhtIH8SeKtEpKiFG7GW5d8gmPRSe8IXA99kEnchj+LImvtmzg30zsAOdG0VhEps3hMuEBAcPvMV1Z3HsEkbRtmxhhEXABJq+QoC6sfsqJONR2z07rbRIFOvN9aMp5CxZuwW/ONSbyF0T3FuZwY0j9M6kHB3SctL4+jeZVyJYUdzwbHrapSDWxgT8daVDbqSjXF+ixL9+kEkpqm4sLLcBs0yfAHUmqFX0KCtyxN4osfu/RZs+FW/pQiMhTLEVjVJVeseRbk92OPHQdjhtiIdta3JRUM/hjOpgvhYzFy6r4Kpo8rvZ5avcx2H81lMV6tjEKHKyk9g0jorl4xJBKVlX7DLC4LoczR2U/fGGTzZh0B4pP1qp3zdO4jqmf8pFpLuySkHsXjX9jop5euqsD8b+jr8bY2Zs/SsxBTbmDXOARVYtbxUq4+Ov/HAFUdSQsiqDHOQfHb3F4frY7xl9ELUf3d2PQCzJbQtnrq0fSDPb+wMi5KdChwLKA9fnJJBs/noS9x1aSZa0wzUJ+qCGziTAg0hvdze0xfN3p3/Lfnysfx4V0hwcW6s5c+9gWhsCbqaH9B/eWOHgrokucJJFSACygtpxSX3oRUjNwCZht1sxeUZ9qXJFyc9YcimbhIbKJoyhCQURKvmrqxny2O1BWVBQtAY2VqSku19gFWvLkjfs5q11+14o+9GIavzkhbXUPt2vY2GAwkYgZiL5uECFBI6EzeCBtH56yb/8qQJwbrGEXFw9HkkccZbUZK7aqxZFqFS8H2SR5LegReMtdFvDb543JOzMtxBTLFD8T1TTVT7N6A= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12786880-fa90-45b8-adc9-08dc1ba6caa5 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:03:55.9225 (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: LvkAVCS1iaGJaC4U4D7Um3eBmuZMF+M0X/uCKoCz6T0tdb8asYvH9hnxM7dlET0hG1td0t7DgL8bEOl2XGTRP06Yhhb7X80LpaounCcpVKNI5fAeN+lIRaIN60Ywf7p4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 We have of_graph_get_next_port(), use it on of_graph_get_next_endpoint(). Signed-off-by: Kuninori Morimoto --- 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 Tue Jan 23 00:04: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: 13526549 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2094.outbound.protection.outlook.com [40.107.113.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 B66F95243; Tue, 23 Jan 2024 00:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.94 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968247; cv=fail; b=TqptNwBiwSjFKxmqOrrmy1Qjm/OJp8vpgGrtuNft8+F8+k81/4sIFB9EShM9O7z6Ir0KznonAof2abNuo7Z2BjD87UocCb4TvEJllEAPzHLKxg3yVXn6HRqLYDPToC3fLM0A7NgHp8IBpMHIUhK4Ptc+HAIDBpza1DhqWlIqlCI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968247; c=relaxed/simple; bh=OvdRsSVEWjTzHOrFd8LI+hpavpreqh9zTlx2fciKJVo=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=XYddhlXGyAmWxqmjzliZEAT9HyOIDLwCRP+EBO2BpQXhT3LdQP/dZ+r6NrYyGrfOxFFBBgZxj4wmXwqgKJIYOSviIvS03eo92bBu9e+Q40eXrS1l9qp+QJiVIMzU22QKtQvGilDfSB7jhQ0Zw+SKsJAktABE6i8LyIMJ+uNDbL0= 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=dsd0i7my; arc=fail smtp.client-ip=40.107.113.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="dsd0i7my" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QUtsWflZySevDZ2Tr9rVjeI8fd7+qsnqaQx4wMmzgxHq9pSrjpit8tpj9sT/ayBGJWrwzsco5DP8esW77YZTdWX/5E9tA+wJt4794T33g1YqHPXzY2KBZnwxc3rFRgVyZmdVSP8wFPIOGqoCYht73sBXudJbURcAoMRqGLv9THUITR8YEyfsuFyQPZDMpdGu8O9iHOARvaQFyuaGykAWPdzQy4c+ZOCAM2LzfNGf0raxEWbN30yl2oRQwqPSMLx4JnZUi8x7K8V/EZCW4TlJCdy+PuWHc+eDsJbet9eRaQs1dhesiiYoOkkMU4kCGCa0HbznvC3EQ+0Rxgy4RjWV0g== 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=xv4bYvzdFJkNE2eLwLJ239oK10SoDUOyrVQoToNnyNE=; b=CWLwvMfv1D0zdT18EIRY1nEzG2g8QMA9eo0rqJIvOcHuvKTb8bRPXlp3Zv7wNLZ30poDGo8rTZ7oAkygyJU01qUIZMGOGK0Y304j4W+No4Ga2wxHoUBAMG2dwEQ9B9brQylj0gR2I2V8VRb5kwclgoUi9Hx3LTyL6vSaVvuJvi5wzcPINmGjCdnkM40EfKRbhs+YJ7f4SOd4HGy/RQIeQgL64LkPtop8jikUlEoD+Q4oXV0GHsxcMr3L/p6vq2vQRX6tMAusZHs8Ir5yVcp6v+FTNVDQaWsOxBbwk+Bhdi7FaYuP1SR/8g7fC6eGD9Z4eqB8CSDSDsjTzlF2ncgIOg== 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=xv4bYvzdFJkNE2eLwLJ239oK10SoDUOyrVQoToNnyNE=; b=dsd0i7myYhC+st7W/B0CPSBuDCQn3z+0C4g8pp7cP6uERJjlgIQCcLWgDpdwKYNsQEr68wwHVX+eFWYfJSGLa1Aaokl/DkSKZsl8SleujeRatjI7Q1TnfceTnvm30F3lSgVYMQgFr79xeJnSgbMor7LtYcUMl2CViWMC4LLqrIM= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:03 +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.7228.020; Tue, 23 Jan 2024 00:04:03 +0000 Message-ID: <87fryoud8t.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 03/13] of: property: add of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:02 +0000 X-ClientProxiedBy: TYCPR01CA0196.jpnprd01.prod.outlook.com (2603:1096:405:7a::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 95764876-599a-453c-4998-08dc1ba6ceec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a5QxWOxk8OYJQ+DdH2z7dGDX6UE0lTWHe5/qBGhmYlk7WFlOyoisOmpRsULRxVqrygP3LDEOOiIdpwY4K/N8rOaI4XiwRXuA9sNhLrBErYzV0/apNERely2/IU1vdJvyXc/RNnDPsLPNLPGJxTbR0hYwuy4nYEO7oeeD0Ei9WQI4t1cwtOHkDqrWVA3Acg1aDj69i+hOaIT6UDiufnNYKGokwXBl/NpJWFYz2ky/cgD+Setr1cYE2aQCe4buSypO760isSfOdhzpnZ5YZ+eU+wpZi9s6GzMpmNp0Vu2cQAsFXI3RXYP63PT+09erT3aVABsK2i5eI5VtET5MxdUXhK6n1uGXACiQ1xjPHOljb8g7Mnl1sAYzwAq4cYbaV/fEYw1Hf2ThmpjxwdFbN3teBRA39tIN/yYp/RCmZQk8IGePv/awx8zch8IskoJh34X/jkx635UTYg2JoAZzNbG2GWLIqECygKAC3U0mL2piXh9CtDojr0Tu5YVrHjs7IGVRTvOQJSsOpS3Avu3Z/c2LtOQAOUdGQxcPYQa/WbkYGndkr4JDKRKo7e8pYqxdiy+RPjXVnKjgdk/ig1MciI9PZvZ9tn9uQLn8/fh2Y8PbZWcbxOek8uE+1nN6Osm1/7AKYbSztFIZFKTuzmJf2sMD7qlFLWOqPzJor9Zd6skfwE8= 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ofzf1KJDaPi9+PQBpBPKTXm4cy7aZ7yzQqrfpeClJRz65AmWLp4GtXU9qhhD/LVROUnaSvPJbnBXKfGHTvfzTGiT7wqx/Th+npQemQa16pU2lBvrr/EPxcQ6bActLdple+tQHZlpMHQ4o5YsOTUwbi/tJN874tGMFr/YYORVDJ2SGJx6hpAh9O5W0dkqrlLOITRQiU6Lxel7IAYYrGaltRs0E+goFZcQ8QtR5tQdRUD1w0YQTA8NQthdkukYvckTQ2pHtww0oSNjmvA7GcWnDwGN4IUI2jnAqEq51b119roJsBfvDmd3Ssx5l2xubtjTEWy/JwVJOGkYZV9GnLSHvgdJcGVHpkX/p17bVPHabKgnouTcAxsPJzZpGKzu8rQkzv3qxwU1RGJHNNvIeS+5cq1pmwX3Xwiy3UBObV1NkJJWqoJRPy7juF0AvBzj+gmY/Dbf1w94CcNhXAyNwJFlUtc7iWS8VhaPTdOYlTVFYYmzLRfDK64VBkShQz0fNVdek+hbsSoCqABytU69lm/pwUQIUfg3GnIpB6NLzqjcHsyiu9JVb7vmuL7LeCleDfjcRPxQVBr9HE3sVWxcAGbMIZXUPejE26rT070U+E/FFJ8H421YNcKQ8yoCg861kl7vHZbQ4mkUSwahgnZVn9ONknVgKebJbgbNyyVdmHqA3FzxGLcwjVxgkP1Ku7Ur+W9kwiqFQwujcPutGpp3LEc8QTTOg3s0qDmQAxoYS7p/R0+wYgnIrviePEtXrSLoiTHCzEHQlCe2ncDs+56NBUC4VLUJ5ps2DruX04i1ATiTaDXkohrGW1xZm4ejFTHQ9YIO39x5XvHSC1dWDf8BI05edX7AI92KSJKBCyax2/Q7dEp+lxfroJLY8zyvPm08jKLSsiqigkKjwuuaISX39au1PSeMyZtRpbqS/2m4QUXYcwulZIXQn7/MAtv5S3Jijy74jTuTxyepxgOQitXHC6nN4QihbVTP+ZoE9ZgevHJVn15Ktzrf1XBmtIwO1qSU5t1NucZEURBFX8MzwsUH79ItRyb22t8UxaB7Wvh3O81C3+Ofk0qXTk0rH6ShpTdY6hc5T3fJx8Go5SqeLmI6asV/wPparsM4XvHMEB0oednMad1AKiIIVol40Y/gBZHHcB7qdPill6UzBp+h6idErKVfBptdg5G4VWvXmxKTdf1FbkkVcTFZEnXMQNnL5+icK6s98xo1jaPxnJ44VYcEwXsWPx4KejmmddMxu0m0clRwXgiNrlg+DYA2p4oaTgQNs7USROtmzM4q4BxYQr5fPGF2+vzEUxCeizVx2L0hY+zNZkaJpnYAvNHbkOkwPXO23qr83XFvPXmWd9HsyXTqjJzbx0R9DJiLaTusxaNti/eLdXjzd6vlWcEyY0Lv7QkV5wEX5TiFwdnYQj3iqTmNfre/lwe8/G6HZRDtXgxY+wHsB1aAx5rO5T+6iECiHKqCbp8BbzpXBc0JyKsvk30w4GB3U3ttjT9pzLv3z14EoPC0Y6hQbAu1U5Ah7juXk7hZ/YGPUw8tu4e8GdujH5PEtB+c89efFkN3Q42ALvRqQBKJVNA5vjMQ+YcP4TpfitYMETtFb6V2Vbbjf4JGLF4PcP1DO4SuyDBPSEZSG2Rz41ffIa8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95764876-599a-453c-4998-08dc1ba6ceec X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:03.0927 (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: D/gDVMILAYMwsThzuxyK0RTIJN8bF3Lr53cCIFL36B7bLEWbWAqkAHDlzQCU11C2nKWd82CfIYGP5CE1gMl4NFc1z+qA3BJUE6xK4I1XmKmNBLFGvQWgbGMpnyhnlQSG X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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..e2d179cf7d26 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 + * @parent: 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 Tue Jan 23 00:04: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: 13526550 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2126.outbound.protection.outlook.com [40.107.113.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 CDD02EEB9; Tue, 23 Jan 2024 00:04:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.126 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968255; cv=fail; b=ssvlSF1JrjcJkLmZlZuYyWuBbzpbs81BwqnuiL3ahxVrQPlkMvHhJB+lK8BZRPabUlKTOrg09hrAhKgUCY5ALEnR4LhWUwUA087aJluZECR1kImgCqwy4fuCkXv+n3NtEmIAPU9pzCKuY5+QSSGmjwy7jXunErdkD9dEfJJcwwo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968255; c=relaxed/simple; bh=O71FA2E42UYsMrjWzxnrECf7lu1r2wSaetj5Tv9Gp2w=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=AeSByqAvu16+91/zp8LN6lj9nI8lC2A2mqNyBx/laFH3bD1keh1NHvexEuhCNNbKiTQO2WSop2CHkpoOmSQaXEOPxRFRAdMCxtDcvmH0mmbdcwXWJEBLhPMUoEnPPAMSQV3sX1eb1e7YyNesBqrvwOl3oVxaNXzAKL1dmXUzTGo= 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=Jl0C8XW5; arc=fail smtp.client-ip=40.107.113.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Jl0C8XW5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxHPz513iwNMMis0HNXUxTsn/Xmt6QaN7UsAvOaj8AnEvG2qQBwPZG4rUpjhQalGxqKNRFqY7VL3cN4Db5tk4IO/ywjZpQ3k8Lh7o2I8zU3NJwXQfddnWqvsYNv3bvZz1jW9Q3bILLMlosDuiIhko01eQa1Kbx3s+0FDs9xTuQuuT3XxdEqSr9eIuX5c356xzUpGDxF8xjR+CY2zhthLjUtvqxcRBvxuXq4PwFb/dn5ViKSqYELpMvKzq5sHJrz6K6NFLwT63wikYTppV/cOl0GNoToojfQ1ZKBrB82ku6YDzSrkzE7qLVb94PDRaqRIgLxUIn51MJHxkP6QXV8prg== 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=OQ4jVFCrmiUGLHOy0bbM7giME7EVMoy4vtyb8/9XC/d3JrgCefH/ar5c9GLZ9K/IV9gvOO0VnOrDeB1f2nMlzbL5MVXOzwyL5E/S9KdZGV6Pr0DB3pLuHCSUbd1ZEuOX9HXPqp8M6jqD3ibXkw7LmZvINGAyvR4rXqGJIreRcrBmDWB92fXTTVTP3xhtYyeVCoo9cC8191LYeC/6/IwQH/gVuuGGCUiWV7XRN0OZ6yUGb9fs0tYrr3o6Wfrb+pCkQySsUaXxx4zzphhM0IokkUwECOWR73lPhEkwbzARibVUbHqZQGiA+uF9caPvpJtjGeKvI7PKoPIZJsaJsjarfg== 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=Jl0C8XW5pbASYddJArUDwjnDACtRJb7mjONEuSMcKJbxWsnrQa1eFEgjI9yfT/NCjHTXkeBCa0TP8VIeTC6fd5/GiVHpHHSkYx8hNZfrOx5hDjPb76eOCeAulGfXorRxQjHskQRkh3hRlvwG6MSDyrCojc7bYJ21fSj5GjT+45g= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04: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.7228.020; Tue, 23 Jan 2024 00:04:11 +0000 Message-ID: <87ede8ud8l.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 04/13] drm: omapdrm: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:11 +0000 X-ClientProxiedBy: TYCPR01CA0203.jpnprd01.prod.outlook.com (2603:1096:405:7a::12) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: a81c44d6-428e-4b9f-1233-08dc1ba6d3d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ajDALJarV49rnQWAszTYIPZobGHb+sQiB22+4jILiIhT1+TNhWnme54NMlCAl9LZSPijIO4xD1hMpikj/YmTRSWiSDWAqETD0NyA/MYDHSWYXQxNCniO4wQ8/3GYB6rLjhHyOude1oPUz9smy0uJBrVYVn8A+RD4W2ckbu7LPs2t8vcR8x3gd/O5NgGvDI2D9wzxQ5Q3ePIT0jKdM/SFbDRgrO6VeMCjSjTkcL6iYbBWITwTl5OXNE7UZ+LW3XBsKUJGaDtWERHLHtyI716joX7civyovrXSmyp05bZw/1x9DNQcj5MCk8swm2lSEdtVhAgOetiyO+k0j7bvWMMNHlz/At+imAhEjVA7ChkxaOATUqzp9KWzpLUGvjWsLpoGFsxEmXiUQgW7ZnqiR+EIRF+YZopxXZ8z4K7SIEbntpg2Ax0jeTx1PJSWZnEGZL/f0/AZOOnQg4T6Aae6j9CSU9omBPbpWYKweTUYlGvbDnzDO4ABmoCWf+Kd08ipo2uUtqGP9QopYDFmuAQkjGJhcyb26Uz4bX0UD1B/3Efmuh2rrBv9NZN/Z49kABXDvoO9aeML/g/5flyq8610/+NKYNmBtDcaI2uix3gxvyzs41kkCL8+/78Icms238lzAPnTb3xa7gzF/V0BllUDtlvPNg== 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bwm5/djuUooyBkg+a3xyJ0Xob6xFjY+ixAY/qO22XAkhpCtr0WCRv3MTqMMYSkhEdSztVqOXXzogEeK6Qn5e/x3pESceRQ4j4/9aAnwwaLT9lHJR5YBhQAVikdZeC3wQ3VbGSDlqEJfhxQsXE/d+IiYxQqCyQo0qY/knk991r+VyVtbIbyhy5SYOK6xMLa0d8rzfFRXrxe+XDzDOH6RzobB4grAnnMm6bK2Q0y5FxZX0Az43KjnHYrPBKpsXZ4IKK9bA2yTGpVqimJmpY75CzFEOBqlMPEKgjpZiTMmj/ni0qqJTZxTlD1Kv9ZkyjCeQSNDZ5TO8ywC203ViAWXjI68gbgEUqeb0wPOqltbHYEOIVdRvIAm1M45PLW/+nidlz419fANzbnJ0v7LeRrYDjA2+M+w3D0FdbRrUSMFoxkZVyZefLbiFVI+OXl4Z6JjdORQCwMGYAebjcS+a3g/T1N+U4B4MBqOmLZE5A65vm9URGWpt60OOvzUbtKgNHbQ9nQJ7QuLlhBoa5oLIq3oik9RLktkOb3qs5xW9hPl7a/MUp5yj7pMlfx8m4knB226JEGG27M5S1/wAVd8SPA88xYGfUjYHMpMAiQtA8e5WgUr2GauhhDZiVCiv/fo7GUqS+vu+Dl4s9XyzpvIO3PXNGjfeRm7K76bEMpIeZhqv+WhPTnDoQiZGqyN/CnutFl8Md5yza4J2LMor22Ee9E4hZGoi0zPhKDptj7qRKhFwras8t/6R4wQtQlySjaqBb2iB6hc8yw4alf9zPiulMb1wmqMperCqL0JqUmn+p0xFF3+jrydWltGGu7lmtGBJiXG2RFZ1K/PeYxZkMzIEHQnTl/CloA9UQHKTXkYrUpLEUtuGlQ+m8+2aYIg59iKb6O7b4Q36UdZOuWjGUkomyY3bNMppijggalV0aFCIQJ4ugICtQvNXpyX82/U4qpqcYfrwzvYSwNBiTRyzfrqNv2g48cHnm4Xv/6nCLd/Wq+7SJjCEYF2nsBtWyNKiKHtmzEeWDAtIAJwEF0W0Unt7dEW+HWBGEGu6C5f5U9agcLjCdTfOqAVd3v6xHv7y+4xuI6/8nrQXp7v9cTYzHJfqe/bJuBQBU2KMT/c9RDI/q66MyN4nSttW6v5H3BaiAw4sRB0CbUJig3oKozbrl1sRagDoSDZ87xj3H8xlPVvnjIQ1uLwR0z3lOmxF8ZfN7DfSZ9J2xNzEG3lJMf4JhsKdymq3XvRIUFfYUG/og89nQ0ASpB7dCHwsKRTCwJswj5UPcwxfW6tQng5PpSatsE5ONU6BrSJDg7Nk6ZogfKuaG6ouE9i4Km8PIHEr6OT1FEuAoov4B/PRTMiI9qp7qn4apWaAWsiNsXZoEM70WOzsvos8vneM46dQ/bsbVESnAh2ZcXlSTnaxGaVqQNaSpRwjdacM5+IGIa3HzijkXmY/zZz7Zng8HTcOJdp/SnxgTyuUmE2K5SCayJDrpSL+eNJHHS7mG5X41oo0zfUHfXI/+EhTr59Q+ks+zK+pIuEgOrmPXSRVY7u+oFLmBqYfrvvgrRW73aQLVU6NR/SgtgpRKm25DAaYk5rf+k+G/ApsjI/Z1CjeHx9zdRflhXFM/9EBJoCsL+QzH4NZxRiET0tj7uYpPhg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a81c44d6-428e-4b9f-1233-08dc1ba6d3d0 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:11.3047 (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: 2URTnd3p/+9F4SnG5Z/xbzw3eBGME0W0h7mZ/PZOVIUDPBmJTBO7kIttIoGu8ZwtoHIL7Jc7K7OiBjBQF5WHCTzILWoAlrhPfJbMBMSOM6I9l+SW1o1zuAjjp+jnb/55 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:04: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: 13526551 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2109.outbound.protection.outlook.com [40.107.113.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 975E7EEB9; Tue, 23 Jan 2024 00:04:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.109 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968263; cv=fail; b=QLez4mk2QSFQVPqJx5U1aqBHOOn1cLRV54lbYGYT3JD/C4AzQXrfeABK0iULEOU6paWyFRkrN/mav+gujxuKky84TVqPVbNnWzCnMCatHT7SfpUqu3drRfKh6iYOQGvKkVUjmxKmq+ClM4P80FAT3M1xBBTWhOAMAZnJWdScv5o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968263; c=relaxed/simple; bh=ffS14aV1Ln+TfLGSo/g586z4rf34Vf14zbKTRPb7wEg=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=NvCQ4+EyrsBDQuAeW1kpf48+vnQkPXE7V55ZQxpJNmD7W9EfoohwmA+oHPRNliTZN7N9qgiSAi6FNqZl52So7Zb0nZ2F+VtCeweb7zYv9Q5PDANsymQogPUzebMFPKqLL5kNPnZXDsyNeuIr0ra4s2/SZBC7QZq/AE50I/Sisl8= 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=ZAk/VbYW; arc=fail smtp.client-ip=40.107.113.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="ZAk/VbYW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TLv4Y1sL0aNB0LIDDakcNIHTwT3sFK4CyQ0gA9fdqkyATsAxl8ki0GxPOrSbQZL7nFOJOdvsuXOysL2JMdZhC0IsNhvRZQ04TLS579H4+Ca4GhLUET6D43JwCP/2u+BvHXuGQfJey5jP3nALPD8zjUb5iSYrd8HUVytQeBzpNJHm//SIrun9NC7Ny5u+xOZ3opsFQRkRHqTWDebCP0BaoVqY3BwsW11XdNAV4hbAu4ISWVpTDxNpfFL9F9+96uCYqGqQoy9xgYBG7fCScwhPfJbKZx2CYtX9N41XF9Ki1NnkY3VhqpUdna3cLAZb6atk54ZopP3Xu6A6cqFw96l8Wg== 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=USRsXq1IKe7v047MgzWkjciNwH94rAehYC3JR0w8HFzp7MQUwoqBNT2ouHtxqEDsl4DXk5ggP8EtI7AeINFuryzEOj73xMrOtOQsb6YA7gKC0FmZ6R+AyLh4ZdMk6AEpzSSgRmVXqIVWjBzIvBFb5p0s4P9tWyCaZjrAqVpH9ozZJXxjf+bAjuDvEQj6idEWuEtOtyjLQWruvkV2z+zSh7OLcPFIQN5CVfhQVboyQJ/tkQqoccG0mB1L8K0zoZMXQeVHBgyLUK4ZQHQTw5cxRAtNdGbWMVbSJdAVz8NGpegsN/cxH+Lin0G5FD2KSjG7gQEKBUbrCpKM00GNeU81/Q== 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=ZAk/VbYWPdkN4O47A0/XoLMC4P5Bg7N7l3gi0+2OXID8G2pp8drwcvaRMhl6eB//He59RxVcqHVUf2dh1gRPt656bF8yWFXwocAWkNtslVcqe6GoVW2Mdhs6qB1DUh0ikK7qmiDNcjnRMY43YWSuTgK/oGY0uqaGbJbcLlIUX18= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:19 +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.7228.020; Tue, 23 Jan 2024 00:04:19 +0000 Message-ID: <87cytsud8d.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 05/13] media: xilinx-tpg: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:18 +0000 X-ClientProxiedBy: TYWPR01CA0037.jpnprd01.prod.outlook.com (2603:1096:400:17f::6) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: c6454cd0-13dd-41b4-04d3-08dc1ba6d87e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C9eKte8c5bqvP/Be6seKClBHLOY/xdCQhslMdiVAWMWMwCcJYnU0GBOdaCbDiCfy2AKJKiXlPvErZal0HHYqlpJVpNCxPOj9mjcNeLmVXHOSX48Rmi5r6jROUP28TsbOJGxBJnVPw+zhadbsooVVtDeCp9VDUCeTrmkjgbs2kXZgOAv+kOQFSEnXGtU288LI2swCzyglr2h2BVUiC0/LNT8DKzJCx+Rbch0ntKSRiXTXUMyx3FlCvA0yuY/JOJP1kb7WZ4RMo1awBOyzIMoFPP0nH46zOMwv0V+WmnZvUkVBkaz58G2qWSZYDkOCqdF6L4PpeafCiS0j8k4N+KZ7LoJ3SMUP2kgy/bMOjTRAgRkX1LaV2i8K0lEKy0YUq0HSWDVD5mafc0sSYzltO4rfZV1RmZBc3Wi0oVDw1EumJnV0spQRcIOrX20IOxNWEFbxK1ia860H6AlNtgwy4VZwMBOukBnnijhdQLh0dPQZrUtkw3irc9b58fEQrFICLEWIUhkuInESDLDtXUFoflPpnsMLjbhcKvmbRXtCzQBk7i3ctE+7/HozOwivwYbfNeC4UhBSIHxPoZ8D7KlAMCOjuk8IrLgooVlbHVTwwG1bG6SwDSdnwg2R0ZNGS3wz67qB 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(4744005)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2Z1HJCW6/9/4FxCpbeg0l/NJ2qOtGnd14ArlNBz0dHtIWNgcSIIN+x7om5XCLD7RjPVfwu2s30nNCfpBLsNqeFbX4fDc3VecH5y/TORh1ASE3TE6oybRfMe7hKWmv3i9hMBUxxF0Hs9daphH4A68AdrajrUqBjyJxp75rhxuKJ9NQRxhbxPCSTAqan5cl8toQlVnrD32Y4lz5qAjrhJU3chYji5LBytCufHFK8ObP/HIwRZMySUwfz8ma+NEJ+9+w6XBMJ+xfHV95IZM9ey5LQYDdTrDGkyNVy5Hk1ddylpYHe2PtP/ZA5DyVdUbOUmEKAj2Be6a5QN2hAlGvGl5Ibavlr675oEdEDmKh0UiANtHBJ9nNPacBs+6bLwb/ofGL8UpejSNEtPFGUh4cfjsstw3EAQjrIxffZxI6/Ym6PkHaqdYL25MpyjnPiUYatyOaRNHeLbVBEblWwtkhBUbAbZ5Ikd1wI/IwpBfR9oawkfNuVg4NX8Au8+zB8XSIaeTWu2/eWAw9gkB4XN/hHW6c8aAr//liZKCYyvwoVPf9VhE0B0NJ/qPD/gwWTOwNgc8WNYKOJkB7lHuuvi34QC75R7Xb0KZb7HC9rfet+a+A8TsxCpJdLTU3kugJ6jWfAyQhiSzAPd3tcZRimsgJp+MQSY1ojCO8SaWcMpiJb+xm34xHAEBRcNQS89x0tQNVYSR7L4Szz8w9z47sxtu4l1lKnARmsfTu3W2tVO83wzxkko4wX4QhdE7Hva5SCTnTLfCEjUTo6vk1GXqWEZOG49X1K/8bl/D5D1y5/OWLxG6JkoTOr90ryn3mW/KeSR7Xo/SINfhUOx1HfedOoCAHPuYDTWFwGCGDW0rq4fTrofDpwZCQy2spHvnRsyur7u1KQJTq2uPs4R22hbK/O1BxYQcO6pzlxt14RXf1eAp+ciwbyCvGMgYRW0yhYNwqsWKNmdME593ptlu9PAJVeQ1KEqVIQt3mDH4/GQodg4QPqlcfXk26QC/0Z4pDaxjHY/PRHGUrSpvAkJJmQqxDBmy9+3+x3AYbufbWhjQfukaVnjy3tntWU1xzZ81xO9zHjFPby0DqMEPNVt34zl0BM1tuFWvjbFfv1UNFCg+nSyqaM/GkJMj7i7FyzieadEMTuB8rklD4DP+k9iV3uKadCJ3ISW//9gPYcubkMp6hCvjSO+K7myUvLae7ZdT3IPO9cbMXQZvwY5/vJt3XUJm7+d0FGAgZ7DAgRHX2VK/g8C6iB50KU7mnbuPbeshDz2MHRJB2epwKcT0sY1rV7L5n7Ny+0jGskG1PCD2Jb4xJj30R++m2Rr6eQLMe69m0Ak/c9VE32Ics3G8uUL8yP/qSzuPx2i8wiISFl9CUQiFjuOSL7XyRl6lLQqTRBJ090uJGIwCtF2ee5KJo4r5g/Ck2aa6fuPWJYuSJnrHQnV2dYtVEGlfYKEOo5Am4SA+f/y66Z8DLns7aZ+eUxYStp4vyuz7RZ8vYKsS29X3DFekgZIzrE5LWDrferSQcUODhAkyqrzs/YL4Af1gKxE6TgKmYL9pd4s69xE3pZ/eM6SaqaJe99uWqhZJLImhpywIh8le3+Lp1Y3XEjIDvrsalCDSz4bXJgssxqgxtiT4NfE7Jwa36ovIeDk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6454cd0-13dd-41b4-04d3-08dc1ba6d87e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:19.1473 (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: u7HVhQpsfFIyASFNggCqA7uQ+D2pY/gLz0T3DInsUn7qYJZmsPBlcxQ/+5rsKS8YnXZxQnYNvbUwk7MKYL93UFB5hmqGtGlsJRmH7YAKSlinC8S8iCJjEFMfRkvQlXEG X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:04: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: 13526552 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2091.outbound.protection.outlook.com [40.107.113.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 887253C29; Tue, 23 Jan 2024 00:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.91 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968270; cv=fail; b=lVbjLDHeD2x56MgKzQhndu9SRv9JNCFnYH/w7mbAKQ94SrQZQ8h+glyUPPscAU1jEDcRswJfZj+/ftP0kz7oXjgpFlog44WXXo67MnNUq9LV644JpBy/LLsCRQMSP9sKxgERTgTJKY5tjJ9ZVUG6utMER1/qPiEVOpvAB4qZJyU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968270; c=relaxed/simple; bh=+OSaFJVpkTcck8y6XebnUqDqSPv1A7z8UHFNplh5zRk=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=J9yX3CjKmwc23MerpFTn8HuZhcHvMzM9ThJpT2YtJzrFP8TOLbvMBjHzYhKfqjZEy0Ynv2Qmpwt1RH2qD4t8tAU6CQ7usmHMOPAdBQ9woKoWPLXs9iWA4YrLWuB+AVCryxTuueVdnI8nMPEQElOOFtX1ymiXlVbQ6jdLEA5Uwmg= 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=JGx33lu9; arc=fail smtp.client-ip=40.107.113.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="JGx33lu9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=POb01j2+A6Wwu85fTf4yI00JceuPE0zBoTf9XWz53m59oPv3igxXX3pPBRrT80kBVL2ORXdsUplnRRV3X947ZgTp7pVEbInLhYuS3E8P0PrvNdQjRKy6LM7WxK0ZbGWmkLO69saWJ9DQY/7gBzpttXbJW3ezrPMuKbvneuheC1r/f31xaHrbYPq4jOWHxTmWCOvjxSuYkKLbEhNUVAu2bWdNpK7Ly06WoGomL/N0WMjKn6R8yG0ei4J7h75GGueqL6/kxRmwc7d66SWHDX6WQHEX51BQUg5tHQkGVWH9jCnu9j5WSccW9SXHnjTkyRRl+EfAhlUWot8KVjHWP25ETg== 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=AzYjVF8H/nZCNokQ2t+YsK8umkRVgcgXUuDTDUR/o6B25iep1I46wXnmPdFKsjJyHNvg3j+DuDfE9iJnMSLjUUyIMx4gnolrxhp9LKpKPzwJCRRygL2aeXz/YDLFq3lUoVYL69YmJeAzXrK5ngxZglat07nGeJIzGFJnUbJufStPS/DlwO9JIe0wfwHod7OirbVCW0pQmeOAwnTXmNiZLzqhUrknv8aBXz+QNJl4dLOBJO/iOE7G8/atWfClRkJ3uxOmHAmbNS9KHCYkoQ3E6/Cp48UBhVXPIhseqaQjtE7JbSU6HQEg2DJZZerukmaFzNEGYRwtLoBJp2dM6gAf0g== 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=JGx33lu97IP+kEy3xKkUY30QUvzSXwQS81p+fG6I7tmmtRk+V/TnIjdASAIEcNYTo18AfuZrsHr/PXvZdRzrD/lLJGvKXglxcOrq5q8F1L+cIUQyaI1+9WKY8t+cLWf351/q3Al8XtuREw5kbnW1gyFZmDIHUv0SZgfM3NeRcTw= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:26 +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.7228.020; Tue, 23 Jan 2024 00:04:26 +0000 Message-ID: <87bk9cud86.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 06/13] ASoC: audio-graph-card.c: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:26 +0000 X-ClientProxiedBy: TYWPR01CA0006.jpnprd01.prod.outlook.com (2603:1096:400:a9::11) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ac22e73-1a19-4e0a-4e07-08dc1ba6dcdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FHgqO6nbYJvhFSzJdpjnxAfDct1zuk++bN+gp820/4+nxoaEnIT9XQP+jFZ0mqAAlHX3ma6BakShs+hhBIJTwu3j62CH8LceGasNl79tVoutbO+69db0DGOOwH4SqTVGJehX1ZSfaJatRSKY7VXBcxZ15cBVQ40pJP69O9cwZFeRayCzY0UENP6GO8Y7EbSxFei2Wo+8nJdQIdv6Vwvt1HZPnez9AuQ9ZNmWCMf5YqnR3WKegvWWFxHAbO7hICfMqdALPB/HWRj9CNzuIBgF4c2yC4p6dCJK6ItfchFajixI1BSYC7mtOUbr5uz6vnX4AaYOGVMbY1UjIdlfIqKALavuXwcXDOsgWDJnRuVylD3uokbdHcMEARd5X5IswFBwrSerLMf6SJ6ZfyWrD3/H3AX4iJJ468r645oLTR1furXex3G9q+2j5pGEmWwjocLPlAF2J5KT0NxH8l5Q8U70Z9HeQVMyad/jipP3NxhhphKc0spYsCtmsk7LVbI1QRfs7j05sTGsM1sRX3GhvytmD3g5iIpdcAtUilcymzWcC4fjvQBuntYPKAu1InJN5+NYwT46SCR3iMEj4kDIjH/HaEq0ef+xWkHwmUIq5OqNcWnhlAMJdVlYNyiz0wEdiJEThWN0YzWsrjo819eV4RfsQHXdHRqiYNyCpSz3wdkcVz0= 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(2013699003)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(4744005)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V7c8fa7tRl4aA9Y5pp4KVMN0HXK42VKWAc+MHUYryTOZc+RZxIBg5h9v8kG5u/DtovyPFdHPqjN4FzrB5lZfmfQsn3bnj0kKu8oTihHksP1u/CjZXq6m9qAb8sqMTBjFErTbRjhbquqb7mTSpWayh7GD3GdGYkTeqJ9yIfFjXOxS9G0NhRbNu+tMKIY9HvD9dKl9HAsjxQrbBJsIuk+QepRsH6wFnFIIVEnxOzatoU3EyyIYXYpuuN1UAHN4p5FpyRdm9oiHdxGQjl0P2eGF2sOBiYySYVwtylDvJLY9IWPUjI/qWyi7Uss9P4uN3u9Lp4Acv+KrHgOYVj4ybw++7kAZPR6ixAPV63/Uj599sctNUW2QDzZTPFYy99Tv48q98mRi2rx9sKz+euPyl+eoi9NCWOnFqgIPxDO9Oh/lJ99plLOnLV5khY9DeY0T66ESVGCnR0fC3CH9vaeNEPyLg2ozIdowAAexpvXMehXd6tcZfIUoCpOQxsjIQ0x3bj8VRBtOgM0NgkYDlDsIdmM4Jw9B4VOQiJ70urdADGlnF8IaKDs5lb+OZn9BaIIYO/mCZJj8v/EgYoq8pMxf5opfB/3kGykO2vtwTGGtqpMwX9sA6In085MMwT9qduIit4rjLWX27aGM8CoadKaLyXj8qNjveVgMiisSDTSx26QGjopEPppCEl6lrKsbuMAx9Px8yFik0QqZYSFN+TV3P4j61m9fdbgs0DSqCsPOuZWkbMnZqfFM76TCzIexFrBwElcmQgbl6P+sHLRvvhNQF+Gxxz5lpW1pX++Sv2SjJVlOEsVDGZMen5wHW6dzpPfy/9ykI0r5q55ra2pyUO1Ef5MtTiSYk9sQNbSiaffaW29Pq4qUCF2t8gdRol/67ZY5fD324UAc2GXr1Bc4bmMY9DXpnzLSyGuKN+GiV/RVLa8Wq8yOyju7w4VHLSMe7KKaW883AOj+myaicJfhAGfSg7g9W1MkCG9KmDUY85/j3IgBK8GW1hrB1WxI4+bspBS4OLaj4joYRK/iVwugd00A94dBO/yDgrCUBav/p4/IPtI89j6TmhLBzaEnKmP9sFgmjJ7G0i4Rhd39exvlc/NC2h80R0Y5WMFQwMvLIh0+iqRhP6tloi1C+6EsEi3GH3Y1JxWeXA72+v4WbfhzPvRn4blvfMqpHq2/9hOFG4wxK4/zK7skN3uoYI7C/8b7wzfuQ5GDpI0OBzKrAXSzD2tWUOYXYOi3XGrsdpMC28GRGGnskRdbCoVACrqLYfh8OySfl8kYaXn0dXYihm8wUXc7yiMnHBXrR5GZJcEjD23pbJ8uPaNJ8xu57jxZg87iKYghhkBqNtNm0SKZp08zzis3gq7Ke+RsIjgZhpZJ0LJpoFoVIqEp6+Kvt9KwkiwsD17ruPw0eVkv7hzkAjFZ6Y3vQJ2+3htppvz0Z73zWwhMM9MFG+g8T0b2NCMIYeohQxoMbn0Fvq6C3baAUa2EOlhxk34EZGTewIpJiP9Q/S9MaBFTbMr83msGNTtb9TnyZsrJ79lXRGzXSGPGkdzHqCNrfCodfUrwH1SsIZ0c7dDd++iSngXseREklXlx1rU3D5FRfg4CwNgiClZQ43yghCRs24LBI3BHHRmpkLUJcdxEBuVeQ24= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ac22e73-1a19-4e0a-4e07-08dc1ba6dcdf X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:26.4712 (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: TnFhssjkEK8ll6zvLOoet1PmpG4n4/y1vUTPpR7ryAurP3pypvlii87lqRnFO/NCGZW0NkYhClDVDNPooMNRtMMUJfIP/bjfU6xmcvejOpq1ja8Zhmo57OtTMSg6GVKR X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:04:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526553 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2099.outbound.protection.outlook.com [40.107.113.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 12C493C29; Tue, 23 Jan 2024 00:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.99 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968279; cv=fail; b=HUpZzfi7wAn2Z49XmcgsdWO55blq8QNtT74RDYzo0b/XteVAGZKWoc1P9s0rERJLYBA150oGCbckmcPGFQ+7QG/YuQWPs3GRPMTcluG+NODFrA5jDc6FNK2U4UnDtSp69/zYaReO4TnanvCewFm8YbUMcmpjFazhkPOYeu3790k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968279; c=relaxed/simple; bh=tynbqH5KYpLUg6XYTK9TNh3jy6TatTHv8KxXvkIsYI8=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=q9MDsuNMRVzTuqYXnVhXe1XvN340720HBWX5RdJ7wmLH33td7ZDLF7vD3owkcqhy9aLUMJlECQpQfnTmgR1cplc+8NWYeVfPTcWojEaQUkMQoPyWigjLeI/csnHsnPEeg42/x/tamqTwyANxFsUMwYGKRzPB+pbjpvY6O+xG4V8= 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=gw2xyP3J; arc=fail smtp.client-ip=40.107.113.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="gw2xyP3J" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B38zfUJODslL2RkWKfwoFjkgRp+zxjwsFuLEZSg15bdd4EkERlFKE1cMyuGqGMolqE9eN7YXefIcl5SkExu6iSbHfkP+rUM8bM/OyDheCPXpIVLQ1ro91j/QlZv2iK/WFS9oN65KxJEXqv9Ii9vW7+ZzRHiG1wDa3UeXe2AFTWQ6YaoHrFGE87iWbS26i218jQJVlAnKd3EMV9D6onUw+VODTnVSs3lzqdmnNQmMNzW4KbeAwClBDQrmD+DmvdKLj52XWbiTGKsNMHbi7njQAQ/wPjAEhcRTDn9/8c6jO7UajgWM/Bt4spao6aWXDW3PXpUfjzOB/UuazHBwvOw/Iw== 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=KFdrzG2Nu7mSitTmh1tMYbdM8kDV9SrZ5M6qlRectP19OODcsRa3Y6LFXXbMW95XkHYz9T98+/l4nWYJwtfCg8XDbOqaEz+ey/FWFjGJBEhJXhKyg12q0O94Xe9zn+LEOwp1Q5N+nF+KQs8NQLbzcRh7YxHgUKz7iLmpByinSyuGdLsTtajyADdBb5vQX4INy+ZT1QE0fW8fpTmW4qnPWLc15ozC0IMwGtAxm+yb1CPK5wnnGPBS6jDHGHei5oF/I/hE0SpdIhL1NlWEOsSJVmfUeVrZQmO8wm9Dcu5o3SAvDuTpR/9M7b486fi0/FbtPvmEGRe6S8u+DGjCww88jw== 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=gw2xyP3JrwRC+2syp6z1UFm9Gx3wrX/NvZZTHlhx8dO6Dd3hWoRDjsdWclPmBsLSytdPhl9/scYene26nYlrNBVR0sRyjc2blpiU7bBzMchTTBaaCXj1/6P8qs7FBPRxdkMmEomfCdxUXpb9ijZi+swDZU7HfLPz535c+8s2OKY= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:34 +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.7228.020; Tue, 23 Jan 2024 00:04:33 +0000 Message-ID: <87a5owud7z.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 07/13] ASoC: audio-graph-card2: use of_graph_get_next_port() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:32 +0000 X-ClientProxiedBy: TYCP286CA0139.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31b::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 9cbdae83-6548-425f-170e-08dc1ba6e0cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DacMYK2p2ve2d1Cur6hh9YOzriZFwPztcK+SF25Hpwgm8iP+u61GBeD6HxYFxKuzbrT6fY1LtCkxfTdF+OZsjZQnBxGnJJubPUWwjtWgbeXarYVn8cXb1mBsGDJdUFlP88Qdw4IApyoMtQNR/gpu9a+QYTEbFHzflyCGQQg61BWl3NDRXUiPH8pwpoQ1M2kygO91MtA2xUPSPsDGNDlpAIzoEVvKvzZpQtR/9aqYlEV4wX8sfHNAuzzye511WUQZv7SvcwuPKdWn38rQRry3w9LYxeocxL3qXz9CJ3tYb+msL9zCBYGRtl04Gkgzr8oUrd8cKJZYhg315BILG28oh6Ct6xl1t0MFj8nCBZmLJHAbCykyFxYi7S+03tmoxxU62HF5p44YjLDntvXbGKnCwgQWvNbU0USmA5M9afp/A1ZoS3ssF99KOY1NuMMdaz+2KK1hNKZh7bAoiZqeabZ80xuAsa+Hc7H67zwguCCNedp/lBZmuaYucgDJ5pHf8X9VcCITLF0BEPo8E9uj3U9sPNzDSBgzXewH5eTcnvAEtDdTQDIzV2li1/d5z0amT7H09QUGiEwN2SJqo+2CqYbQEMBQEJaJ1PZwP9Smw4oxPW4qgdGlqYNnhb1DIZMNJPY809YVsO0PrhnKMur+YN4hiKbAdkxQmYAKv0+iavRNt4Y= 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(2013699003)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gq6WBlFwn0xS9keYnnexpSMPaF2AIToPxGiF6IGW4x1NwmkAtNWc2Ac2H4ZqLNs1lZvsCwx6t662iTDTPCHcCQk6ucITC7tV8QG3QywXQHLMw/PoFWiBGLZRy4ELjh33T2tdOfk82h2/ZxrnpxdxYtSnJ+9fo2Qr6shvsRzNgspjN2+vzUlNwGIEV6SdrP6PnjsDV4UMvmvmnnmq1S0OEO3HorekuqB/jDlNoWGe36sjJi/OaaRR/8RTxNRJhkh3EAErh6tmpsAbUHfgXkAlT/flpWNUNEPljPN+ssz1Vlmup+wx7/THI3XhuFHHnHUsAGyv20N3XoMf7JyrGMQJ/haEW7pbz9QqAmUqFISG0+7tgOuskchW3oh95CKTQSya8/YRilrTCjOvFMcX3A9Mjg5fzs6BCXIS9Tf3MOMlzBW4PVeyB2WU75ys3AhvXGAWdLKab9Wv2AQ1SMVmfX7Y+/VLtgKUs6iVw/l3+jiODL9vhxrus5S6pGSQl4FMOVkUhW4zUSNB1iyISwv3Y8lU7+ZQ1n6ON+HisSar6EAanyMrTNQaCYLEZDXwhIZPViNKlZYWQnEmpPOlo+kVQwUxteWTvNgOYOnmdHsymeTcCRKPmZZWzIcc5uTVkikEU06T6o9S43U7dcww8ceK9HdlGuyZrgrDqmmteZx9dluPDNczx+8C3zO+BH8usOvhO5xPucgW9tuv3hki4cUcJK5Gh7sj2VqX2/hs9tVPNiJAz0J8GTMXGpAnc5/js89ILZbQYFkBxoj4LdqV4kLBXQ1oFRIB6GrR2uypnmjxBKOlifMRnGfExImWHknUCd9XPy8m3Y17JUHLBydJQbW/Ks0oVghTcfP84U8bR0WAk8Y9JBIyF6fK+uFpIJA6hg1l9OrS2WK5acsNi65gHVKZJZTMUSy8kO2KO/NDBJ4JP23ce+gVwHXpjEFqkf/dCYg/iutk2Ly+MDxB9ODOf5DxrQoCyEuj4S3RjnqHFwPcdurJsvOMusIzVzYHtmYvdToPYy2axwLLysWnxHsT8qzDeirYUwmaXWzqVxydv5IqXqZ/YurSeH+o9QZW6y5puaLWFnZew2A0zGsFSfcdSZ0G5BlOkAIQ2k8I1ii7QwHvgO05TLJqdNTzpRzo/z4YD7eUGvtAJEXdkmgB+PKTJG6cTT1V5gbK+5U+JhVdmVA6xXGjjbTGLTIw+JXBcqcC5ENzPYeLBb900djT+WvFr7kCi1j5YUAl5mHYkwCkmbUzZVIawfmxMeJLOiGBf2xyoz1RYvhXX8K5vtkiHyb/xXswes0Aeb9nlBRgmkMOgirfYbkv5NphUrmRAxPdtDpY8la5/SWJwZdIIHoS9IvClKCQLrlbhTWlxucZpvUPJefXZWtSgpCicOkmvnkSHRvEogfnbYKxgIebf10csYzynIU3xpcACgeajpqFFBhxvOI94KYqlJHHf9MmkT12qvbz89mBHQPvwqAcEDAt+DJO9JyRDHw7eBIRV31ZmB7Ue2Q4MM7QUeAqv3oNS728sVvQm7qbo4qKPxtBXFyFHpySAeDIB5MdPshMEgaU9zNtLCzIMcWXsqLF45TyOHHBIQF0kqzesO0gKuypb3oONXvb2zH1kJTfz33CF4V3WiwxXXk8t6lKWks= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9cbdae83-6548-425f-170e-08dc1ba6e0cf X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:33.0721 (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: loQp43bkzH8f5gEWNOQNKW5ymUm9fP7L99ziqH8co3/36Tkfn5KjEBQpHmJeufknqP2AJLsIgkWR6fnxsl+2HcK8+byTIEbQdPXI+Xnpm5CujLyOz/+9LR7GdAybEjmx X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:04:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526554 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2119.outbound.protection.outlook.com [40.107.113.119]) (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 F33CB145322; Tue, 23 Jan 2024 00:04:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.119 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968283; cv=fail; b=CaXYmUha3ItStQazvLUJWf+UnXBiDfenNpo8bX2fJr+uY6HiabPPWADbryRY0Poj68qN2ticsBFvaSCRGqEvxHFM5BCKCSQR+rvzizSP5BhT21MECVnj6cFGYBhegvDGz9KCr5IULk/gO9qgLhmESKBaKqykpfJN7ohE/8R0ICE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968283; c=relaxed/simple; bh=V3wysxgtpraf1FD3rzXyb67aBJ+ub2E5Q1LB48ROvSg=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=O74AUe7dlYM+AqIX8fLxUrleujDgFV82KPnNqrF8IMRJYccL4fJ24sYB77H8GZFQUddN7CjG6jwqocRslba325vKLlhYK/5UhUiVVB3Z5eFOOI+MwjkV+jwvrQ1aS5f09G6LAFGLbPAT8iknklSQRYOLG5p34eHMKd3DM7rtm6w= 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=Mg8JHf+0; arc=fail smtp.client-ip=40.107.113.119 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="Mg8JHf+0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BuFVBxh+m+hI0hkiMY3rp9NSnbrqSsgae61T/rWvwSxCttSyQdRs9Oa9hSMom1nuFnbn+0LxvZ0q72UG1JHzhea9LfpULmxXd23i1mqVkD+C/kDQm34xzX0sAjPdlRM3BZnvQKQqBTvFqWY42MfwDfWKBfqKJjvL3xDWDIs99Jl/HeGduHoi2yoKFP9lsYmx3eYarTspiDA9VH847/tegWCRqsvQgOcDvbuQNAch3RIL7RYIEOhzXsr0hBEV+Uis6DdG41I6MJEOeCF7jr0xVNJFTgi0hSS5Z5cZUm1PnHaWhiRcjrmjU3VbPUuYVxf6SS/7eALybdcz+Gz60GynCg== 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=Pb1iBXTLrnJcdEu5dznWSKhPuNd2JuAPYL/kAD0iTwTIdAd+4wZANbN4HOlPrmwsmklOX/auXK5LByANjuAoowtXJNEtXWAz/eDtWyBHzer1bJtan6JS54gtjccwtPHO3xpVCwYThjP914d3Tf8jvq+D73NrTxf0tdihLHhOlvs6ouAiftwVN70sG9wy1YI6+w2Hxm63uCwSrnQe6IkY6eKmzkHYEibKun5ZAehsSaLSE1atPMM/9CPNN0MKLb8dO+4LYqLbiz6HJOb+SbFZ2DhEw/1oqxxPY5ecEKEKMNvaEfbhEvz3DU0gydWDpQm4jymvZAC3JkLP2uI52Abuuw== 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=Mg8JHf+0l4ct0nJZVaAcd0wdtCzoGhp8Pln6DzAu8ga3u+D21G6X+YnYmAPb0k/DTqc4MjWyFkj7fyLgI66HVs+CgKm2/vuf/a5tjYyCimvnp98Qb6McpjIGtAvw7KYHcyAk8/hVK2l+FPPF7PQDKYEj160xu0K4g6Jl+k37Kzs= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:39 +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.7228.020; Tue, 23 Jan 2024 00:04:39 +0000 Message-ID: <878r4gud7t.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 08/13] ASoC: audio-graph-card2.c: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:39 +0000 X-ClientProxiedBy: TYCPR01CA0093.jpnprd01.prod.outlook.com (2603:1096:405:3::33) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 4da20250-ba7d-4dfb-f391-08dc1ba6e497 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wXDoSEUVkYB7r6lwadXGtAUcUZ7oVjtIUk0EJWRG9sDyGgaq5S+KLMDuJrQxU3VMI5IcpJqQ+DyAVb5Vjo0AFS5XfCqfh5KCekFrUuG72a51WWu4GSb7vzfDyFGLKcCkMN81n/pNlMjInxV/XafpbbDM7s2JV6VtAndKKohWjWxq7DJlGmc+D3CMMTDRXVJ/lLipq633WtgxGkfTRn9OJ4e3VlAK5myaaMkXc0PybjRH/AhFM+3+W90zn+YbI1kieo1ldZDIHNwY+ICK7moOwyTazQX4FCiYZR+4eNHsLWboldK7dQwP4khzW6H+iCXWHu4EVOWBXh9Zr4X1Ae7T4lrtaNQpeRHAW8XuCVPa2BmB7A6WoqmJZMIxGLprPadq2RxG6brNQ2uMgBZdakMN4EC2bdehfPyYM19cHcq7isO/d1AR55SmQ7HprLu+wyaPae9jAz8i1V2C6AtrBcU8qjz7MHYroi9eRM88rQ6Gurgsj14DAQHVwGkZaTbklQDm6t7c1kwEKzIDnQMAfB7AuwGFiR93i/6w0qRUfJc/mlxzr9VifwTktmk5wlTa6HBV0MeEWoCbRYEL0u1nveKtB/Mm+KJTLbFirJNqiS81rkNowZaXRzB0mzKOHQUd0ufhhuARB90sUYprHE8kbOqaVBdsADeBi8zzF3fnYv5Gu3w= 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(2013699003)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(4744005)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FCPemcSm1y0rB1vOu3T+yiLJQTlmp8DBWccPSpuzZ5MdgYMkf/h66W5iYlEDiFppc6+WWoMxZAcqhScnPkasd9l2MZGvYph8ka3E1E2Mj1PWsyrrLsK4bWp82v0/9qQl+RNSC0oT1llntIie046/LYW2pplfSmjDJjf1Pz6gWAApTx+nbsmv7/aSWMGlqklQPceoUKPNlT47BUMVuwv4fyNduxeUsymj1ye4q5DYbG4YUlaL0I6RxUjFgzjrKjzHvDuYBxgDSNDDLDjkj977SpwMXD7RkHSBwUX3o3kGaCs4gWMP/Fa9RVZs72qs364NAt1U37kDZglN7eGraXZgQxqwe7+RahANkq4wadZPEP3zHFctgHRh6pLTGxmmqJoTvkfTofGDQ/ydE9yT0ua+YXDCcujYDVTLiyrS+weEnra7UD/HhaoFPm9hNB4M1TR4K4ma5iVNKXSY+ATvw20cSwTe6bEL1+IAGjvzmU42UXp3pO1xCdDILomVVL3wtN6ZiEcDw5sKfkmCWKVPaAKVyl9w6AxHjcrb+KAmd7biwWBOOhpTZEWpumXJdktmjNxQHDeDWtbGvqhhO8ujD+lE+/ELniOH4/Xmfe2v0xSe5U22TTMqpxK9B8ywoFw2NX29yxgelBua0Ay15BFucEM0clNURunhIDCd/6u4nnIaFzEd5nwcLm8CbS9Q9eDmpTaoxhP7zLAPWXNU2LMqzsd+n6zLc+YHRuvKRTlU++Xaeh9TNbdaq5vqE+CQHYB1wI5UQpkhsFBHQO75Ce5/GKrTbDWZJ/T7NiO7nUgdZQ/CpYZ3Hq8WEY2B6M/CE/Xqpo+4PCgad55hkNyHVerMo5uNdyKt6/VRExhiSEijEGUliEkTGuNyi7WJ9UnuW/5y/kqy8YR9lA2Ax9FoHjGENL244vhU7rZ6qTajpzO4Nks5czWVXs16NEwaRkBVoTwNn4Dd59NQOclXnPztrRMXwIZ5Ow9R9F5RNnTCFOFdH89yYqwQvmOaySZdeo4JTA15mzyd+TH6oNEXs5E3kfJMwLbiQOeKoM7rbt0SUKiKcbZutjVOD5tw9bm5KtwDyF2abqz/PsS5kcMTwNR+NZIAQIULJ+JFBXgvc2sMjBBkPfOAaoAEfbLbys1+LHyqFYchg14PsbB9i0U5EKO3CK+37/cwnnTqHcxTgy/pykTqdxipFlStFKUIwK7Cr0VlqaPMdwF+qX070enaxpIiwXqs9yvBRk3gzf5ECZSBlecfaBTqD2MKoHSexXjk5ay35IxmFyg9Ueccd0mu2WGu6euy9ackVSTvgJvkAp+tS74CqOvZ6OUtxRnavTKQppmdd6+OqQE205hwUc3qy48ftNRAUqOtRVSNMT1nlVAmMwCxI5qpjVINqaFYi6tUW+OcDqGs6vm2atDie+Zwp8CPw++dHy7m0dIHWv1oeqAN5LaN2g7Ni7Oc/DxWMUVg8ZwGe61oWq2qj8DZNSjjpCAC1Zyz4y3ho0izRRAvkEpa5qjQAOR1k5zfwk6WwJw5pchsU/m9/1PCW6rL8DRbUzWPdVq/FCkSjDmTDxYNJcYB2YrKSEFyYzbvlu3tgEk5rVhan3QMmXxhrjtctPJP8R43XkLjWUdIjq/Yy3AE/uZmTR1v7iPHmIc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4da20250-ba7d-4dfb-f391-08dc1ba6e497 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:39.4470 (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: IHSYa/nDpFnUxJ5ZeddWHxucmsVUqgzluZHumJMtz33N4r2Gm8TZSIKihn63VFFDnAOizBLGW+FxJjKlEJqoyKqjHbBlTcjTm43XJaGaf4gb+RgsF7YdXKFMy61k+a/q X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526555 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2101.outbound.protection.outlook.com [40.107.113.101]) (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 8EFCF107B6; Tue, 23 Jan 2024 00:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.101 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968291; cv=fail; b=nh8ZnZKM1xp4c9OJSVEoe7fLyrkRNNCAB2IYAsOX005gMPd67xvPsIVoK5z4rYkw/RhaqLca05kc+Lu8fNHynM/09EibU8l6bg2jn4kxGs3cQ03X2xATrty6KgLpGrE94JpTZkLcJAFOFrxn+JPlwj/oJAd/5Pc9zA3c3TMBYmM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968291; c=relaxed/simple; bh=2BjPQdIp6UHDlcmv00uBrxqQJzZ4qHWJAJniszuCto4=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=RIyT/8xbdwA5M3gN/F5PQYoEI0c372ccGBOtIaUaL2dZRP/8TjSOBLQLf4ieOfX+FVftRG1sIztFqKSO9n593JB5rt/5xOMsJWCGSdrAHOnZvZudse+N3pi41LxsFFKE9esOQRQzNa11S1z0CwnsSy+72ITxboB9RWIGGYjuVxs= 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=USOmf6H5; arc=fail smtp.client-ip=40.107.113.101 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="USOmf6H5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SsI0Y7u2luRmLzhso2sXHlvIFwzNwnAwwOXPZH4vERvdqdYaHtt0HBh8h0N66D7ORd5LKQ+6qzbAJu7V4VYPJUqPW/jHM6GvJjj7u84zeAi/pz8L10zMZHeKOMxCUoP1aLKYZ/IUZZ2yBeeJ5KPFtzlU26IpB9SHiCHVG/HSB7AiPWYn+KmusEPq82HVhC6JvVXL2qfwVGbtFtjYMxpyDWrOavprmDXZD9Gck++FFGzlQp6cT/J0XXu+9cByMueNCreP/02egfAoDGnJCl3pmsaka5x1+N+pft16AqHACy53TH8sHMeXwi6EMZ4W15F+j4l9ekcibk/+rbTmrTdyhw== 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=DcnSPgUK6xkl/EhElMZQiD6s7MnnIXnv9HwS0HB6mfg5zXtygLm8CySPXPqejqLvY9mRCllvWoP+5nEQHyZaBAl3pnFQ827EqB+mBS8/4Mh9KCfwY10jrozNYo0mpq1HvaDOiGscCm75FSZLbyOHuROwgcdelGcU8cWlknS2Rit7rT9dE11pvjP6/Rv4zz3cBMXPe5VKx9IhpReBlFkKJPErhIBGv0gCUOq3SezvQoylx5lpFPjp5tzSRzj3+fjZLQyQs3ZYJ7mtEgKudfLBqXfebqnEptlEWkCRiEQ9oGbtmcaqUflkXsGjxqqymLvxeyeGOoEOi31P5gmLpiWYvQ== 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=USOmf6H57fDi+OBGFgFVpDHnNJQHMA1/Lrj9hyi+FDNJALNr5ExfpJbtCvXC4v5SgQk0xR8hNP9r3LfkvgwwmbxDvrjstmhK9ASsPeP45qx4dzBqYo8wWXpfjG1gfGL5QdbCjcGk3E6MEZKIMUqZ1yeaVOd7rZI4KX2kmE4RVNk= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:47 +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.7228.020; Tue, 23 Jan 2024 00:04:47 +0000 Message-ID: <877ck0ud7l.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 09/13] ASoC: test-component: use for_each_port_of_node() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:47 +0000 X-ClientProxiedBy: TYCPR01CA0186.jpnprd01.prod.outlook.com (2603:1096:400:2b0::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: e65f044c-2a12-4972-03ee-08dc1ba6e949 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R1fOf3BWvdJAE8t/MHUJqEfiRZmysqEyF8RMSVo1WQmdz2x+XCQ17N6vtL9DWjJqklRNWAy2VxGkB8rftiQgJFmH3N7oGL9fruaPN8k+lB4aRFUZxdefhX2+FSV8Vz1WAdJ6kXjnvMJAqZ9ksSAJaWV0juKPhXwJqYn40dM+McL/CPGRf/J68AsrrUm7c1zNqWyHXpLpASC+Z1JhC+MZXBuMVmhwitHh3yfwUzWeKKaOy3cwWEzVr0ZFchIMWrMPT/qpzKGV3CpnXKOePwihhA10uUDbaiLfDVzkWcba8UXa6i+A8wD/WvuSU9gsaW4kn37SQyiVEff5bzOAUyF4zDGL2mTbf12Zb47Qd/wtN62C7A+PZVfIghFilKkJ9DGeGQrL/gwm/IaARmhFPwbHj3J4Ut/BTyV1Dxlqkz2Iedf3HYq6nifnu6GgPmxIBoYTZdwb8kN/GXOsIXlx7LI9yG9jx3fcepe6PgxK/bHSB4PGZjJge3+dfzdknL5VjAgEZRVOpl6xEOyiZVTeVMc6NzrPZw2pPuPbhncDi00a2QLrnopCFBxIkUEAsxF2vFSdsTSl07h7a0zp0PjgqHEpqYkYqaLmcEYMTihOZfaGYEJlvHWHKI3qLXf5l4rMyQ1Se5kC8GJBHKiz3zZkeFe9ow== 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(4744005)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MdlMUkrgcYeOCCeb0jLDDu1CaXTyNSu5yEoxsF7SQzSkKCWV/JIrCUvCVrtepoSqK8w4080bVLSDzuQgAY39E5z9cNi6JdhmWNiutc0Ea2IloMbkuqZ/9Z6OV2xqufvDDliw/6/TKYrtQ4B27yQmU1VEuFfS3LeSMR8D8lycjLiLbHIIHQ7ViUOVPwBariZEfx8t6jaHXHuUYzKzmt/F1+FwtApsqfnFCwOJmns+h/TJHbhKW9/jnI1UB4GIeKpAh8eE+uvxVqanYqxwRIXJj6g5cybtBFMhyWFLhkqtHVTjpCuA5mjWig0iLtLNPK0e4bA6xulrDNqvUblwesq7bTV6z6Cwrr8rrXTN49ZQQAYGk7nBi0dTQmjDeSE9yzf8ZRaahs0YuTIQjrOtUfCk/rpyf2725AVeejQkO+VbTMpqiLH1EXsfmGIZGGahAduo6VE6lANW/T7ofLfIfseAdYlPzUz8YFU/WV/pGrfg10zHD/82PrzOQIKLTHk/laPRN4Fty8ToqtZmGeK1WifPfZc0XZCxuzdrRMzVWodHIa2X/5iu/G3zACthlMjvSF9OK8JjJRE6o1q6f5Fzt7fsmDLnxCCWK7So/i9GmTeRhzZi3JnjPn6RFw7tnSTs0duzJykSlfPTPdthpAszKdrPRUxH6gLm9P0WkPQgTcUDHK4gzjnBk7hcVWa4otBxj0x1EFVjhnALT8JKTpGZ1TzncklRXiT9Sz1vMBkcIuKo6dffDz1j5Q2hths2PJBYu0f5O/5nQFbAODQqLjZVf3OKa4hvCwP9qmdcgQ3Psyst3IMp3E40Bf4h6EFoYDGQH8dGBMYznyleNlHXSCDT/mAI1qpfAIk9bWKfV0Lel8u2yCNStSYLzBmVn4gZik9no05N6wZnOVtE1t43wQMDf/HYxmuyUPlm6mnpUYh0cLdVSPf1AQ6YtScJA/LYmYI3lN69yj9bkAhMzfK08HkGQ2dF7vgjTG6K+EZgo+MFg9l6DrRIPiz19EM+RfaahNp0/Gu6MHrLWhiho3tFuQK/hFm3hdTAfEXipt8QyM/+ga6V/wQy0b0dttZv9pzbHBHUhP8JLwyxhH5/C2mcteIXE/uTkn4q9z0Vr9e8CktmxgsEL/DvhN+d4H5m8zuyMUiqFYTBGYcTORuZAPO1BELJqnDh2MJop5yYW5xeBX97//x/zIQQvaXFr1DtmMi6EifxZcybNVzdbWL9FgVExTGfXD5M+Xqnt4pz+apHH2h6LGE2/NIAlrfXD/TsSKknnp2MgD3Ww3GAqKNK5IFSdu9NJahIySWMgTHvI01gLsdut5zgvmERxqpb1zle8wM3VEXdFhw/szdrS1EFKDRFFuAkC0aFnaQ7lDm4Tf3wZent342M37kQtPzJF0e8YyLG8iB+mlH08m76xdSkmEm4Pm8eyR9FNLOhapNty1z/TgD25K30ZdRxxLWfNrK7lSGIq6qmYX/ql4b+ZqmO/z+G7bVvlQp2FtI+xAYzz/bjEN4ZYDs9QfwC4AU/Ua+7bJI7GP2WKi0TehwzvlLevW4YfJSRYc8IwSZGICLnSLVIb7RFn3Yiu6Q92KruodRzNFQAD2va4trePxc5Z2PQQBixZqRi3Au9mRR2ibMmo0iIv+WGNWtrjmg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e65f044c-2a12-4972-03ee-08dc1ba6e949 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:47.3321 (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: KPGm9+44sC0qbS+yKfq1WpCFG1A7S1e4c9sA91hggADbUKSfGzL1p5MVGg9ID6Sswtr7ActM9Z+kwH8jXOiF7foWiBywgPPZIjRrPuBgqEMNoYvRxUJG0a2Sh5qROw/M X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526556 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2112.outbound.protection.outlook.com [40.107.113.112]) (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 8D1B1443E; Tue, 23 Jan 2024 00:04:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968298; cv=fail; b=DpktLyAG2IaCXhB5duCnYY5GlVz0+zzoDzD21SK1m35UEfW5gaMBr1kDXKdWzjS9OB/wRMNa8PeyhaDF+dKQsfGGgLNQFPx/5mUsQh8haunlwLf+E6posEtHDk6hHAnpQdhLM5NwcFl8DFBniEzW/b0GIPmspYTxmKPcxo5DxCs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968298; c=relaxed/simple; bh=LetAszaW4dFo7pIO2qLTEWoszjj1mQlZBYH1VKPluAI=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=GZ9E5tq80IsD7WdbQ8zcZ5doL237HOX9hVukCtzQXJLdWpw3tN+5yCy8j1VJQ1afVHK/2f/8PD/FNGitBI2wLfCD3nlfBjBV7PedjDY2uXLZJxBp2w6TEfUPORbI60sGVrqo6P7vEsD28cwluRdQEIUbOG7G+B+byJE6SRYvsCQ= 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=YNeZJhlt; arc=fail smtp.client-ip=40.107.113.112 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="YNeZJhlt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nuXMS0LsMshvenziwMPRxHf8FSVgUaxNh7Zzqj16W+hBhW2IYKlPgg449FkmVZdm28KFlhi1KmM3HPUww8OJcQPJExGh00hCnjACeQSuAhuPZGrtHqRq6c0A/4hy9ymxpYAoRgd1SPevRYiqC7xmWnj/0slYKifigcazlDh6MhYTcyvr4wRfv62sL+rwvFD5LJD6JG0z99T+y0OEZ0C8J6PHp0cfOqSyyzjzoGPaoZwG9jD92v/MGjz+iuSg2MDgyFbUCXqlZAC4+2vwQkxeMA9un/XUD3VRN3sJRCutIrHaKOwSPwAUV+Xg4zHPxyQmx+FTKbI+YdRJjElIF0wSvQ== 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=QrcrG5fQ/GpQxHQ9v9uNh2r9dLYwOYAXXMit7DEFJeDLDoOFmyI2lCShZhLmbOHWYuaw5liy4HORlpNToLW+CzxQzygJxrbuMt6DYeFJccSSRdmgQ7cnUZWSjFlDir5py6A8fUk6XcMkx4xWFpM5lrnZ6Wdvdqvu/eBSH+Xl+HafjO4hS2rn46qqJ+jYKK71eVJm1qlsKXlyQxOp0aXYIWhxE6F1kFKOC6ObCg1NRn8JgL3swMNw8+F9xzeQUaQaW4AqYdp6V9nFhzk/h/RgX/HyzBJn/zvqXNqzCbhtuV+22Mf3qT0WmHeuvWq4iIRjdHe9+MNySToj1ZKJy732ww== 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=YNeZJhlt41b+1EHqVjq+phxTvw75NKCebdYjt/IoFslXLwhWAdQ3PKoz4kKrYfmmiOoKH9JaiLsmx0ttL8eC8pn6Jy5p9cPK46brbOE51iPvey4cUWDTeWJ8tHkh8tqt/p8NQn1CE9CefZFjpwUHYpHUn0iIZ6GqWgFs2XRH/xE= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:04:54 +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.7228.020; Tue, 23 Jan 2024 00:04:54 +0000 Message-ID: <875xzkud7e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 10/13] fbdev: omapfb: use of_graph_get_remote_port() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:04:53 +0000 X-ClientProxiedBy: TY2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:404:a6::19) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 76fef25b-a527-485c-b2df-08dc1ba6ed5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qMw4tYi3rjrqdbkwqIWgGBEofXOs6gpL3PUSD52felfGyKCoNTFQt/fbyU66CZdpIk09+FRI0RCzm5UWD18uYHWYMU4JF7PUbJkS7/JJUX8oMODI2jnjfi7XE6t5uVg5AFw7TiOjPKiRsH2e8dMRlltXczBV6ipRJYMAkUaahXKjLh7AdKK1rvL+nuii/LN2dvvBmFe9t1rs2cAO6pa0+abh7MaSEG5kGISsASkbyrK9n53gt6nmU99elOoyTC7tNq7IEPmCAE/kwS7QbmSIpdQykwMpC6yJb7D+MAq6MjM3OzRVY4COVxCRmMEcQdW1OrzjCfbBo1gl8+BpZf2jbacl4fV1Eh845Nx78rBwZuq+DqbF/ZAMLkeFh2xwQGobbt4RmMfNa3VBtbu5WeBXH/L41GzGxhuKgAvcgy7PmA8oP04R+TXLDFBUDYwxGfpEPY55on04kZHqFuieOHaAJVMt3/O0LENASNf42zD9Pfk7W0iYdAkLkdrEOkrMqw+X/pkEsDW1xSOSlWuZMpog/ZzXDcOhkXDfpsuhyTfvnPruVXPAu+mMdjv8zBiauSMh4MeVxTysvtp3KbfKQ/4NZh+CywjZ1s2f1POHwnTD1e+sfA0+I1HWq+i7DXf2uaUX 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gmjtTLifCrkVk2rIIqxySEBXlElTdPZsB9lANZdW9xm+ftq/AIZrKS3nXk56BAfXSeSSN+3EiyILQMSW6dbASiwx8IH33s1Ay3EJTHpFNzQix5DaWY9gTKAQhJBcxbAPrrKVoEF5tumDWh/+N12YQSBwvxrZ7NI3DecImyLEVHkAM3fPstoj8y/t2rnaCUBmXJZdTZGMQPvNbZq0utrDELRBuqR4jhUbFtlkkWHs0WBecDuBqltq/SfLCuYKuo0K8t8KF5y9W5tt5I4Hd+rlWl879vgloUci2RkLx805ci6GmLWbAwkrkWhoSyGfWPkqNCnA1lKN93ot40gfjryil2Nwe8yCTZPMvug1eM3KaJV9UlMO2SChY6FOe+KpCs+DFvwrvpOcxGnzJ+d+afJYeSP+8rZZMFZkeZlra4Snw4BWauGFtHIUf6AgJF2SkVMj2kb14so9QnexZOQlzJnqTmg/d6Nq4GjhPp5wYukTtzsY4qWVqnnKLycEfO80kybfeE7D42ozo5v7aHr7HRbwGxYWUc5JkKJdfnoWZNBUnUyCrVP0A9AetxO5WPDHbfdSKVBrDlH9kO3B7Yp7f8GGl060qheMSRqF71omm0RPcflbmgK+cZtSwhm+OEHjRU/JfcXWDDeHHKsdS/M6ZYM/t1GFa91DS4+8AO3XXwsmkdSaDfXhx1hv+KyV/r/mgjJ36xEAEmJCVbh+IazCsODHXbobrcx4UZ1iLS1q/LTZwzqo7nQ2sTYWbxl16avkYhh/Lvt91XYBhNeS34CjysrELQ6cpHBVW1LW/Zn2q/xS2dlbttN9WPWw3PB6I6zdeK8egIGMBh0njYhzk/umDKbF3tst70+Mwft8uLBPUWMyhHtzHLQAy7iaQh/sKAP0d7muS969BHpxLuJkpReooUCO4wnPnDnaCxc4HOKQVVfxLJSuGZP3aEtOBVmG7FKbPV5HCDjqSkWZ4ejdfMhRTANMQXAzp52TLRueY4eTxYMqt2d3kBCIC+Nvtlbq4rQxgHpwonnnYjR/p8HYzwSnrJkMikcUeOdodjA9b/x7aJYP91biSI1KrL8zJR09wOYl03bUFyY4vd75427PhfpKDV3s5l5GDAgR+TetZ/89iU2Bsdor0V4PpoCF2a4SapYHOzTVrH2IeEoSgPUpDqHS0UU5teamledzRpJ4hlNud8UAxsk1L0RJEIWWvCbuPVC623IWmPwPsAgO3IQmHcmoR5xI8OkMvU/NjUVEVCJjhQpgJ2Y0zFzQB43rLmzxuoDRDFwVHCDK241TWDL55AKgL0/rTMRvrezKM53VnneA3C3GgnKKw4Vj5e+VKFMwQpBuNFFWxtAQfOhBZEP0C8Fn1yj+Xxtem26rSqKLKAvyTayhBI+KeKQgDmtAzmR1PcfOkWyuFWSbsMEiQ6y/I/2hH8lV9k67e5u7OZUD95T30b+zFxEBeoZY2zaGNRnQWKV57mr281w8LpoW+wcnwBV3/JmxAyM/fQBq8lHg1d3YYeQyn35kQjEGGksVeMBeBTUjgjiRUHfzXVX0pEMOGxmyO6E7wvEe3TiQDxbQaYGzv96U2ttKUkKIXgtYOdN2fdtRzhVd2Jk4pBY6tTbjL9UIHTzJadFVt+5EZwGj4/Z6UmnI2L0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76fef25b-a527-485c-b2df-08dc1ba6ed5b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:04:54.1359 (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: DwE8jYfF7gMdO3/+lCQsDD9trEv3cS6BaP6Hr4OVly/8xs40TPieqyPc4dBixSoJuJUV1iBA4rhfYsJl62VVtnluRgNS2PNALDUP8WpkN/VYT5qjYwIhS2lSJBzj7TTM X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 Tue Jan 23 00:05:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526557 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2123.outbound.protection.outlook.com [40.107.113.123]) (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 4B50E5231; Tue, 23 Jan 2024 00:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.123 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968305; cv=fail; b=QfJPqbuNiEb307z1PV9Huy2dCRYRJrNJ/Hffb0zKgppe6DnQBV4iuR96T63ZuQ7TSmLb24e3Q+dQSz/4GJ0ogm54FGYrvWOGOQ+CuLO8+beAHQiyCNAkwhbEnOWIVAVaHrDVAMtu2q4e1EdfYenehE2Yr3gLPYb/H2BamPUOBBI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968305; c=relaxed/simple; bh=qJH3kQTjmsJfD2prCTK3MIezU0QSxHVYSkCk/IduxRI=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=fX2tcfbSR8wgzcYOWOcR/3dkC8P/4ZgoaznGZcUbqLNtv0J74DeQHfIy2Ml45l1WxxUBsbsosdh22z9Um1CtfmNNzmgnI95WyVjCijClTwTjEY3QR8eapCC1qTnk1Lh6MA0GbhOILGLsBsGsR8m+HPPaR7sH07UqMmx3b2l8zPA= 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=ZOInIsBE; arc=fail smtp.client-ip=40.107.113.123 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="ZOInIsBE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HKBz6qS9z81u8eBDIa4ogYMCuB4VnvLVipAB+06urY7m/z7VHYLt0XErWr4Vx68KqgRYrwRVgXiEXr0CODSl1JIveiCoj8urEm68ISPhqqx16nme2UcdRDQRffvBi6T7o0ubEba9/8JpT9UiqNAucDKZHu06+coqxjoMkc6vWuhlfD0uIk8QNs/58yuHUVbMkHyyVFzWwLP+7A51KIS4CheBKsqbmjTKyl3nY1uELZFsXGE8x/AUn9D98pf93YD+eNoZOk+6utXdL5bSiinXydw5rgj04idjIwRNjMvmUWdBYs1YHSp/q4DJniQjxhdFFlk9rASZ0V9fLXi3/f1jkw== 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=RPSsntbmXKvS2rzucUWehFVtWHbccVt0yvz7/CtGjxs=; b=R127v7OoGNEdygid+dTTSmM/u/dq2fxMGeK18dvtD6a34sbB7UE2wwW7xcOuocvELmbiZHKEUSmCi7LDhpf6WbHlaM4M5q4Q8kQcRgYDu63mGoFcqnsZcD31BK9BDj4IdtFQ0/gFlurlG2iFoz/gLrnEwExaobbA8FBs5Ns0LhMRYr9tFIXFV9HmCoUeSTGgm6CvOTDdA2SUTTBL3oVm9itpYEhJ7Blg9dxg8BlP0UqphA+kzwyXJRTjv4/9PJ05mnFj+4FQ5rsIDOWpik6EZxGqaPC/rFXh5KxCiHINv3GYw4P5JiYwAjXorhJG48Jt5wEhUw7B7fIiwLjTtjy4dw== 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=RPSsntbmXKvS2rzucUWehFVtWHbccVt0yvz7/CtGjxs=; b=ZOInIsBEOkXw86IXVCAKfi49oyOq8FoO2beuLasjVRQb7S1i07NI/SHcOkWHtrQZZkWTZQYumvpJ0oSq3BBXpWmSP4pYUMkfAoEtRI4x3TGW6b+vvbTqLUxi1gGatFrTsQxtNAyyHu/nhYq119BSX9Z5Xv7jTXx/apTblHKGMJw= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:05:00 +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.7228.020; Tue, 23 Jan 2024 00:05:00 +0000 Message-ID: <874jf4ud77.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 11/13] fbdev: omapfb: use of_graph_get_next_port() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:05:00 +0000 X-ClientProxiedBy: TYCP286CA0358.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:7c::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a0f66c0-b169-43ee-5cce-08dc1ba6f14b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LEoQOrmr/Bfg/7536AB3jxurNjdQNNPNoYWqfXGVcxWx7RuebXE/f/93uDn6X6f89IvhxEItZcU4jBEgkoolZQHD4HZmMVUdNDW6dzdCKEL/7f0M3Fv5wraLGpzuVUW8SV3mLQ4q8LMqqCRdunb9gOkuNieUAuW30e/wD1PbpXTY6wv17oCej5iQlezfguW4/LtGQGz8NLD2A8xtVJ7qbFmMsIZjnI1kTi/ZDvLRzbxCWQsXYjsHRexrerkfXLjz5jaILxNoiuGi3ugKdcHQqVZNh2/ZoIcPA8rBI+soICoxEbzhZkSZETGHuHmgrusS3E+uxBdSYxnetZaIMxwzTWtal3aHnUQcUmmblzsxA9NlppVnRwlIgyhjhzATTVn2eLYuz3VESVNtmc5DnX+YmatlNrTak+QbYmkeAg70Al7n8WZmgmSgEv89KZkoYRhByLlEpaLuwE+HqV9BmjXSMfl+dohiLLoTH7ZvdWV2UESQpQKVtivQodHXvgCqtaG2EdKXgOmgRFNro2f+WxXSGWl2GT/3mEIMJu/jh7faWSoB5S2FLdj3lCGGmjFh1fNhTA6mmVHtAdwrHhbgBKTLYTQ6Fnh/452gwfXLOgtItmkSdKJOhiwjoJb68HB++Zgb 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2dFI+OvYKoH+rpSE3sAFBnEFGYGRaUM66vANePNpTgpA9QAc4Diw5eR1Ieu2WAFhTrJ1ypx4rmjqLPkm0XpI5FDkLLyGEgFNRbZi3SrOyfk6rRxylst0DMQ1Toiem1/dcBX5dvk7i0jDfdnSDM34Ue5wkV59PIGKBVVFfEV0+vgolqiSirrkq8cnDmKGsRN/DheMqGvzoD4Xfm5ffaCSpJyYfOsTbk2hN6cIDSk0z+3EMcsCBYMHaV0QxdUfXAzmINSD2raZwl2OFqRfaD5lNa0g7jUi+DVSzI3GGCYXlHt61QrQmTGnCABh5CJw0LLUBF7IW7kM0F02toa9qLB7CtQ1xk7tobevgF1YqrV4vSmsw0NuWCZPOdKuQ4kztGc7zASkfx/NzxighxbG7kAHP6AIJqnEZmtUViww2WYfk0DBoBFYusoo27t2XXh+GGQruwmYe63KJ7u4G1oY0WIeDhUfmAPpoAVxJQ5pjJrJhOl8FUl5q/xj7JP5x4oRt7cNv9ZPLeqkzGQdea783LPUHPIFzAlmJZLNjqnjyMkq2eU4HekttUMMT+ayh9G4GO4GnEucGWvLOpcnoNe1zIE6/oXbhWbz1HKgboRW3F08v91JhobIG9F3+lvwy0Rx5sxzRnPbIU3r8o1CGCVoTViany3vkyj6+AdUJAUulbfyKGwkxtSxUqLVKwmXncFNWkuev1EoEf33DazxKKzM4wkn2bAkDSxWsuzQAoRkKzGj7C0qvXN5H4W42QNRWXGw82TJ320/XTgniubbt4oaD2zn15PW/xEU5Fo6kQPfKJQ1L8JLS09XZ1phPP/aKvaoQE/rm1sJs0VLzAtU8se0nYaGtyHx9R3fO5nb0n/Xw1w6tUre1SiipAtqAU2tsbHVlgj7RLZv1vFdH3nHLkF+Hb+NY3B5BjTYr8AwPgND/7m7qzO21UCCDyPJ7zYfNpMl6XyBnwOfQ/rDABqW3nUwK/ZoZhBJYey0FkdkJmwO1wfIlgT0Zg/yJFppEJU/ToA2ZdSgZhwpZVuflcq50d3+LLGTT2VG0p89XZvBGUkEsj/MRV1Zr3I3tGZLQQxx2cbXL/+j/pMZ4pkr6zkInabkKPb38nI2KGLUyWiPRbHYku0Gfnx/mJx2fpOEUezByMO0eXTfaWqZiNal1lPTALia3YdgoZa1rK1RxV81HZL9F2ZLgzJh9dnwgzfVQ4Na8djei84xN6TW4gVD0HCp/q6FSuJ/u6Ab+dRZ6dK6y998PSCKWiaXI6W7nxZFAEwDCxXIuc99L98K1nVUg1g05tH/jpg0M2tEBlm8vXosQoT+VFmR54QS62uAX8wxnamxeN59x4UzYN4SMhNugDlRESQieMERRIzcuE5yDSV5kXR54sZr08Dkp6XcrW9usAzA06fGOiZFLzFxtszZ3RK+eKXNidyVqZ3ybIWpNZC39d3D+YsL85GEYDx8Nehn6tH6uBaI+yeF8s4LAkNnVXJe1huEguxFZDhX2VuY7gPMCajLWMB51QEMEXY15LBGgD8xVh5edKvSRdGYkFAo7nf+2D2MILO/dfN8s5tklllZR7wAIzV62/Xg5LqbGR15679BUqyYIO1tb2KseJxwJikoeYi0hM+BbmR+p/zheiGpZPHOewZ4NsA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a0f66c0-b169-43ee-5cce-08dc1ba6f14b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:05:00.7676 (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: pg0rreJ8RBEooRzVCs01T3CRDu2PloRTRjlEcKwfLSFMX5EUpGw2WwZsYE+43PJAAyUKco7e+YfLR7vx61shAa+g0NrmITd5L3XKeWQo32TH0cnknVa/xmkCn1DmtsLb X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 | 8 ++-- include/video/omapfb_dss.h | 4 -- 3 files changed, 5 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..cbcc10af29b6 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c @@ -922,7 +922,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 +953,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 +969,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 +1000,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 Tue Jan 23 00:05:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526558 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2112.outbound.protection.outlook.com [40.107.113.112]) (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 C0CEDBE71; Tue, 23 Jan 2024 00:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968311; cv=fail; b=qicjuNXq8i9b8BNdbPtsBELjQBfwdg7e5OJ9OSWDHA5mfJVwaQA1tyd0FOBBSCNQMbvWanj6U3N6ZSKOXy/7Espa52ZC61Z0aXCksBG3Ufq2cFun1jN7UhYLgOVajsw1psQzLjcqzBs2XeeZRgs8VnOmUr98TFFJVl9ZKHW/fKM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968311; c=relaxed/simple; bh=HJuj17k02Wy4MIWn61IABxtSoHKgnGKK1mVEJC5WBGo=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=vGcf+GudSlPMhdEwi83gKuYxX1aRVjX+e9ZvqAkSk6OoJlhfufTVdLP/MP99qFGDLULpt4qq9x5XY6VzLududcAVw0ZOIAXHjtksmdve8GV5sDFqmSDiTd7nzd+JiexjuUzx0nb4ryoMnj+CqjKDPbUoltuyA+q0kk8lgT5ldLc= 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=R8W8pRSE; arc=fail smtp.client-ip=40.107.113.112 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="R8W8pRSE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QjZly+5v+d5FTGJItDRxTBsDzf9ZLjTw0RNjXneFPBB1xeLUxNIXaB0qgHwZ0YyDY0SxeZKdfg1RP0t6Ecqvu6LTM8rQxidOY/KAlUtTeusNYacN/35KtqEBqnL6ZHkf3wTara5QwDzTfMVfFXz29/JpW/l2WvTvDY2Vpn0Q+CcW2fynxq4SLGF2XOH6ETdHlqQjNpC2wotNHIT3HE4gry148FGj58u74GeYo0ZEHdAgkLDNeDPc4UdzCWuF+Nyiv9y3e5hyx0Xd9MlSh2BH0HmnpPMrqf5PB5C+D7IhZ9SbwAy7EL6kvNI809U2AA4VoWWelFBW7roEhj7JZ1+ozw== 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=cInWHtK9e2Re+g2Z4kawMzOb6heitPB03TjvSzZeqmY=; b=ZJa7Vk+Xkpd5p2H7AMm2js0OfzoOHYBGT7oOgPU9beWc/GnzAvcODzxXZ5ofDlKMFRWt9BjoHL8taTXRwo0sRdunu18eB/PEgmTeH27EuoQTMZeColatYts09+b/2MbNkUN/nHWsDDbRHBi7AZKAhgIU3F2g9UwcnnYSW+ZBwmnvD1s6euEgsCA4CJLnQyxYYDbjAmnR1yfaje2EzUwjj5/g7CsAEezqVlDTpoHE2derVaTe7DzZJagS84vxuhzEdpGiCH6WC+DboWe1rje94XPYUAtqTH1MGc3ufYtM32P8cSeTcDbnC2Z+mx8qRjqto5XgG465fxE4vX8kIA6pig== 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=cInWHtK9e2Re+g2Z4kawMzOb6heitPB03TjvSzZeqmY=; b=R8W8pRSEwjZQ+N9Qe9MAll6Lr1rpS/467KlAeSGc815o0y3vKJCeCPp7wA3v4fzJD0vg/xNkMTrBTKuJiqoy1JKWQGs++pJ+G2kWTkDVNSaALwZQxgLjnHvEngz/e3wV6z+lvn3UjjNQFjtpbE44/Z9HLi1gyxR78bzcuZMFRc8= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:05:07 +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.7228.020; Tue, 23 Jan 2024 00:05:07 +0000 Message-ID: <8734uoud70.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 12/13] fbdev: omapfb: use of_graph_get_next_endpoint_raw() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:05:07 +0000 X-ClientProxiedBy: TYCP286CA0353.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:7c::10) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: c7150629-543b-4f74-a446-08dc1ba6f55f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b3yp4sgS7DWyBdp6D0XNL/6cG8FlXapQqBuTJrIq6qiVpqC9zDlpaWPvxxNmvls5EwOrjqgFA6I+rq7gAjRO10s1EgmiMPHLmqxgkSH1b0XKh6UN1JzlsrEzECcrPHpq1+waVbFqYKxJ0Uxr179eZaX3+PKOThRTkvtrmRFZHOHPTnA3i0Pw3G9wvfyvAoVskhvoRpzEj7s8JRaPHc2/Aff3NK8TCubb0WQHHwzXW6I7fFz7GXnA0gJ+3WkpBmDFpF7nFQaEsRF4N8cWCDsLKz/Hsa3Lul3T5nJwmHS89Gcu24YGJYv6LGtf9scE63NV5hRbAqyFt2JlRd241bg3qacN6ZmjH0971+9OPQpiD2kS7152EaqKqwOH8fS+gs+JEyAr9LKY0CTU1sQ4jQ15Utm+U0GtyG7OD3kMQzM6ybsbxEWzfSOH+gW1R1FSuc65JWDLk6dK6Ki3nSVk/xEsu6LH+ffirRyEXTKMvjbmu8/ggLJXzRP835yi2jQELwDSBzxiaMZulo4hPP9XCqSpOr+iH0W1EfOmuB0uak7zOKyaScbu2WaHFbG9pVRk49VVywsjZt+1S4o0JV4IWQOEAPCpXULkllVTH+baq7XAjUtcFh3V9BAPJZtGSshCoW8nzYuk+NUYWhlgFG/cnU429A== 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NkCQjXhFUH1qiOXDp6nvAVZ4vWrwZr7FImTZwsyYRbGCSYMGMphvJmsnax9Shu+2aOvQsoRIrjGL+w3RjV+c/XTThiUjtAVpKBxR892DaT/h+6WKG1DGbA0kxHs7UGoXaukIrLi5JIP1/+qhMgmoWT8yZ/MjU7hn59+uAE2mBwzZoMdi11bL+goCSk9jQZZ2lNAmzjVfDBzb7/VyGf5j0BGTR2ZEUC30QEOaebAqoz8BmiQhz3Gwrf9/X6RK0hgghgwYDAfpkSTgVqRDW9GrYu/YDgyDk9mA1SCILOtS6x0sbpgIFJ+TZq+PP+WZAikCGu1Vd2nCXBU5DEdSGUQjPa4kW2JQ1IbgpJpIXa3I2NH4hQPxh1aqg3F/PcAA/R4NUJj61gqyHNe+3u2ZOZYOYzfCegykYOO8CYCE20NEtsoHg7uJ6keeWbtiKoQGPV5Xn1oRicNmyb+z+La6AvWuyHWXUBzCEhmPtZGyQAhivvmBBKPBU8riH45uFCiav3Et2eMZK8IsLr9w/PwEyMqetKLBzpSHWO34mb6W3KNOyB3etkodVHXa64BAHUdpVT5RwOng4gvMm9XW4f1QIe4SwiNn0bbCw/zXC3HBLcjVVZ4d9NJ2GTMBmujESO/Lw6N3Sus8djvV6rxhoXEIby157ZCz1rsGf3CkH2sYwgkcHTvc4gbmcw10cdQlKANHg+t+9lbJ8JDerssxPTIn/XbYVgmmvbBpkhnQU2EP/9BxTg8sNHy+3M0rCxElDVijca88qhiywBVI0RBlOFq1P8T5OWatCMtBKq+3Cd4Ei/+MaMqA5i0W2yDJriKcfC0PVyPpBliEtnL3bB1gcLYb6ltXiz4SvmUu79gVfZ5k/EgfZ2l/1lbBWK2UEYYU94W+t+oA+XsQzp8Sac5BBReJq07dFDoWqQqiWtzapsDORMJepmWjEoRuEXYMAXoOtQezLF/qN6Vw5E78jkvy8QXRPJlPJY9GIdvmKf3M8r7yxZARqLjyuQWr+X7//d9ryVbpE7M0RUitYv4GL0NwKVTmCrtX0RnE5w7ZWpr+xuafYLn1Ehr2iBcWpqgSHxIg8lDaMZhGlZr//WXA4PNn4loDuUHSjI/A48AeCGPqVTcARxJmTYTeyPHUeCHo4/FGRHhYCjYaAowZSf9NXfKCEIHf7OK+WKOJmjSgkVz0bXE3f4qpY2kF2g2cx+RrxO/TV3vjb9QFZvc9pe5J24IhSQVwW5NaZp10RgElhriHLArqgHLhDGsWLUS9lj6qr20o7Xz6/5nXgSFpIs0A7Cgr4i9Q8KherYdXo2+IXpbukPlxsY1k9L6oV9XtxeT5U4nF013Xq602Cr9GwNW/E10egds9VVH1QNVrABlhHGINBtXZKr3e3M9pzLMpWC5SkCJYTrWxOEdBZYuBSWZ/xr5ijUrCW3Zsr79DsYfAaPgacpIPwHMgzow5+Co5VUN22cdzdjRWFy9JoVwolCu3QQlzfZzvRX9vg3kC0e6Yg3Qe5uOkEsyex9pP1iuJVRDHenqBVILWjP/5vsjDl5xf8RM3jcWXoGXU5PTT+aASsSsVwIcgW7B8uc8G24k/Ss2NLeM4OpMaNXg10yRxqRrcUmBAOQyDFeWMrJkbHrdbYwIqxncs8kLFvqg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7150629-543b-4f74-a446-08dc1ba6f55f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:05:07.6176 (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: F5nIyIc/KggxfguZvCybZ0QXipaOS2x28FrSmYVyjqQlPGTQIasZSfYhMQ77naW9flvudYUhp9xssRicFJ6aYLPwqSpd/xujqPzgqMK28dNS/25/R+zr5yMI+drEEPFU X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 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 | 2 +- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 22 +------------------ drivers/video/fbdev/omap2/omapfb/dss/sdi.c | 2 +- include/video/omapfb_dss.h | 4 ---- 4 files changed, 3 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..bc6346cdf849 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c @@ -845,7 +845,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..92da25a2d9a2 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c @@ -405,7 +405,7 @@ int sdi_init_port(struct platform_device *pdev, struct device_node *port) u32 datapairs; int r; - ep = omapdss_of_get_next_endpoint(port, NULL); + ep = of_graph_get_next_endpoint_raw(port, NULL); if (!ep) return 0; diff --git a/include/video/omapfb_dss.h b/include/video/omapfb_dss.h index 426d12881132..fc106aaa75bf 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_endpoint(const struct device_node *parent, - struct device_node *prev); - struct device_node * omapdss_of_get_first_endpoint(const struct device_node *parent); From patchwork Tue Jan 23 00:05:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13526559 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2123.outbound.protection.outlook.com [40.107.113.123]) (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 2888DE56B; Tue, 23 Jan 2024 00:05:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.123 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968318; cv=fail; b=mbRIdz/XMZuEveMKDkbr3w9OV7mKLPR3lWeTEsdC6EpDSdtkzWx7UCZWcftx9CMRGjjNoMNBXLEoYsemB4Em9gJDiYBR6zSNm/OgINOVFQhjA9GW4skpKKd+Q1oPWFbzPAFSCy4Y3/exYTSZ4p6ONQB9u8i64Eh+rZRjCq2hsAo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968318; c=relaxed/simple; bh=Y6kVxd7KIkDnhdpNBH9XtmpjCfNEgN8FLXDGZoRSoI0=; h=Message-ID:From:To:Cc:In-Reply-To:References:Subject:Content-Type: Date:MIME-Version; b=Xj3Euei2Pg8uuTxSD4pobF9VCLLpDVPwFS3sqr8nKLETiGYe8hCHz7XxIJKjKZwUK8hZYyg065qG8sa9wHIfmiTSzk+1ZL9HudYiC5oazjN7VLJpY7LhKBriItFviMNpzCGbbm4oUfWt2dwz7S2ftDfwUwsM/thirlXo80Wh6AI= 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=TRlFrEEl; arc=fail smtp.client-ip=40.107.113.123 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="TRlFrEEl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OzEf9nY/emCCZMx8DXEdAIBwQt4EzDhr3G9UVaPstaPwF9xZ238SYaPLKBYjWTN7QpYPq33DGjVPmPPi/GQ3BEhqyIArXyMJ11jcHwLg44CdEUZtWLLVKTEWKORIJ4fnjnyPTHjH7WFNr0ikhXax7m0PjzBe/+oDRNSyOLQq0DTWezYxlL5tQZrZhLXFuQUZ4B9N4Vlp2SrSbC0sQ+FoPcjhYKUeA5vHQCEdDbIQi87xmY+iiIODPOOXhnrH0f7v1Vup99Abx+eoD4XWH0YfvUNxcNs7jyNX8j9XYJr4FdYtt73/xMySwUBxihXj8EelVuh1ijHGF7Z6ktkCqNqbWQ== 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=Z+e0kuCL9lYC/SuDYXiiMbN9HD6rHmYXhP/eXxxP3i0=; b=hcc1x6nCTdI05I3DlziZdyiAzA4eD0iT9pec8WXUnf5fqoj0CiIFMCzaVyKaK5WhU/gfDZqRNW1vHduJKs3QBRUGejIFezo+v9j9oqHCZ6DYBaB8tNuXKQVPAxMjECUXEdp0U9iKThh2M7EGG297+bPXedLABCvyHY/k9IPBozv4P3TocycBgZoN4cfX6d7HR7O+vRLkLK5tCamlTSzKBYPPqthSuFmTaUHouTkaWDkHOkic9WKT7uo7xGXHzAOpEVFRZO2iu05hjhRwl0psBE3hyoqDrz9q45TWYNtpg/XTZ8r893L6HWAfBrzLJPGTLMvDrxTncQpVKLQ6vhFW8w== 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=Z+e0kuCL9lYC/SuDYXiiMbN9HD6rHmYXhP/eXxxP3i0=; b=TRlFrEElTy5mK4sdSFJ+Qphf6QrOF//sWy5TWCYiIPAXhCssPLsYWFDdLlH246tua94I5ufEWx6RdccQynCkRBKhmOUB2H90MMf3aW2/4j/L0CGtBM5VbTIUtAo+CyPK/pLVqNOzEgqOOulUvajo7msriDUiWDUGg7gYzCnIehU= 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 TYCPR01MB5583.jpnprd01.prod.outlook.com (2603:1096:400:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.20; Tue, 23 Jan 2024 00:05:13 +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.7228.020; Tue, 23 Jan 2024 00:05:13 +0000 Message-ID: <871qa8ud6u.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> References: <87jzo0uda2.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 13/13] fbdev: omapfb: use of_graph_get_next_endpoint() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 23 Jan 2024 00:05:13 +0000 X-ClientProxiedBy: TYCP286CA0044.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29d::17) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b57cd2b-a461-4c99-b057-08dc1ba6f923 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wNr63tAtAjeS3nSBgMokSjZufHAmeRAgaGSoAocL8uTgPTIG9hvcPsu/in2Z/BxhgJkvESSMtEhCXQNk+V/ACMNFWNcGjTR4iuUQ09z2GLjtUBc2CaeyTrkIeO0aKDoSIHYtiKMrbLvBW091dgrwpcR2q+a9XZLBKM6Y4P9+8yWaQvxLwMN4kOtvlBMxBwrk2POd+he37mUvgCOm3jxJ17inA/P5KoOfvpRUG2+1PiE2J+LEiMNlNFEel8BXEL5oQPtEEnVBer1xU/1B465oJmzl3RgVrAPsSVNDxBQY7fmPdbaZsGSazkGJobGPC9zuWI4qX3w5xrUAbl2Bb9Is9D/3gYL930VaKUfgBJ2ZwUd9sgSDvNb+EnS1BshKnBa+7XEAP8ZPIvzTd3pto2Bd9jT8yLoahi5LACkYmgSnW8PElOoshgquLeclTR3mkz4J1sn/znzEPdCo2U4hrzZKfzTWcD10HgpUoqkMFsdlze8qXBeD6/FJxu5wpPOX0A3RUKwahRY7A1lZYaATJmZ5J7RcVkJlL26BGP8moCscaR74tx+nQLNlGJfpWt1Lgw1brqdstmJit4UZ5QR+zFTINwUb6DzIMj8bDK0FqcSnJx1hZsJFmSONixz8eVu8a9qLnAHArgR1mJpQxwaS5w1e8q88Nlre2pFnyKenEoLmAbY= 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(2616005)(6512007)(52116002)(26005)(36756003)(38100700002)(86362001)(921011)(38350700005)(41300700001)(83380400001)(5660300002)(7416002)(2906002)(478600001)(110136005)(4326008)(66476007)(6486002)(8936002)(8676002)(66556008)(316002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zCd2c+lNgehgxM1z4L8yOoL/w/zxETNjTEA4xN81c/wdA/xTOAnaNyE7CMhIBt9MXcrgN8RoZXU/14l9+WKur+RLsIEv0u+FI+B6EtN5Ax7gzEgv9nXBGJuYGkq8hIW/MNSMS+HdAQJVfhNY0yuOQPKIssAg9Vs9MdaxjAUaFNfJHdkg34L130889QvBhsKMEsxfKDH6qsVhMR7LAIjsM8bnAKSE6MSCUmCd6D86vQfB0adrLjhXGey0EggMsImcSBkqsczot/yY+0u/4vDZ0PGyZK2PqrWEsBKBWqoAt0QL5ELTRrFsQ5JL4thTUYVUv7sQvpyjhVFz/QTc9JlZ8aDYlRnTGbcEr/Wjns0cH/4O28msPK3PAdsdw1d6+1pvCGDga7hBO0osj/3BMxM4aeeKro4thRCukVewImOi7V9tkZ3xSLmfu9xJmxSb/9sHFblJocPSqeJ6lJysqg33WKECUILh11GpdWYyucUw5F9kA2HbtJdi0n01qcNDX18FRQLWs4JfnX/0vAQc2o65ZiBMKHkv15Z4L/V9bZ/B5v4TuOoU5FBPsha2dBj9/uMkTVYqLaB3hnFukBHg4Y5BjUJsTzDcCKxZBpXIOHLC3JWJNrRJEyhgER07TKr0l5nUsWUO2UXBwsOtkabGfIM8IkLw6hiUPAZEeQObrWWPotOIyr+G5CQ1lMqvmMgQ7s3sI4vlU54jIu5OoA5rpvVxLZJu4UkjvOVCN0VV1/CxVIXRWyVa1sVkTaL/EM2uQn2oYkiBlySXZT136LnI1+hzc5sHukkbzhB43W4b19hi2qqU+1NOiFjjJ93nL4WMOdPam/IT5EKdpQGrmthVvY7DlfT7AfivCyrAjw490YIq1S6K2Lqb9lgZFKHPuLWOMmRnvpKjA98awxx8a3mJ7sPwUAfQzo5ZPLHrdwyv35pElLFMs+giY2MuyAxK7rXgogKVSPbn+d3Rf1oLvQgKrswmapnFqN+tk+Spu4hw2nuK/Ftn1dvs2nJIKnmi5I/3z1Wn75D1/MAAlhKtf6cCZYw0z2Qn6G08AwJcvj+jozIeO75XBTZkeo+ODr93L4SSdCOwF0WcA5TsXYNE4JqqWHvJhj7tkXp6cpoGoxWG1RqYlfDIy/vF49jR/524Wniq7NGO95PKVoa/hNQr9p3Sf/T8q6zTVBspxGxP4GyO0IwXZGwoyTuz2qD2wcfm/GKtWwWxkSAiN92aorEDrGvmA2Atb4Ug42dp7xNo7iIxFRAg3Fh9qfyOlZnVTEjdxeu2TKxJpQs0qLG85Ol/ymn4cgcnMjI6KS+hnmrB78i635lrZpWgo1tVpWWjJVQx9Cmg7T0TwtFz0giWfSqAgNmq0mhgpdiqKMD6cVZg2VTkSRea3Dajo/s9y8Mte/LvTXQQ/Pzvk/RVhKPKeK1H9FtVTRMVx72OlSw6P2srq2H8RHYVTmtZ2Phyrn/PJPXX4msycTShlOId+83nFdy9hmzdVrbZeRRPVjwKFZCh57ejwD1TQAul7PmKArW2IId1uaQzSqMihLqz6Ajf9A8oyXH5Y3dQe6rDpV3ABPVeou3LqFw9QawvCp4u5QbbycakzYPbvrCpgH6G2beOfx0jPoh5CFXtcy8fAcZhtj7EGGhd2FihvkI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b57cd2b-a461-4c99-b057-08dc1ba6f923 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 00:05:13.9003 (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: cIaa/rzeMhbdXx3a+WOa/E1OEOEkn/M73pVhnR0V4O2itq9GMbk/P4jhrvY5MQY9BfA4McWLAj3pPWsKdgx1g82jE0OVH4j8GuZKrLdrJcXptvqI4ez4vOQ9g/z1g/ot X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB5583 omapdss_of_get_first_endpoint() is same as of_graph_get_next_endpoint(xxx, NULL). Replcase it. Signed-off-by: Kuninori Morimoto --- drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 20 +------------------ drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/venc.c | 2 +- include/video/omapfb_dss.h | 3 --- 6 files changed, 5 insertions(+), 26 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c index b7eb17a16ec4..7a13c4451855 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c @@ -5079,7 +5079,7 @@ static int dsi_probe_of(struct platform_device *pdev) struct device_node *ep; struct omap_dsi_pin_config pin_cfg; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_next_endpoint(node, 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 8aa2bfc2825f..1cd3e7251964 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -51,24 +51,6 @@ u32 dss_of_port_get_port_number(struct device_node *port) return reg; } -struct device_node * -omapdss_of_get_first_endpoint(const struct device_node *parent) -{ - struct device_node *port, *ep; - - port = of_graph_get_next_port(parent, NULL); - - if (!port) - return NULL; - - ep = of_graph_get_next_endpoint_raw(port, NULL); - - of_node_put(port); - - return ep; -} -EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint); - struct omap_dss_device * omapdss_of_find_source_for_first_ep(struct device_node *node) { @@ -76,7 +58,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) struct device_node *src_port; struct omap_dss_device *src; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_next_endpoint(node, NULL); if (!ep) return ERR_PTR(-EINVAL); diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index f05b4e35a842..ba84ec179ee7 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c @@ -529,7 +529,7 @@ static int hdmi_probe_of(struct platform_device *pdev) struct device_node *ep; int r; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_next_endpoint(node, NULL); if (!ep) return 0; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c index 03292945b1d4..3468a3c22a65 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c @@ -561,7 +561,7 @@ static int hdmi_probe_of(struct platform_device *pdev) struct device_node *ep; int r; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_next_endpoint(node, NULL); if (!ep) return 0; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index c9d40e28a06f..889a28694b39 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -764,7 +764,7 @@ static int venc_probe_of(struct platform_device *pdev) u32 channels; int r; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_next_endpoint(node, NULL); if (!ep) return 0; diff --git a/include/video/omapfb_dss.h b/include/video/omapfb_dss.h index fc106aaa75bf..d133190e3143 100644 --- a/include/video/omapfb_dss.h +++ b/include/video/omapfb_dss.h @@ -811,9 +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_first_endpoint(const struct device_node *parent); - struct omap_dss_device * omapdss_of_find_source_for_first_ep(struct device_node *node); #else