From patchwork Wed Feb 7 04:38:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13548091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBC87C4828D for ; Wed, 7 Feb 2024 04:38:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C5221130F3; Wed, 7 Feb 2024 04:38:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="kyVKQIts"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2051.outbound.protection.outlook.com [40.107.114.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5036D1130F3 for ; Wed, 7 Feb 2024 04:38:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JwHZiluTKPlR30ufTxZ3y4ZlZT+bJNaLneIzlnZfmbVX96M34KJ1V9bx50nTEgokgi1OUGfbwfopQWGX4ojpOs8BSG6xG5Nca1fWH1Zv7wbakPFzTFAsiXqUPhabSjI1g5zU5tSQa+1B0I3XTK1Xqj7DsVmST/sPWKYSanyrigCfm+ujgSEWyz1VGEAa766zByluQC7RpzPFEa9GIOEwgvp2wASXGcqxbiH8Yq+FBD2pqOaK0nfdwQN33czj/69AQuNuWpbdQUGYjIcXt3C/kw9ByVhdKD9Q6KxmYrlm9BbekTqLfYa/8F0ebqB9b/brh1uvR/93vodbA4iufH0Axg== 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=U+nNdu9cruwklfWfBXe1iTRh4EtTiIw5DoO94oGqHpw=; b=WtbYeSlYl593obudeAV+mY3Qsfuj5mxjtWnQxiYl6jdNsNgUcJ8IRdAZ2cKGtpCb2pTjdBzho6wjqKWGIG7Ex5tyzN3vZlT4S8ho3Th2v5vI1kxMtgB8gxFysb92/RsVltVMi7wIWOm1FZEqrvbP91FVH1Ytg3y7ZVN/xw6C6627DOQJOuboczqagsT+zFN2K9XuBnoP68UWeEcmV3xZH8+sinAMeoskoBXDMFGj0rpOUsM5zuecWfmgozExqmb3bRYNLwhmuOvnsvvezSTK8fshazgpXhfuvC7pwsTmlKg4SbaJ9Bilhj61LWyxccmcn2eDoNyuwfDEo3797gDufQ== 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=U+nNdu9cruwklfWfBXe1iTRh4EtTiIw5DoO94oGqHpw=; b=kyVKQIts+pS3q6faHWO/OSuFFhdCFoHbfAP2bfZpYhOS2lTPnTfmYKSn9ELOCchJo375+EWAE5lUYPu0GZt0QvV/huBPO9uYlXY61/SuM9kD/fqu+sWe+QLbv6CoVdTeot6NzboduLf58p6YRJRfqsz9/7+64uZN9SaDh1R9x6s= 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 TYYPR01MB8022.jpnprd01.prod.outlook.com (2603:1096:400:f8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 04:38:50 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8%6]) with mapi id 15.20.7249.035; Wed, 7 Feb 2024 04:38:50 +0000 Message-ID: <87plx8sxb9.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alain Volmat , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Broadcom internal kernel review list , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Eugen Hristev , Florian Fainelli , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jessica Zhang , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Neil Armstrong , Nicolas Ferre , Sakari Ailus , Sam Ravnborg , Sylwester Nawrocki , Thomas Zimmermann , Tim Harvey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com From: Kuninori Morimoto Subject: [PATCH v2 1/4] gpu: drm: replace of_graph_get_next_endpoint() In-Reply-To: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> References: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 7 Feb 2024 04:38:50 +0000 X-ClientProxiedBy: TYCP286CA0288.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c8::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYYPR01MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: 460a88e7-694d-4820-8bc2-08dc2796ae82 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4LQLe1uNFLStLnUzu4CqOCrlC9cVaHW4535Y9a2Gm9D8ME/FxuxMzopSh+25NQD5nnjIgwHh/X+Ek1P40GNMiLPuHbrjE2daBqHpYb+8Q+MAmUsuQK9SJVffdeSBE9B3WERXRHfSklXYnjOJxzxz2iRsxGswJpiWkT5R7Xd4ftxv9x092rUwt9e0Y63D1019D07Ox5ZUof9SDfw1PfJ3ntG83jLpoxGAdlKFInMsxS4maXaOkr26nAi8zuySoSLD9boq88WCfPZqjdHGbkZC3g9IStSt90EU3Uw20eJvFWU0WoQCeWHhoQXCPAv5b3FPsnrQA1ntByu/jRAE2iJXrEcxhvNFYk5kfZ21KT6WYK3CtfU0GWsVoXBQRjG7f+lIaFnzecsrHJ33yUYyy6GGY8Q/qNfx1pViznVcJFzwWV5zJLAFeK3GiYoO6WD1VxVd7NjNq6vxsDpnd0itPYiaCkbFrOqed/pkYlqq4HvkxieJLMU6BOc0UfQjCND0RpLihmI/QO0PE0ZeWscDjkKf9pdP+5m2XDeljY51uT5VM1ypy1MzsOngl0ajfTRGv6m6xHoLa/c5TYtmi0upF26LtWbqy4oeB4h0dwz6JSRZBbc9UsYrmZ4iFEHG63dt2UjB X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(136003)(346002)(396003)(376002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(6512007)(6486002)(41300700001)(66946007)(66556008)(66476007)(38350700005)(316002)(26005)(8676002)(8936002)(86362001)(6506007)(83380400001)(2616005)(52116002)(110136005)(36756003)(478600001)(966005)(7416002)(2906002)(5660300002)(921011)(7406005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A7msiqIiTbc1qN9Y6cUIOz1hK8UzTUdPLCMTusGC5shIQtFisZwuE6uX3G9df/iY6QgZFk8O0og56yNwfVmbe+DjOzcotY0BV7W3BeTdyJWRDRLgd9DAD4+pIYpqwqxlwPgI0PggWZIHDM7mB9Fb1WylQMtzkN4tp6pZ8Nl2TPQCQAs62yMzMzaPJxOVW25RzQElkY+8x2nPf89Un1COcWRIfpyAsx6wg5FK3g0RxzliewqbzMTpBnSXvhe6vf1+M5w6PyOfAKko29Q7x5NLbVF1x3D92bCsmKaIGdS8Gbf3KPDCHWSJnkcwLO2RU8+t/snc8oBBYBCx5+PUzMkz8TZlyd4tFjIwnUkYYHkE2pKD5bXxiVR15kCZDKlvr9xKuHeLtAGtN59ecawhyK5Iw4Ho7q0e8TirlwxvMiOZOD1dK2DYhRG+5qNyCB4sk8H89yDzjMex0hYW4eGtGP1kNB6MsPw9VeEOjivOiQwNCEi1IM+hMdcNFi66zG1CyejdcOKur3gmHXkJmn2ERchky8AtgUHwR4SZK8/RP0NJWcPnSNP3MC0UGqFRwJCtsL5cvard0wHsYf5wRhGv4BsrCr0oV+cKmIkImgiTeZmdGDLDF6aiMxIPXUmYccv0CeJqTC/bQeqEIbbKwkgX7RswfYN7nlP3HsUGcEOT+eKaXSSkbWnFIA5lTIcscnHenwBJWArcBb/wiBmGkUk9sxVgAAdEFdbwbsQm/yoNUMaeFRtYCO36G5WpXak2f28ML3CIV03SNheFFhEqvcfwxBosFWhWtjkN2+55XQ8WqsbEdfPTF02MRCg7r9P0bTAPEs5Hgj8p7osVTGU0X5rs0bMonCiOMil7i4mQuMDmJowXP/0PnXmQFlR4sadmG0p7tYVBiL0i5B9072xZCwYeF3Cun7Xw3Kj1PlZ1IwuWkqxNvu4chJblBKlm+7NslDWoixQh0r/hA1dmRNGBKOjqMFb86cB9K0K7sCMvbjRhxP92OQ+YSCwmfcOiSnJGtfxKlHq5NwjnS9gOJLyfrLLfd35Kc0K4lVj8/z9MzVwkQU1KIc95bKwNF7wKhrjWhl9X0FgQwR8/yed+iJnnnCLx2Bpd0Ehi2z17gbCOQwosUYsYDVJ6krEZmpx99H2kG+q2iF5iSDZiVlFnLO/I1ocenyv55jB81e8owRt5tjfe83XSxRZgtK545x1gzbu0JRkmFI38SdlqVbpeGUR2ltvR2PibfhqVWYKb6w7e+jWKUbGbcTCvjjiRvh29ZRy5+GHUButxVoUjj7bLV2AZ6Z/IUyjeqezPhiyFabVry3gQaL6pMu96Fj5SyS+k5lEiEgVP5nztyF5kV7ufAXzVWS2ZiSKWE1iQttTsvPpkTpXPwgH5HBEKYEjVCKlzHC2DJ+Za/rzrVApKny1GDc8R0+Sfzn2lkoYAo092Kk1pexkjZPTSPiF3+keN/5z9VdYFv9YADnTOgm2dhCPHgu8uzOTTQ27cEt+i1LXVGOyzVLTqTDZ6i/e5BsinoZsxYJbJ7hb6frsBjbyy/L7hyHQn3/vwds87HIsKo+g4tylsLwijJt/Ie9juWYglmy4625hawvd7nPny0EQgjZMAsxX2fRjSuuPQXSBAXn+t5I5l9dHWvl0DJg4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 460a88e7-694d-4820-8bc2-08dc2796ae82 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 04:38:50.7095 (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: KhiM0MAkb/HHuZdYv/FpPKuJYtvrm4Eozv3hRGtIVsk8P2O4HxJTYUI0KVS3mJzuylay9t0qdG2cWsgvaxA0M6IYi3CPiGulYpW5i7BJCzqvRq3EELACMIReg/o5/FF/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB8022 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_of.c | 4 +++- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3..b6b2cade69ae 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -504,6 +504,8 @@ EXPORT_SYMBOL_GPL(drm_of_get_data_lanes_count_ep); * Gets parent DSI bus for a DSI device controlled through a bus other * than MIPI-DCS (SPI, I2C, etc.) using the Device Tree. * + * This function assumes that the device's port@0 is the DSI input. + * * Returns pointer to mipi_dsi_host if successful, -EINVAL if the * request is unsupported, -EPROBE_DEFER if the DSI host is found but * not available, or -ENODEV otherwise. @@ -516,7 +518,7 @@ struct mipi_dsi_host *drm_of_get_dsi_bus(struct device *dev) /* * Get first endpoint child from device. */ - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return ERR_PTR(-ENODEV); diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 4618c892cdd6..e10e469aa7a6 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -400,7 +400,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c) rpi_touchscreen_i2c_write(ts, REG_POWERON, 0); /* Look up the DSI host. It needs to probe before we do. */ - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return -ENODEV; diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c index 4f8f3172379e..8c29b719ea62 100644 --- a/drivers/gpu/drm/tiny/arcpgu.c +++ b/drivers/gpu/drm/tiny/arcpgu.c @@ -288,7 +288,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu) * There is only one output port inside each device. It is linked with * encoder endpoint. */ - endpoint_node = of_graph_get_next_endpoint(pdev->dev.of_node, NULL); + endpoint_node = of_graph_get_endpoint_by_regs(pdev->dev.of_node, 0, -1); if (endpoint_node) { encoder_node = of_graph_get_remote_port_parent(endpoint_node); of_node_put(endpoint_node); From patchwork Wed Feb 7 04:39:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13548102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26D56C4828D for ; Wed, 7 Feb 2024 04:39:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B8D61130F6; Wed, 7 Feb 2024 04:39:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="Xa2Ta4NK"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2059.outbound.protection.outlook.com [40.107.114.59]) by gabe.freedesktop.org (Postfix) with ESMTPS id 645BE1130F5 for ; Wed, 7 Feb 2024 04:39:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AuLEPCHTUmDlVDKQIqjR033xrSUfD6vLl/M7QgH4x2wlcQfJQ2dsJuPr/yFGtGizu0W2Zf3nJ4BeoV3uMpJ+iS/m4o8SISX5NGqMsp57rkrtIKDtkCvKlBHFneo9WppIn47vZYatXslgim7mDDDKim8Ye9gaXNFpnSsZfs2f9QnMcSAPnzO/4Sy8BTpbDLeTwJ+eakAsUcZsx3krCOVUJMXh7pHri/CZMGBZYHraRDz5/Ozpp5xcIc2yYhGc//Fk46LiGzg7UVCC201Rq5niU0SL37q0nA+FNHa61fd95rsIxwvpf5z5C5tg4pBXWRh1nnyxHNzSKw/QT0d3TuEx4A== 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=o7lQcPCnpEicxp36lyHMSuSuqJ+WxW2JpXlU2FrAGS8=; b=jWuUqo4G0Oo4K6U/5Vsb3mSu6jH2NiwPub5J3ALk494MIdWN1xM5hBRxTjpnQNJVIIKqvMAOBZGH1QgPIbpT3DGQ1lyqIPJ/AINcxvLgxz1ZeUp+XN8LAjwqS/tIGHJlfbCE7kw0TfXyIXhjb6I9g84WABOGcGEpQW5055jVXvoAzUCBy8VBN1gWkvavKG97U4CgUbjWdZC6ZCI4MbB86cyu+ifGLNNW2N56oqw2HphVCpW82DsoIZkolxibeCFkpK3jt6/5ubUvz+W/3LWBLW69UhKLxN+67+v8HAHIX0Cii7egeD1M0XrxqSJ2kpE4vVSsiIQIFEJyhAVzyvExSw== 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=o7lQcPCnpEicxp36lyHMSuSuqJ+WxW2JpXlU2FrAGS8=; b=Xa2Ta4NKc8lwIimc97EPwgbASu3wtTLqqZrNsbeCkoX2H1W5NKfNlTIE3dBQOWSVtP66B5w73hUNJThHgtJFIzidE8gzQEcyldOfkkBA3hn5nK25kZ4/ljbwh8mRDZL0vM1CVQ+x6xHnOfev1cu9fLQJ0SZPnJK5V259f+QYmbM= 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 TYYPR01MB8022.jpnprd01.prod.outlook.com (2603:1096:400:f8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 04:39:01 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8%6]) with mapi id 15.20.7249.035; Wed, 7 Feb 2024 04:39:01 +0000 Message-ID: <87o7cssxay.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alain Volmat , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Broadcom internal kernel review list , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Eugen Hristev , Florian Fainelli , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jessica Zhang , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Neil Armstrong , Nicolas Ferre , Sakari Ailus , Sam Ravnborg , Sylwester Nawrocki , Thomas Zimmermann , Tim Harvey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com From: Kuninori Morimoto Subject: [PATCH v2 2/4] media: i2c: replace of_graph_get_next_endpoint() In-Reply-To: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> References: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 7 Feb 2024 04:39:01 +0000 X-ClientProxiedBy: TYAPR03CA0021.apcprd03.prod.outlook.com (2603:1096:404:14::33) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYYPR01MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: b732614c-c7f9-42e1-a6e1-08dc2796b52b X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BsvH+XHCwT7QmyZ+957XGgZpj29DGoh45Gi/j4ZuG5W8y/fD9XOZPlAtpFVxHY9xXeCNkDmocSP4wDxF1aNM02aMZMiAJ2rRKco2JhCO/kr5er70ZVplUblBvtdh0YzFi4P9xHxjUN5MGdf8lsnUb7EfJ2TV0eGlb7PU1sSZ3iKv278uRzZSsV9j4N/3x+KJAeS9dkkKoeAbFoUTCyYIj+h7JeXhU2QnCA5LJkJh2ATGBjBIk/f8hSRHMRGK0YD2ot6c04sc4TKvUBIugDbUl7YC3ssVzN9hOLft6wU7fKAkh5XIXZ5pTyINnomAdRdSuVUS+63SKa0JkfI/yzWuCHzqGIoDNJYaLT0V5tOAMsx5L048y2HOU8jhlXsrtlnDMDepts6upFGPZcONePoz8U0M2fVm7ZLWsEnVvYhVekGAGKu9vZVcU5Zj4xqYxSpYgK4vXVfue0eM8xBzp9nJZCfm1Ce7k2dQLAMRQCTE0Kk5d0OwLWzRJiZGF6K/jtn3w8airwt512gX5uxfFuBdDKqTTi38OMd95NRwZ5F8ZXup3tBsPtPFOJvACxmkMgvIVoGn2BJhyzd46TDMqnmgz0N823ik6VFrMdFI3UFjxzchWMeB5ArQRrQ5WqYfBWB2AirO3/6nvLQRiHq2eNJX5Ej0f3aB08CAIgfhk3W9i8A= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(136003)(346002)(396003)(376002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(6512007)(6486002)(41300700001)(66946007)(66556008)(66476007)(38350700005)(316002)(26005)(8676002)(8936002)(86362001)(6506007)(83380400001)(2616005)(52116002)(110136005)(36756003)(478600001)(966005)(7416002)(2906002)(5660300002)(921011)(7406005)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: apwHb5LisBtty1Hb1k58GulSRYfc4Wv8q7DG3KGfUymuKn1jbMb61V4Bi/kY4fYisJFSAqY8jtIESYIQkgCNmn29AINP6SGkjmii6adQDsUDO407sE0i9hUCxdBIRjFxOodvHTe9UvVQ6Qbcq0uUYZ0FguZcYYnvtOuYf9j9bSOA4H9pmSU50OYocrN7nkroiPFM44FEuSnMI3jqnGuqgg6r+NsSv8MeUFmReA3hK+f82T385FD1BM0pf69FNQID+4AKFdKyTzqmtJ/hAc0MbbxyWg9zqaJnS2IOJXpGnZPBA8cLOM5WA5ZbVmkMJA/7q5/cyc8+uUx0gGZtW3k6PEfZ7ewMN0ZpcMqaTC9/JXBBqMbxI+of1okTn288ITP/s8j+G6FVMpInECTskB1TMIJuMiugsE89vin+RRANrfYc/xlsHukUmP21z7CFv79Rwdp+fd6+FPstEzhdoreOjEyy0DVAy49MAz11W/GHcfNvPJvSum45q1Ob9w0sfJdv93XJJICh/W2tOy6W23Q3nGSNznY3m6frGIoVfxiAuSicGOkYrLgj+xf5ALzTuc7CvSPjKt9GNcLJyQEiXBCSpvU6a6WLqEplTg+hTSmxe7QPWYNz611pjQIJZY5hsZ8Qo6F7lMeewFxmETUnfl8l/XkpP9n+j/p1bFIBFQv1OJCm7chx5C9Bz6N3/8VuLMBDDPkMkaCyOm3hn07yrKBbKrUAi2zYrlgmdSlS4rTVkW7u6f+cVUmY6DSeTyIXEjD1TqX3/DFUmMiTgH4YuvXK2OFuNX+Ayw3OcBdOKZfdDHE/U3XriGH8L5uokch6oc2fQj0Xa/mGfdb8Tn6QcokB31+VBGNjxBFOB+A/iXQ4g164MGtH4K9yOeHskpM2YwdsaFX1piwdrtpdYXVJ7yxhk1ptsP2m+ywzMZivpsBDN7XuhBR4SeHm+0/RRmKgHySOJ0buIV5xwyQ79i0NmeWgOmVq5/rphzwsrGh7IW2T+QtRwOJ+reXarlLCdJyGTKOqokUiHOmXnba3Encvn7OxtoWX+CT7rYeBIDdzqvUfR8KzQTyn8dhrnYRARtWdSYV/L3k1tnHPRNinkBv8B7H2D+aK17Z+R4RwqzMT+Crlj11w1wofYVoGmSNI/ya2crnTnU7SgDffXp3eIz4uvcw0EZk+ErdUXWqvtcpjH6xDWrlvug7odmh/t0RpOtNt13URfxJwEHvq4yfsuH8KMhvm0msasyBUMns+/34IkygI1VUflXVeQpPBV7b1QEWqFxB7WTUmj2oIrQPjFHTQVfywnwooJ1LCOpX/MTDHkw9Zdjizf+5MxnAqpv778Z3oSQ4oNecPhxXY3EcdAMXK4yAYnQ+ggP2SlqUa+A06paRa5JuIq/uT6AzNBUJ/YbNUgyB41h5ar8sYqPcN+5mwXiyZDZuHE0ZR9OMY2pEMirwbOa2z47B+xSYcCnmOz4t0+s6G3uNrC9pjirAaayFDudkq9XcRCYmLTtIgF5kARhjvO9QnLEu7BrArf2k6ZH4Yk0sKmM12YlG36OxzGKCQjE511AS52jfoPAN4TlY9mDrwa41g5ypQadzJhz9axUecw9J5UNn3xhlK0CJ0MnyH63I6gBYv159MzznIgPkYz5qrb94= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b732614c-c7f9-42e1-a6e1-08dc2796b52b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 04:39:01.8820 (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: Uth2EA+pgGVKY/We9lkJyyKutlW6ohwJ02DymlA3zSjToKBNeo1uENmENI0djONXaFsbsfNvszZ+4L02Qc11ubAhTdnhy30x90JTAbAR0QRWzYpEohqqUxribmVsehwt X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB8022 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Link: https://lore.kernel.org/r/9d1e99b0-892d-4a72-a9b3-886b8ed094b0@xs4all.nl Signed-off-by: Kuninori Morimoto --- drivers/media/i2c/adv7343.c | 2 +- drivers/media/i2c/adv7604.c | 4 ++-- drivers/media/i2c/mt9p031.c | 2 +- drivers/media/i2c/mt9v032.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/i2c/ov5645.c | 2 +- drivers/media/i2c/ov5647.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 +- drivers/media/i2c/s5k5baf.c | 2 +- drivers/media/i2c/tc358743.c | 2 +- drivers/media/i2c/tda1997x.c | 2 +- drivers/media/i2c/tvp514x.c | 2 +- drivers/media/i2c/tvp7002.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c index ff21cd4744d3..4fbe4e18570e 100644 --- a/drivers/media/i2c/adv7343.c +++ b/drivers/media/i2c/adv7343.c @@ -403,7 +403,7 @@ adv7343_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - np = of_graph_get_next_endpoint(client->dev.of_node, NULL); + np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!np) return NULL; diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 810fa8826f30..319db3e847c4 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3204,8 +3204,8 @@ static int adv76xx_parse_dt(struct adv76xx_state *state) np = state->i2c_clients[ADV76XX_PAGE_IO]->dev.of_node; - /* Parse the endpoint. */ - endpoint = of_graph_get_next_endpoint(np, NULL); + /* FIXME: Parse the endpoint. */ + endpoint = of_graph_get_endpoint_by_regs(np, -1, -1); if (!endpoint) return -EINVAL; diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 596200d0248c..f4b481212356 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -1078,7 +1078,7 @@ mt9p031_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - np = of_graph_get_next_endpoint(client->dev.of_node, NULL); + np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!np) return NULL; diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c index 3ca76eeae7ff..e9f5c6647f97 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -1006,7 +1006,7 @@ mt9v032_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - np = of_graph_get_next_endpoint(client->dev.of_node, NULL); + np = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!np) return NULL; diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index 1d0ef72a6403..d1653d7431d0 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1388,7 +1388,7 @@ ov2659_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!endpoint) return NULL; diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index a26ac11c989d..9daf06ffedf4 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1056,7 +1056,7 @@ static int ov5645_probe(struct i2c_client *client) ov5645->i2c_client = client; ov5645->dev = dev; - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) { dev_err(dev, "endpoint node not found\n"); return -EINVAL; diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 96c0fd4ff5ab..7e1ecdf2485f 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -1363,7 +1363,7 @@ static int ov5647_parse_dt(struct ov5647 *sensor, struct device_node *np) struct device_node *ep; int ret; - ep = of_graph_get_next_endpoint(np, NULL); + ep = of_graph_get_endpoint_by_regs(np, 0, -1); if (!ep) return -EINVAL; diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index af8d01f78c32..cf6be509af33 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c @@ -1568,7 +1568,7 @@ static int s5c73m3_get_dt_data(struct s5c73m3 *state) "failed to request gpio S5C73M3_RST\n"); gpiod_set_consumer_name(state->reset, "S5C73M3_RST"); - node_ep = of_graph_get_next_endpoint(node, NULL); + node_ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!node_ep) { dev_warn(dev, "no endpoint defined for node: %pOF\n", node); return 0; diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index de079d2c9282..6b11039c3579 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c @@ -1849,7 +1849,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev) state->mclk_frequency); } - node_ep = of_graph_get_next_endpoint(node, NULL); + node_ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!node_ep) { dev_err(dev, "no endpoint defined at node %pOF\n", node); return -EINVAL; diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 2785935da497..872e802cdfbe 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1895,7 +1895,7 @@ static int tc358743_probe_of(struct tc358743_state *state) return dev_err_probe(dev, PTR_ERR(refclk), "failed to get refclk\n"); - ep = of_graph_get_next_endpoint(dev->of_node, NULL); + ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!ep) { dev_err(dev, "missing endpoint node\n"); return -EINVAL; diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 1ea703a9909f..8e4a0718c4b6 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2310,7 +2310,7 @@ static int tda1997x_parse_dt(struct tda1997x_state *state) pdata->vidout_sel_de = DE_FREF_SEL_DE_VHREF; np = state->client->dev.of_node; - ep = of_graph_get_next_endpoint(np, NULL); + ep = of_graph_get_endpoint_by_regs(np, 0, -1); if (!ep) return -EINVAL; diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index 5a561e5bf659..f9c9c80c33ac 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -987,7 +987,7 @@ tvp514x_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!endpoint) return NULL; diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 30831b4b56d6..6a04ffae5343 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -893,7 +893,7 @@ tvp7002_get_pdata(struct i2c_client *client) if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node) return client->dev.platform_data; - endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(client->dev.of_node, 0, -1); if (!endpoint) return NULL; From patchwork Wed Feb 7 04:39:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13548103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EB7EC4828F for ; Wed, 7 Feb 2024 04:39:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D7C71130F5; Wed, 7 Feb 2024 04:39:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="l93jM7wT"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2042.outbound.protection.outlook.com [40.107.113.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D24C1130F5 for ; Wed, 7 Feb 2024 04:39:13 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vfq1ARk8Z5+PJRhQZHGVHVvqzy7s13p10G7Ss92+5ONLfujRJxSct+cQ5ykiMUa2GVXf66hCygUIsvdknI3olpi7qKkLe36hkMAmTKT9QOQsFvrTJG0/LJp4pLU5UZsyy55Zg4u0RkbCVW9kUC+Px+wIaFBoT6OA7R0Q6Ro4yT6tgVBtV0cE9gF/ZWLVp6Ed235GE196Zl3fImsTCaAnRTWcbeZMyjmL6KyspT7ffleYQGrRNhSs6INgZc4boObIV3ahZQLu5znkhTb6qLRuy4C9THh6XqyrYMRWnXIK0FRBRf0FsWS+3pXz6lLNi5HPFbgTzClzGpDCX7qdfk/5Mw== 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=YXY+gyUBLqHr5OVGylRo6rD1OZwlsUDCqOi/+/20yMc=; b=lZO4Dz/GNHo1h09jBNGewKP5aTros4FOvOWP26VM/UB6in1fjCX1Ydzt04DcQ1oNOWsaU/fh8FdOLX1Y0fIIFgUKrLs2RKGc/ABHp2JXP2BVYr9A5aD3rSmvqZVGyY3MVjhIUIomDXsaflbsIa9pvwvYf6TEAPk4SmhEvjtCbTkGXQ/0m1jqaI/D14VnUnYM+g5+w83biBTjs6pxzdKS8Aq5WxGOk7tj46pW+KuXEydwUCQv1osw6JiTFOFMzKF8ieFNrrlMNOF0iSuFI4NpI3GJj4bv9vO9Vy2rgedx3omovxCWVNrOl6y1AnzdgYYEf4y149jVYC6153fcYoZUAw== 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=YXY+gyUBLqHr5OVGylRo6rD1OZwlsUDCqOi/+/20yMc=; b=l93jM7wTF2zOE8TTd556QYt99eVQ3n2ES+gvDh1vespfIi5OHnjKfOFShMU/jupikKXayEhInajhApocMmnm7UvCk/JKe4TkEmGbVzumvAEGPJ/BfZXpJRnMFPdnHqVPLr4fu/vfCe46zpjwTt6qjcDVSDTV0A013Z4qvKerKQ8= 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 TYWPR01MB11031.jpnprd01.prod.outlook.com (2603:1096:400:398::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 04:39:08 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8%6]) with mapi id 15.20.7249.035; Wed, 7 Feb 2024 04:39:08 +0000 Message-ID: <87msscsxar.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alain Volmat , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Broadcom internal kernel review list , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Eugen Hristev , Florian Fainelli , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jessica Zhang , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Neil Armstrong , Nicolas Ferre , Sakari Ailus , Sam Ravnborg , Sylwester Nawrocki , Thomas Zimmermann , Tim Harvey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com From: Kuninori Morimoto Subject: [PATCH v2 3/4] media: platform: replace of_graph_get_next_endpoint() In-Reply-To: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> References: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 7 Feb 2024 04:39:08 +0000 X-ClientProxiedBy: TYCP301CA0048.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:384::17) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB11031:EE_ X-MS-Office365-Filtering-Correlation-Id: f349be94-96f9-4da1-f038-08dc2796b92e X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n9NwH1vAjm0A7H+A7RaQVlgY7l38Wfr4bBws6+kSnFLF1dfcY+TVzL1BlCfcdbnmBizMmfz3tI7tz3e8t096MqPAk/ET4pfpSLwt12LqmnQq0oBJrBX1Mycmg8USG/9p4sAe5Ro0VwWiA6N48xu5uJIWXSQalED+ylV07tg1D+By44dbmouW2drdIJAbCvVoK042RkA/LyNDTF5mYVxj7NdNh3lWk16EVRikUK2/3Rme7uc6YZ0DFT1tucWD5EgbFsRJMPTVyljjemujlBjo+Mfko59HlYJsnZFSqpzK28er16Ren+7dXT3NaWbGHJBHJKEftqQTejKJ5m2MAeFR6gGCHavmErw7bX+YuTAhlqiBWPZzbVmwLT4nkAfKe0dre43m4HcwNBl8S6qLjNZY3mWARqYPITDCt3PFzbIXYB/c49oqlwJaWwd5SerNJLnw0087Oavmn1bwuRfM7aKFVRKubDPK8Kz7HNFaRO9cg7IGtTjVlN7GVMRvC0yM4LE8dQcxavBH9Qv6fPJAHJKte00i04b10FFquJ3O8lQvhY2d2GWJ9NjMYzKKg2CnAFfcv2OAQv9Jp64K6bb6g0g3JogGyEYT8xLaP7k6Y8C60X75h2/5yFawSfxANIfyF+mN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(396003)(376002)(39860400002)(366004)(346002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(41300700001)(38100700002)(66556008)(6486002)(66946007)(52116002)(36756003)(66476007)(6512007)(6506007)(966005)(478600001)(8936002)(110136005)(8676002)(38350700005)(316002)(26005)(86362001)(2616005)(83380400001)(7416002)(7406005)(921011)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RFE/dNmfzErAHBAAKAC/pFNwX2iCwdoPxYNv/pj8Qk/0/IGqria6sA4BHPCm7bAcY0RErjwbDLWU5K4qPogjPtd4ilgTa2f4TguwZ9/npcrccGMrjIOMtSPFT3wFXfLTncPYpe+DcBS8OktHOQi1/A2zau6ibZRO5bjzyL/tBmfbeU0es9MB2wEaiV7+RIsRFxQRrhb8tUHRnU8nj5vNpYiMovcB+DqTFWBqpSe74xjAZFWUecNNbOtrlPZ1wWO3IesPWXJmc9kWtzd3RWbiorOX9zMjoxvpx0XXQIqTbUDdnQJ6HJKlIJrN52Q916C6UWAtvDG39W7pSrmsfroKX5aJxfF1J8Z09dpHxHe6hyf+GnnCUSvEBwVUDsnxPggFdY8OM8edVUwRUaFQ624dyrwcNmMZAWv9O3bKMIwUbAdVZFm2g2dUZg3LvvsZJzYUxnJ60DbaW2mZSy2Xdz4pUZs1HV1apXbDD1aRdp9dohyC+804aFThQX/CPqGEE9t3SpzMtWE+/BM1hjT0AxdvTNRtG7aafp+QYXE+H9h0TR0RvXlofLqK3M0mRBeA/36yQRKxJp+k/2CbDR9wIHM0sr6+JZPQE/soaTPLIAORCNwFDoYBzinfkTsl1kVLzhhMMw5k3atzZCd3qU4gtceaZxz7hvxHPHoNrDplIkLQ9ZsX9bTX6cP6f3O1F3HHKscEfT94Tu/xJ/nrVqhzZSwo5rj7JcZHe+6wWDtJUWPVJaUsqUn0XO37DruuqvwSvLuvV8Tm960KTFWUS9CLsnPuDuyyx/3ue1GdOrK2EEBLjT0wp6+EqCPReJD3FsPueGkWKZ+xJq2/zyhPxauX4xETi0D2d4ACqvDwR8zTElvDPiCn2k5jhP6MFWGV8EiWBwa2ND+D4DqllEw3O6QkHpn02b3vKbhvkmIJBz8ltt9FBsqKSrkAKfZiEBak7OmaodCF2LoeGtLiBR6uZnsl3OJKuu5EKeguO20D08Qo6qQE+eV9FOo7sBHezOwt8FIjdG477bKltUi5prM2HJCvOgogrvvUOb9Sb98df5XBr7j+V5/OZqYekpLH2ft25UmFlAzC+w8hhGcZKK6zMx73g1GlEmJT/QAVPwfv+Y//GbFQ0W6Y9q5o2Zeq35Yl/XNeAwQxzsPmy9fMuFdu7YrLEhhD/6SvNBTMlTkt4a0fgGhFYyuU0+ESzzvNJRNg0YTv9Dbo0J9tX7zkhxOrppy9iLeRBJp6HNSEtj4wiwqrhEtKi0II9FXNvC1tTEFaSx1n4YV8aegE0XBQkV3e64veSwCPGEH9/ZIORNWOPA25XlEUOFKir2SQtjaPBzGtYvVnUYbdliAdMXluA04OxgvWfmKgrz578y7hZoxTuxOgcs3TDW70f5Kl/GkavH1DXQnqM+I9uzhn9ZNKc5eLudFiTQ+5eR9H1l3fYZBQbX7r18rsP9pr3M9n7kYyL17MV6nEg53akzKm+03y1h1yJ2rcgtgoOcdN6QoaOu/uvDdGOBdeMc3iEzSOQAdgk3sYgE6OJLSxea5K0UxTrrvypLxOU265k5YXSrUxJdw/F2A/mD02ETNQdBDnXJxEdTTEhRpjogzcQpa2BRDU4VNjvAPRdFEFmgAJF5EOR3lXWil4oyO2Wl8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f349be94-96f9-4da1-f038-08dc2796b92e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 04:39:08.6159 (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: q3Rxc9V2OMKCYUyLwFnZrx/DwGM0yCB2sxjpATGniPoQybu0GQe4p9rPfpumYj6rS0YFA/EiYkbQqnwjCOuTLvhKgmQ1syS3FHJh/Jp64FuVU/L019kEDFFSxxTjM4fs X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB11031 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Signed-off-by: Kuninori Morimoto --- drivers/media/platform/atmel/atmel-isi.c | 4 ++-- drivers/media/platform/intel/pxa_camera.c | 2 +- drivers/media/platform/samsung/exynos4-is/fimc-is.c | 2 +- drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 3 ++- drivers/media/platform/st/stm32/stm32-dcmi.c | 4 ++-- drivers/media/platform/ti/davinci/vpif.c | 3 +-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c index f8450a8ccda6..c1108df72dd5 100644 --- a/drivers/media/platform/atmel/atmel-isi.c +++ b/drivers/media/platform/atmel/atmel-isi.c @@ -834,7 +834,7 @@ static int atmel_isi_parse_dt(struct atmel_isi *isi, isi->pdata.full_mode = 1; isi->pdata.frate = ISI_CFG1_FRATE_CAPTURE_ALL; - np = of_graph_get_next_endpoint(np, NULL); + np = of_graph_get_endpoint_by_regs(np, 0, -1); if (!np) { dev_err(&pdev->dev, "Could not find the endpoint\n"); return -EINVAL; @@ -1158,7 +1158,7 @@ static int isi_graph_init(struct atmel_isi *isi) struct device_node *ep; int ret; - ep = of_graph_get_next_endpoint(isi->dev->of_node, NULL); + ep = of_graph_get_endpoint_by_regs(isi->dev->of_node, 0, -1); if (!ep) return -EINVAL; diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c index 59b89e421dc2..d904952bf00e 100644 --- a/drivers/media/platform/intel/pxa_camera.c +++ b/drivers/media/platform/intel/pxa_camera.c @@ -2207,7 +2207,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev, pcdev->mclk = mclk_rate; } - np = of_graph_get_next_endpoint(np, NULL); + np = of_graph_get_endpoint_by_regs(np, 0, -1); if (!np) { dev_err(dev, "could not find endpoint\n"); return -EINVAL; diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c index a08c87ef6e2d..39aab667910d 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-is.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-is.c @@ -175,7 +175,7 @@ static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index, return -EINVAL; } - ep = of_graph_get_next_endpoint(node, NULL); + ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!ep) return -ENXIO; diff --git a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c index aae8a8b2c0f4..4b9b20ba3504 100644 --- a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c @@ -727,7 +727,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, &state->max_num_lanes)) return -EINVAL; - node = of_graph_get_next_endpoint(node, NULL); + /* from port@3 or port@4 */ + node = of_graph_get_endpoint_by_regs(node, -1, -1); if (!node) { dev_err(&pdev->dev, "No port node at %pOF\n", pdev->dev.of_node); diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index c4610e305546..ff3331af9406 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -1855,7 +1855,7 @@ static int dcmi_graph_init(struct stm32_dcmi *dcmi) struct device_node *ep; int ret; - ep = of_graph_get_next_endpoint(dcmi->dev->of_node, NULL); + ep = of_graph_get_endpoint_by_regs(dcmi->dev->of_node, 0, -1); if (!ep) { dev_err(dcmi->dev, "Failed to get next endpoint\n"); return -EINVAL; @@ -1907,7 +1907,7 @@ static int dcmi_probe(struct platform_device *pdev) "Could not get reset control\n"); /* Get bus characteristics from devicetree */ - np = of_graph_get_next_endpoint(np, NULL); + np = of_graph_get_endpoint_by_regs(np, 0, -1); if (!np) { dev_err(&pdev->dev, "Could not find the endpoint\n"); return -ENODEV; diff --git a/drivers/media/platform/ti/davinci/vpif.c b/drivers/media/platform/ti/davinci/vpif.c index 63cdfed37bc9..f4e1fa76bf37 100644 --- a/drivers/media/platform/ti/davinci/vpif.c +++ b/drivers/media/platform/ti/davinci/vpif.c @@ -465,8 +465,7 @@ static int vpif_probe(struct platform_device *pdev) * so their devices need to be registered manually here * for their legacy platform_drivers to work. */ - endpoint = of_graph_get_next_endpoint(pdev->dev.of_node, - endpoint); + endpoint = of_graph_get_endpoint_by_regs(pdev->dev.of_node, 0, -1); if (!endpoint) return 0; of_node_put(endpoint); From patchwork Wed Feb 7 04:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13548104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65B83C4828F for ; Wed, 7 Feb 2024 04:39:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 97F3C1130F7; Wed, 7 Feb 2024 04:39:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="X6pDPDH7"; dkim-atps=neutral Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2078.outbound.protection.outlook.com [40.107.113.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 733451130F7 for ; Wed, 7 Feb 2024 04:39:21 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=atGuOd8eOP7QIt98pUbowHjfWjbJs6DGhRZgFuQeiDYq9OGTOHSJ8ZLPqipOFC2PorbtCfg0oQDM4aMBv33LrKnnQxckQIYa19DCxa+Q/mJPzvxtd2gsxAoSW2uN8ReSyASfq27bjzXZwYDMqtcalJIHlQ0bjC6Gknn3X1RONDM/eJOD74rMBtKnah/Zcl+J9ajeAPaStkOsNMoDR2j6qhtIACIJab0J1gjWD037UTugb0slrLt0wWm5XMHP3C0A9QlW52WrfWrWtqwXCE/gUdrZC3rtbzvKjh22VLP9qTwyI3w4i1UkHy36J0ZkR0w/gyrgVz97Z7OQorEzIUKYsQ== 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=iPWy+PYtnAvN+6i0I6jsdtewufqRlqn7Qxjn1KjTnik=; b=N2NohMG3QTZiRe+pOMd4McDZ7t8SyyE0URzxf3tYs9W4uT7RtOcnvbbD2pZOMox4HkeuYs7G2NCNdoLtSM3OfdYE2/TygM0XZYwdrKa4xLtKWjVy20w0QKRk7BBnF/SDIQy1OlakgtXafKUNsCOeY7/0NELrD+ytKQakwz9227XRLygHMg+aGc5aPIdJQqnfZcmXPyjUZLbxhsaaFtzFx81dY3odvmVvgXlhZz5k0xwfFIrN+8MSmBcKwHqxHG3/8WNdkU4XWqf3HgjgZ12BtUhYaoloRHH6+gkexMLx6f0e9qEgvypLi06ZPn6+DIm8zYhPwSfaSMrrsWHm8yvTPQ== 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=iPWy+PYtnAvN+6i0I6jsdtewufqRlqn7Qxjn1KjTnik=; b=X6pDPDH7BmzEl7c98SJRFmCYn+o6RQQyV2AAKIaI4YsABNaFyspxfuveUHpY4ongSrNxC9nnBGOe08/qXVgswgJy5QZl/RY3jCNizm8qky04XyPmeZYQ5R5kK03fgFk5HWPrpDLySPIr5s/hckUTVNoq9Ql3bG4OhmIedbZdUVE= 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 TYWPR01MB11031.jpnprd01.prod.outlook.com (2603:1096:400:398::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 04:39:18 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8%6]) with mapi id 15.20.7249.035; Wed, 7 Feb 2024 04:39:18 +0000 Message-ID: <87le7wsxai.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alain Volmat , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Broadcom internal kernel review list , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Eugen Hristev , Florian Fainelli , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jessica Zhang , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Neil Armstrong , Nicolas Ferre , Sakari Ailus , Sam Ravnborg , Sylwester Nawrocki , Thomas Zimmermann , Tim Harvey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com From: Kuninori Morimoto Subject: [PATCH v2 4/4] video: fbdev: replace of_graph_get_next_endpoint() In-Reply-To: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> References: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 7 Feb 2024 04:39:17 +0000 X-ClientProxiedBy: TYCP286CA0305.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB11031:EE_ X-MS-Office365-Filtering-Correlation-Id: b7bbf108-d290-4126-18b2-08dc2796bee3 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bHasXoaLSyRZ0+tbjrPUZlzlDCAhap6HluvvV7vtAGC5dQGVmg+f8yGl7rsxr4K1V9djMWGwccLKKr/WE0wf91idrO4znZux36ivIY4zhXnGY2SDizUpXr297H0I5ulwlIilRTT8xVurB7Z6LorJHz0qzwpRHr/hGPUKApTANDrHBVnBPo5VfqokreYLnxmRkJBHTfB1rYWHnZbOC9R6wwvXl+U8i1EHl8GdE/s92k55NTwRoTbguzWWRfUVUoJvn1Ll6c12gFe8Yq+Pe9wDxAK1nn5Gi7O6aIfEF9bkSq4nRi63soottsYBvsBlUgUtk9wgR0D5loxvvxjB2cwasC1UeQPVygiw0gnQffzbLipDM0ArLjDztoKiPsFxdc317AlJ2zVH+3BVN+QY6pBuL+R7M948BMMiEtS6z+hjrqFmm0NPLhi1R67f/tCJV/UwzKW5ky2gwC91zYdQsk2kp2//VtDI+BoA+cGnuew99Zjj6O0op7DcSyVrfyyWk/eHV3yGB3rP1pzNsukDGNhity21hjlSCa0MKBtaOtpcrcgLXrRcH+9EPX8skuP28Ve/i5RgikQ3dXoCCQgvn4Fc8C0ENY9IQBLvxq339FqiMH5tQbns2W0w29iaXIkBMtGq X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(396003)(376002)(39860400002)(366004)(346002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(41300700001)(38100700002)(66556008)(6486002)(66946007)(52116002)(36756003)(66476007)(6512007)(6506007)(966005)(478600001)(8936002)(110136005)(8676002)(38350700005)(316002)(26005)(86362001)(2616005)(83380400001)(7416002)(7406005)(921011)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3FCNt6ZZ7I/Pr/4nlQu6MJxi0u0/fUtTBnsZGdC6hHbWDKArJNX/urFMAZRujXqfvqmnhSj7pymLVmTgCn6L6xEVuAYG+LESmSkL+ZxZJQh3R+oZrl+GnG+qNcJyY6M8z9Kx+hXX2JxZENWddFTIjhjuNAZjK+NvZiwMCWoAqVcwAKAb2d8otfhDrEptgTUoWM1unJVs2FfdKQl2T/h4xjp1hoz2JsdENSho76aD9+mxSn853Up1CWMuVlO/jv9Qw5LUw20Hn1C6rOhXq+KylRMMzDXkURCCfuCI6fP6tWR1/k3s/liAZ6QvUWcQezgz7Z2T8H58T9nv83Vhlk6gf6MRSTLWQPDJaw6qAJkwWyRoaSMusDVuUWdBlfqPWDWyjeNox+vBBetGNlt2yprEdYvijfQ0oMP1kIlbFTWi7TmvcAQjiUL9zIiuf3KeqQbZitgpbQZjzFMtjUuUnYaIevOxBt9U4RS8ZsP89pGEija9iqNM4yFNpEZQCwVxDjn3dENm9SjD5OO22g1ay4t2p8d22gsivqgtGyXLA/adWoX5I5xAM0jyRzv+yHRa1m6RuwG4+TFs3ouNaJU9L3tkGHmPiUGj/gDOXMy0mi1PmE6AXyyTj4H7aEDn1GpHjAL+imae/6MoD+MdyV/KTg6IU49RBdNvqCfbn38jGlojwIG23/m1dEVu5GLBLMx//cTrDs+He0psThsSEAo6xJFY0QZSniShq8KXlWJ9B0QFeUISqIoVlSbKTADpPqTS0WhGt+kMWTLz5S1zM6sLlu2MW/bVujMP1eC0USjrX267BS0dYpef9wLmm7B4jBRtEvhWoa+Sf0jDBHQO10iEpevi6A0sHaK0wNKNklqwppRes1o4ru8MgDtyo6AacpNYMEmaSePts7lMLumPJbs9LhO3vGrwiF76DfY3Per0E3F5RFwkLSWsaOxASieIhNnl8T45iNBHlq+Nhf0trFfCES8DuJYxvQks/2SMUerRtH0Hj8tnzM7S+Ae0p1V6JmRG+nZ3SZczz5fFIXErtupgTN/d1BixK7tRz3iY1eAVRrqyTDCIpGVN9Pi6m5Oi67bf++N1v0JOW4HJuDZMsIYqPRazK3LTBegNWUZ8EtfFx5dM9LLV+3JYkD8wmfM4z7YNJh/gUQVB4aa09oWTIBwRqLqB7h2OsoWCu2i4hB9FRR62wRnxpYqnbNMaFfGV9/Nmg0ESr+L7QE8pUevY4swFMc9SGbS+eGVWSxuJ5Q1nxWdhv/aIlwksJvCTc/qQmn56vjd3DvJYH+YlZ8DK2v5e5dTnRCZd/IPK0hGkl+qaEnQ8O6wIhHcsb7YlEAzauZVcSIsCa+X69uqe0EcriX5pu+KzrzcWjFKHUf5dutsFzbUq0F+DsLDkIk/n+9Dj00m+P4S4ISXaNs+pWvmT54aRsDA4eKu89U0xSxcacN4mi0amI4GIJv2RyOLmnvXBuJ1hqZjt27dNehMo4NBc+gKBeuEIo9UnDmdigI853VOfT0UqK5SeLrUrSogubKggbo1LvqqdcpB7mT04IiCLrLImTY5n0q2xOOo1UgwXZTuSjSCF2XMJhRgkbK8Fpel70WLvP6h2voiQ7dwZM6z5uJUmO05wIE8Ec3paxtv3DlKs/ulOb2Q= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7bbf108-d290-4126-18b2-08dc2796bee3 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 04:39:18.1674 (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: kAGADB1N3w59RbhRwKjgxftugaJi7nRbpr9cV7P4lk3of76nL6u5jbPXfKlogXTSzJKDreGgYg+8y1XsgjNDZZhEIqiMqLRRTVV6CmigAMVZIumN12nUva2Jfmh4zbex X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB11031 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 20 +------------------ drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/venc.c | 3 ++- drivers/video/fbdev/pxafb.c | 2 +- include/video/omapfb_dss.h | 3 --- 7 files changed, 10 insertions(+), 27 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c index b7eb17a16ec4..1f13bcf73da5 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -5079,7 +5080,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_endpoint_by_regs(node, 0, -1); 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 0282d4eef139..14965a3fd05b 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -130,24 +130,6 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node * return np; } -struct device_node * -omapdss_of_get_first_endpoint(const struct device_node *parent) -{ - struct device_node *port, *ep; - - port = omapdss_of_get_next_port(parent, NULL); - - if (!port) - return NULL; - - ep = omapdss_of_get_next_endpoint(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) { @@ -155,7 +137,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_endpoint_by_regs(node, 0, -1); 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..8f407ec134dc 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include