From patchwork Tue Feb 6 02:55: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: 13546560 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 32C20C48260 for ; Tue, 6 Feb 2024 02:55:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A9DE112418; Tue, 6 Feb 2024 02:55:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="h2bRmjjO"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2126.outbound.protection.outlook.com [40.107.114.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89CEB112418 for ; Tue, 6 Feb 2024 02:55:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fNA5bWN2CzQzAJ0j3UvmO27lwpTFtVASzlV5cvbKabppLC6WcOHDPusnA/98cVepW8kvIo1Qg0YNBwOOkySC3l88lJeuG8HH8UUH+S1aMWRGzs0LoRh4o6jVIt1zSqu4/1z0y525cLgj7yWuCu5R4Qs6KPuJP/U4agCmoZT3KwYBk/agoue9xt6rl87T7AbR+RmDXpZFsFHnWujMDMnXAzbp3+TOcVK4R65ZE7N3Gy28PT8SjDSaeC3qkBENM1Y1/X2b7r0/2BC5uEncZvqk0qpYXT+JGSRnN9Slmieb1pU6WsBqZVWZG4/ZPPawZY9L83eMTDFdIj4I+A7bkMSulQ== 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=iayePQaMqz6HiATSvdbrEEMINCdHsBYoIgHDVRwiAQI=; b=dQobejUTQSbZyWDAiVpPzgRRHIT8LxgqSPyizzoCJmT+vMFKbdl/qD3UsEp17A+WegsJLI7/6KKr5vuSS8oAabB0rcRQ7pUAQK3pNfT6/t6SA+Pj+pMNp/XZXXCWfPwIh7/9S4hQK1ylMiR0yqJ5eYPlvWbSIV9ZvvE3uNEMhHixFOoFU+TPSI5IsXDBmKE3WTvYouSCl0y0Isq09CROE4vm20DTYgUBrILz8/5Ta2a5W2wMVJ0wJEpbMEBVKlRljOu4q86rLh0G8goDNrDG8p95DTdlSDzPZ2ikJchyRywEfIQIeUJ1KV6FQHGaFo87UfCciO6cK0LhweSkDMdb+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=iayePQaMqz6HiATSvdbrEEMINCdHsBYoIgHDVRwiAQI=; b=h2bRmjjOK+tPChod8dwmkTXoFqhpucnavJmzx59h0Oj1rGQ32+kxHumOXHKCjaKbixmiMPBEsGqFjxf4phLommipj6/Fs755swOTHGtHgWdv5gAwZK1P9sLK5GAhPadOnk8H0pGgdREiWEvbLYaEUo0v39GZ3+EqssMHE9F5ybY= 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 TYCPR01MB9700.jpnprd01.prod.outlook.com (2603:1096:400:220::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 02:55:02 +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; Tue, 6 Feb 2024 02:55:02 +0000 Message-ID: <87sf26nvy2.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Biju Das , 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 , Russell King , 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 1/4] gpu: drm: replace of_graph_get_next_endpoint() In-Reply-To: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> References: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 6 Feb 2024 02:55:01 +0000 X-ClientProxiedBy: TYCP286CA0229.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c7::8) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9700:EE_ X-MS-Office365-Filtering-Correlation-Id: c9a48314-7b86-4a7f-6b68-08dc26bf03bc 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: +P1Cp0ZhdoF44ZMT5+6/wCc6fbUn0q0gKVq3R40cRq12TH9FP8ok0wLpmEkWZxEdP8wxzIlS7grwe0V23M4oexJEZweUxtyh2mQqAYk/WbzzVbZWCmfPMXZtgVtQJkpHj5f3twTtEynDcRYKYJvbKjNjjSburHLWgSvuZl1GMF090OkqCcMNmD3p4wOo4CbXcQtdv9OjSsL12fdmTNJ8vjcBwjzB1JkVENyuMgslD+SVkQxQeOpvFmwc/gNycbH/YsQB80Pu22q27K9eFacPPCtL/BPDCts5I3knGnoBv+F1jsLIPioVbaaouAbLAhKkPevDB4J6wVex46PuutghStspCRZJDc9zUKrtGBaV+zTXoK9Kal62x/r9jpsEP7RKZvNO4wp6YhRZDGxcTnikCTRSMGhbVz202gp5BRLW85XmnkQFc0nPvozm4p/+AcT4HSue+6Mm6qSRYqMJXHPhJzYmoMEhmrIP0ouFfLC/ulVY1xFnmre8zTry5jq156rz5Rw9isqf1gMaTxcuq0rtYHQLXMjpwhysyOIwnnWpnTVkajCOifBA10QBxXPdLmjM/tFkZa90yPLWXZlAR4+GrTyyX4JdDm05lK53+QDHZ5auxZX585/XQAWCumbaVxxz 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)(136003)(39860400002)(346002)(396003)(366004)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(41300700001)(38100700002)(6486002)(110136005)(966005)(478600001)(36756003)(6512007)(6506007)(316002)(38350700005)(66946007)(66556008)(66476007)(52116002)(2616005)(26005)(86362001)(83380400001)(921011)(8936002)(8676002)(7406005)(7416002)(2906002)(5660300002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y5JYXDZgyjOB0/l25KvEKnw2Ztyr45wlD1GWHJM9Re8fCAaT8peLiS8EfE/uhUMDu+zPETuyB7htWRvU8Maji/PevcO9NObyVbICNn//hIuPlWEdtWoFYVZ9tWEGrCb5RiFb6G1MmAqELKXQd32923QUYnGJ45na3rY5QaNzbOsDYvYgYVrWmOFzVrgyk8WSt9RPPK2vB6IV+KCBx4OiaGSuoxsL+Je6+n66X3TX298OVVAkeewfok9RSWs4sx1pea7VLOvZzXgZ93EX5u+v8R1hUTMQyF4wX7sBjwu8i5VPbcBXyzvcRdt9r2g8/6sEqNrs0hy/2DFhzPNstoyRKnp3P9gQDEzoMoPY30Q0Wmthnk/HwC8JCQmmW4tOIXOUpDmtx/9xW0To/+fc3B5LgUHCU+rxOipgrYCL9WqmxzkfqnhvTLzefqs2dcY2kyfJIq6JOMmCWyivyJm27fPRlQkTt1mTVFcNRrtSZEJXyVLqMb62Yo1bMuCwQUbeL7ANVRK3a5SGzjgGff6dAHCC1ZDuhwwREr8TM225oMftSnO8JFJLrGMNYVwMk4fpZiS4hocRHe/jPh9WhitAbUxBM/AvtjvUZJml48wTYlt50ESi6kEg6KxlgUzWg5Wtjmd6B12Gwz6PJ6JEz3RQWIK2ThWhEasquL3AGdsZAOEHgXY+tovBT9AoUOVD/bkf/Nom19Q2/CWEVQdOq2OxiPOeMDO5D1T5EdMCub0FrZbvDNqt1Qf3Z+Qn0SKBumMuNJLVF1TKLBZSvlMhFXaTjAkro9hiyk1gmDFReygQzGsCVPymqVfN7ulw5RiyXUeRykKOPw2HTe3KONWzaWf1cqzdnz1rnkMvci9lI4kitVobBEnXB+zmIDP9vauwcusqxz+zHLpl/DxeEtuTpJgVdaAdNd4LrxnjnF12HV62+3S3LE7tq/fxT67N11oOC4jB42gMrHQBhQKy4CEB/l75MZQNwqToZ56rcI5gU00cdLgF/b/hQPSkq7mbUuKZN1Us6CUiIjhxYldYsG7h3BU6Pt3ku7AGfzDMBlrlcmgXVIelg23kmivgQdm6p9BpoDcRFNa0RzBBmICxPtXI76IogU+iDDgNy7/FlAzKoNiEflT/rCWtWzWhYzAQ6YxI/LkqN0U03lb4Fw/NjNJBAZjO+1/FNWrpm8vsuK8ZKZ3EDj5oCeUdBtAdJEjxsAkY3aak5KC2HEuJGdnUVH3JrTPwvZsjSSrbJcfZrw8VrWM00HpRioi1/zNAxaUEa57XCR0qBRS3y548OSyFM5akg+0tNjHsrNZdUZEVmpm9Z9nba7WXFichOHUJpt0Bppo/jqwBLUu0AZ/5of1Q7Kl8pOLPa4dlMaHOuMlWn5N1s0A3weh+cVVYZGXKza/dbogHEHgiSt/SbYeSwRmah8td1noe/QUtoCdsPpEf0Z9PEdy6RUMx1m7tJCSk3ggqll6GoQ8dCR8pJsH27RzjIu7l9LgNzU5qkjC6RnV7J9I87nXvJdIFegQRkEod6snhGLM6hH7AaykIsaiVau6lRKxgx79Kn6ELKMuICkrqguAmqPMKjkQyyzMBg/FQR4AkMfyXqoPz7rMgDyDkKX680VD4wZTWGapjHdPKyg1zjMSphzPmldQLDtg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9a48314-7b86-4a7f-6b68-08dc26bf03bc X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:55:02.4302 (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: SriNZuDemdvq/9XrEcHo3KBOoPGs6ac6wbhViHJ+q4I3WwrZMocnWqyBEYeN+ujBGy3BhSUxSXR80TGniGlFEcnDpjeSUv9zdFFuxZnz3QUZW8nsKctPt4ZTN3jheWpi X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9700 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 | 2 +- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3..c2eae9296012 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -516,7 +516,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 e5b10e41554a..04d0053b9315 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 Tue Feb 6 02:55:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13546561 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 550ABC4828D for ; Tue, 6 Feb 2024 02:55:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B123112836; Tue, 6 Feb 2024 02:55:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="NAr3Vr4C"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2090.outbound.protection.outlook.com [40.107.114.90]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90C0B112836 for ; Tue, 6 Feb 2024 02:55:31 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D1bHpwruqJ0OOZuDSty6mwCooyYXCJ0xqCh9VuO+eKakUpStSuXNy/6BD6HnQ62gcNm5ZmjWh50rkCBcaE0/CP0IhfMlAdT/5sNqLMGansaxN7WRhQjMcrttUQwjJjCgGB0a4gNOUyd7zdflKBaVpIrXvJ9XXQt6Obi2bRf4mA2mBzR/AwABoxtqhD4u8Qii5d3X0qIlcJsNE/FaBQN3I4HJ27MMduc+Z8xBbmDknckyUEIeRGwbuQjsxgi7PahoIMJ3DNF/emExTNL8WeyXKML2NVp+OR1Ijz+GGFzodX7DTJHfNmRSKi2lsnUImanMluRAgiL2gEJvtX5QE56HGA== 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=1VV4/ffkqO/ev9swuxYLRk7E6rz5r7KxK+E6dLyxICk=; b=h0CEE6cYMm2o7PPhz9jNedR7sG0cPcDNN+YscGKv0hutBMp94GwVgM04rWGt2f/JKV3voNjJuTT+274MTKaAJ9HAsE2zHOFj9QnmmNuIhGG4n55/9B/dVjsNFP2bFWmwmVJbfhs8I4Vj6Rvq4YBakEzwn/6sE7RnybH6ulA5aDSt2ZSmT2f4Opkz40A/z99RfyUYg/j1KUUOkYHFXUmQXgBBlnoVpip0EIs9kv/Y1sPJY1xb5hwtMWDw5Um5WpTBTH+dk6FjCNUg6FJA90j75dN3N8lvwy6ACPI0wbFPzWX7FPdtYGWB8r4pf05In4MGR6VO0h47jMwbwlF3Bbtg6Q== 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=1VV4/ffkqO/ev9swuxYLRk7E6rz5r7KxK+E6dLyxICk=; b=NAr3Vr4CmsBtFM/AykJxkPKtd0sExk/LMWLF5kWNU6zV+7RkwXNsTQfc4/ZfUoPMUMcQWUbBfiVYMRsLY9eniH9Bavk4c8qZ0ZAnmpTNnsSrDxLC6fj6vZ09vIZuhxtHrLukCjHh1Muy5ND5ccsoj8HJFs9lRBijxdYtbZQsxps= 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 OSZPR01MB6229.jpnprd01.prod.outlook.com (2603:1096:604:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 02:55:28 +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; Tue, 6 Feb 2024 02:55:28 +0000 Message-ID: <87r0hqnvxc.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Biju Das , 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 , Russell King , 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 2/4] media: i2c: replace of_graph_get_next_endpoint() In-Reply-To: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> References: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 6 Feb 2024 02:55:27 +0000 X-ClientProxiedBy: TYCPR01CA0044.jpnprd01.prod.outlook.com (2603:1096:405:1::32) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSZPR01MB6229:EE_ X-MS-Office365-Filtering-Correlation-Id: 175882e9-a46e-402c-133c-08dc26bf12fe 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: I9CG1AY4LPhmLxU1AF1EcNppoDbuXCN+jyR/tar3bGOMeAleqIgn5ZEFPVgWjCGY2ahA2V3Bt18ChK5+SmpJKt6VzIWdApyQGrjGWUiwNRlOD9l1XKDc2ZWUdpBkCG5Jy7UA2SzFyKOG+HcMF/w4EUQ/O8nByzBKo5Zc36SategG0juNKSenvJ1DmgoRpXVdmampw566+pSzqwP+Tq46QE0bizBVJ6mes/4JO3Yu9RB6PdkI9vDuHayQ8Qfl73eJVCTipWQJEy7SCwMSjRcs5zXGcQT7lqkAA5fQAkEeKMQUY78mTwVllbuz7ypVRU5x+8BFD1IhPpr+Swt/VmbDKix0rbMz8Fg0pCJjTgmh2XHidt72JnfG1aPouYU2ZyaATwwRQ/QsvJWddSelOJY9U4gzoyz2pVvaQoPzBKvT5PMYGlZEC8GIMMhbl/jDLKAXvWn5WdCvvDhLctEuTH/mhmTxlQjV+HTNww7CIfzvt0RfKPrTI0tNOSqnx1BLM4gR7mCSAitRl9eSzKCAsKm9VKGJQuIY1b9qzmHpxjcumrQfmMI0dRXYjNIzLR8Lz0EiozFwVbU/xKaGKhYmuHOogmneQ5OCbEfEE+/JR/jHZpSWUzRE0GYsbVF6Hms5MTUW 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)(376002)(136003)(346002)(396003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(52116002)(6506007)(316002)(83380400001)(26005)(86362001)(2616005)(41300700001)(8676002)(8936002)(6512007)(36756003)(921011)(2906002)(478600001)(6486002)(966005)(7416002)(7406005)(5660300002)(66556008)(66946007)(66476007)(38350700005)(110136005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XQfCkq7sVUFlm3rLzOx2aK/Ifw1fo0aMCW/vY/p/+L5s2uPtrWyLqjRhzD1bKRlFCyBADdzJNOTprmolRqG2AYkyFQfnDO/vTU23hCsTAu5bpbWC+BFp2ToBWSVL4CaRE3yI39KtbwwSg0iodyVEcUHUTV6CDnBfFk08NNwLVA5NZSr2zFHW6nBgwbK4oUcoXpO6MUyncg/jJ42cUykFKNdsEKeWTbMWzOISqWJNwnQfHGAzf61k3OGRzmysC35ewiOXswPq0vx5375UgOMFUr6TGiEpSG1H4VX/tlqkFnc8/NKRCvoviIPyaZTCgh3TEgu5aHyx5pIrt94jjDDYCkz+5aY1ZuD35OJVoTw8NhxvDf3ATeTMq3BFFM1SNtU6ts/HHnjxq6SNcA3ppHkvZCT2eksz3/ASI/cx07bOyFUqaBdBDzqa2yK8mjuaaOFKPhpyc9sYxbZfVW4vebgUYIXjaD7EySJnV6Xrse8l3BNhuIPxJyQzFCzZXnRe/T8idIl2Q6YwI5AYfHMMY+s/+5x8pUc4hikU3t1Tw30kC3wpobreVjWVIyialLPKObzSlZfbR4HbY/mMuyrlwl5NiKyj3GkZ0wXsIi7VGEhanoWnpQSKl1WK2h050BQwh4GFy5SjQ8QraxHGJe5L0r5emuv2MA8faLDOdh/HKDbVcT5/Um0LrEXJGYoKNkx+YQIwSdRshkV+d2NcwI//2OCFY4ukiVwrE9rWG+KBW4qnnJJKKZYKGibPrbigOOz7RDiZQscftM1ewsbUe8JYHZeyragCyRdn7/8sJZLadPvQJV+Xbfrnu7XBtisrsS/PGmJNu57Thj2wEVTplUT0+0lO66gEEhfJYjK/Gq0qvs5U12ZvY4BHmIm1CAna1j5YYcU+S4DeNCB84hN5gfwLnmOfpkj+btre9F6Vw9dMQszc9VE2pMfTZIouI6WaKwEveJUQpUSpyIiN95UliHOSF7rNqW/sKckGDovBgI8QopU2pftPFRN1/EJnJXnwn83bAkfHqKWDSppfDwCesyoVsQuN03GfOHypD1xMdtZdsUfwcI+HQDezd6Ao8p+nuK/hRHHgAKbJhg84NjT9nE9Z9L5RQ/9uVg4J7o06lt4V6zFOaO87yeeFv2iNNcp9jKgo/gMYXytossYuw7h8alLITi6NPAVUblbgE9d6wbXpdO7k+c22AWkmUBohl/uP2tjrgikNv14b7ZdnYDJOHKdmNI5Gj8TmsHJXTCtX58obEDIjN+s6ef9vuFPXw/v0kr0Jihqhp1i1l3PJ/Gy2dpNiI/ajFQYW4whwcLUHKR0cdTjImewWfMouWia2V41eMR+5ZbajdaYPlUUuhGqw4RY/UQh7SuFZF4LVrTSliP8ZFqlo5PW7liGGL52uMj6TpvjeepqPPCDoyGCdFkmbUTS1KqI/eQDQKHX1zzfx5VhGPoRJvs4Db4gVeGmcRjyrD04VEyG+/l/xaoTr7GxPytM7fcPCzcTwTE5pdqgM7CbDahUEUlNnLfCi+4tYbrxgWbvf+49Ngm/x6U76QqM3C5O7/1NZX5UdRVhS9j/vloa97IwupF1yfaM+pZHD0ldojLK4Iav1vmZR0saf5n11dI9ij9q3PDtXV1VF1PiQrJ4ken2Gkzs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 175882e9-a46e-402c-133c-08dc26bf12fe X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:55:28.0183 (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: 7/3adFv4Da0JJ6VZpzYovWRMrwR0SHnM95jHfC9dAqtjni0siTPdGstDMZ1inWe6nxvFN1pMkfUe0a8aM4J/Y2k29z9fv7M48Ijc2K8KeHNmqOq6u4KZfebzJ414NUWl X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB6229 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/i2c/adv7343.c | 2 +- drivers/media/i2c/adv7604.c | 2 +- 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, 13 insertions(+), 13 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 b202a85fbeaa..dcfdbb975473 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3205,7 +3205,7 @@ 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); + endpoint = of_graph_get_endpoint_by_regs(np, 0, -1); if (!endpoint) return -EINVAL; diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 348f1e1098fb..c57a0d436421 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -1080,7 +1080,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 1c6f6cea1204..14d277680fa2 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -1008,7 +1008,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 2c3dbe164eb6..edea62a02320 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 a70db7e601a4..31d214bd4a83 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1053,7 +1053,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 dcfe3129c63a..beab2813c672 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 ed5b10731a14..aaec5f64f31a 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c @@ -1555,7 +1555,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 67da2045f543..af7e49e6cc5b 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c @@ -1836,7 +1836,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 325e99125941..662efd5e69b9 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2307,7 +2307,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 c37f605cb75f..b1630a6c396b 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -988,7 +988,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 a2d7bc799849..8e58ce400df2 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 Tue Feb 6 02:55:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13546562 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 904D4C4828D for ; Tue, 6 Feb 2024 02:55:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C4F29112838; Tue, 6 Feb 2024 02:55:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="jomGM3NJ"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2110.outbound.protection.outlook.com [40.107.114.110]) by gabe.freedesktop.org (Postfix) with ESMTPS id BAA7B112838 for ; Tue, 6 Feb 2024 02:55:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N4gX5vAMbVGbRAdQwFmS5h261t7aGaDA6NGQeMAzTiUyNab44irpMePUvdXtrAm3VdVioPtDzBXkdEWqtbYSiwwoBzGuIfYvWb+khAKR6LBEuY9tOyf38utroHUok8SZnekhm84ttCAaknKEioO17+b+2xWlaegnbTjEEmkQ7ZpEqE7drEv+SPVhFddN7eOKRxconeMoQxjOSXeUYoZ1mF4Xbs+YBaayB3TtS7v0BP/SnllKN+P/fL3TkmtttFN1a79SW628Vt23qHfv3T8iigzHK60Oyr4gqbnkMgBRitJeSeUsk+yGEhX70iPrdbTviiXluHq9vkyRLpSgLkwJeQ== 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=bXDCKdxu3XbL66spWq/h58bK8M5QiIyVMc6zZQ4C/3Q=; b=GqkR7q87sc38HAJ7QdIzZUjN1BxfvNBTPUYUTMBn4wnvy2+EQM0dZwTEfPpH73twOrBbIp/RuzK4L5g/ecqx8Xs/wnxbwHaAaG19bO15ZLMfHSSuwVDYzk1HGwgTtMl5gibeCVowL7UK2lAX0oBX2KWaOUe7qc7YVCgXIuxH4CyGo2PDBx5EsVE54zJMqfbZGsg0xFn0OfZauuTLO6XUs7JAXciThcl56+W3jiZsu5ki4n1Pv0OV4RyHHvziAmijqVzKTdXTRMTqejAZJ9eXzxav7INAeTftI/EAYp8Uxyj7Ktw/XTFRjyEvXM0MMNUlugXJ4jykgNTf7PI5rckrkw== 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=bXDCKdxu3XbL66spWq/h58bK8M5QiIyVMc6zZQ4C/3Q=; b=jomGM3NJ1ZoZyY/ofbIJhjcUoZi3otYTKwUft1mF5ipCWafXztAiwtSRfqYHKoz7Os+24yWWOA+Fbks/ISXtqCGV+ZikNcseUcJuPbj2CNyLu1dyUFtl1Il9OECefcbZKMMAln/NAT93KvsqPMdiW2SxwZDnOD23bZkindcPRSQ= 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 OSZPR01MB6229.jpnprd01.prod.outlook.com (2603:1096:604:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 02:55:38 +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; Tue, 6 Feb 2024 02:55:38 +0000 Message-ID: <87plxanvx1.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Biju Das , 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 , Russell King , 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 3/4] media: platform: replace of_graph_get_next_endpoint() In-Reply-To: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> References: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 6 Feb 2024 02:55:38 +0000 X-ClientProxiedBy: TYCPR01CA0080.jpnprd01.prod.outlook.com (2603:1096:405:3::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSZPR01MB6229:EE_ X-MS-Office365-Filtering-Correlation-Id: bb2c7cbf-6aae-4fc2-133f-08dc26bf1948 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: T5dXkc08EDap3nYib0ZnARp/E8xbRt1e9jCc6Ipje3wDe4L0ZDLTuWa6pnkb6rJDknP0txwu2QVPNSCh35Biicu3zw6ynh3KtmwZQzemRFGvliyUBzPTRJ2ak0ErLbHxzYbmXBI0vkblo8hQxS/uBtNhmEmkEZ4XhVewshWanwoNnzs6DBRHSLHt8dk/s4DzGNuUXkj5TX0YgF4+Uok/IqwJH0mQsZLrylyeVsseBx4V36dv1zvFFAofCFlIKWH4gObrSz1Bp79NoHfX0BngXc5EWHQRnj5fKQbDHJtNPzme7UnHzbxKbpNwtbOUF7h/VltTnOwy5YshjCXIriNYsu0L4gwIWtxt9JKlXL0HzClkvoPdUvCfaftyyfgmrzzPN8NYzB1MgnzAo4pOIKbPOTBldIHKR+HuFHyfb93tE7Dcz8B5YbtgJRyzoh0gMSqm0NiVNs1UUAzkmbNwGJdpuXD1eWOvCl2QJLxWprACnavSKpZYBG2KPNYaeRyXE52ZiyAjsc4gLNdFGNSgi0yFSIR+aBfS+hNjlCqhOLB42ll4CvgA8sgJQWbCQMx34919E7IUu7AP7Eu+vsckhDHSxquBH9aEMvyZj4k2VusqpSLs/+idydeu3OWXu8RRtKTm 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)(376002)(136003)(346002)(396003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(52116002)(6506007)(316002)(83380400001)(26005)(86362001)(2616005)(41300700001)(8676002)(8936002)(6512007)(36756003)(921011)(2906002)(478600001)(6486002)(966005)(7416002)(7406005)(5660300002)(66556008)(66946007)(66476007)(38350700005)(110136005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P1ZAHBhX1RzMnU6ZtY6e9mTc8o602J/Aw6MXO7AVDFv97UAWKZRvl3e9BbuGVMyzKlFClW3MTYYfNhrji0U6GRqACSksErufri/FcKWMjCqtquSYXbTa6auQ6V72o5COT4RnmClAuRvJRZ8G2uX4EMVqUZQCVmzl+yi+NOROUrrzVeYs+kUogllnwQrBYFniEzZTxVx8swNoyTDijmdZSaKR01965g1PS6FzdmeZBEeomF1Bfk97nvwVBzelf4ox8nNv1yFZFNIkOx8GwEx3XuA5KJpqvFLOfWMbwsP0mOPkH53zfKh4fLLU269uy//UBHLWDCfan36opBvWCiuSu3RvtRB3PFm5R9uvDg87h0x18SogvQAZNr3VVxM6mhYpanI1fcQzhuBiFuN8OzG8fVFPmYKDKqT6khIhbvb/3h33GR6WstiC5vhR8ybEjjbDzUuJ9rkKfHgX4C80Jijt+D6cZfRA2YakflIdcGltXbuUzChQkazoSZFRS+dU3d1c9SVqvO+UwrhxIuug7OmOvMB/gxC1l/lavUy9gS9xsT6yYm6wIcjgxoeRkVFQ7xu5YtGflEkbU4HFqLmAiiXWPlkN1JkU+lXsEeb2oQtm90HzmdKJCxZg0mpFrSxbQsK7qLnHvyG2Y3/7Y3vs+l63BBNPvIVVcJxtX/gvwiAsIPLW+YDs5dRgqIZKx/7b3hNSszL2Geyb75g5gYeju1Hpko1nky5CZw3wRlRIi6aoFvgtBDYnU8BgcOTy8OXZZ1xI43BfziaI4j+WMrXab1+i9sWNmwDs2XORywt8TK6i82lE4oqcJx5KZwHqfqjyBk7t46u9lNu9BJCqQOnBUGF4fke+DeGUmATgLaLp3O0TYVHdPxYaXAh52aD9I27jjU2neAVn6W/ZgNA8dyccDO8TGjwWQjB0+NW0wyauVeFyJifdEo1BR8GXOkCNkEXZtaAScF6DPpP0IMxdyCEy2OsSkTIhCfTutLBgNLd4UZn2M8OEeKAVJZOWjw8GF3vr9gudox3W0vXF9paDjsUkZuskJorHSgvFaWWKOdE2FpZAA3iL1Qj9a/m11Wh0G/bX5vnPeNnoUJcAAjYsOE3+etHk6S5nKwpHGKp3qRm39s8Lwvgn0wovTVYZV357/t6ht1t6PNiMm8oagJmGkT/Jk/cscU5a7Nwwi+LROEMNrYB8gwvQAup3a7cKERkuA87VbjFRCyqbGm6WjkW8vzQ9dfd11vYbkn7Oke3rJWIALujpyCDVYQj9GJVsb9yk1F+5Ir2Nr7arGVnb+uTL4VzENytgdGudr1tKVUr6W5nfdMLmQ2GOG/kUAdmq1HeP4URc8c7LPGV0FhDlsMTXxfiINUe9X+44z2Khvkcp21WNbWKj5bhXN3qZRnSP6xcXCB3c9P9x0u45nwYTNbzDCdYvi+iu1+8zGKeN95imvrLFMXqckumfTpV4LCov/t2QB6LpzKRH70X3Az3+T+Ou8SibhWu/0DE6FOpFTJW3V0Foscs9uO+gvGX0+c2S0f7Ozgbief8cG9k9gQ+uFcN7HtRjLVp+9e9Mi2GHKUfNEFpYzKcQEjI9hMJ/f8BzmjGCrp6rH9JSsOhvD7jOo9fR4Hkt957d6M4O2RVKp5CuT/YOqGLPuoY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb2c7cbf-6aae-4fc2-133f-08dc26bf1948 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:55:38.5869 (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: BGEvgiSX8trAIiSA53lvbeWMXwLbvcqvaxR1BOisqClU9Ppng9IitfPg7Jvh3Mwg0qVofmxP5luZZdkd1HrxjqA4TKMDwDBHpkPfPngNW1s5RTx7uS2nN8GmMYif5Pzi X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB6229 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 | 2 +- drivers/media/platform/st/stm32/stm32-dcmi.c | 4 ++-- drivers/media/platform/ti/davinci/vpif.c | 3 +-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c index 4046212d48b4..f615aee85968 100644 --- a/drivers/media/platform/atmel/atmel-isi.c +++ b/drivers/media/platform/atmel/atmel-isi.c @@ -831,7 +831,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; @@ -1155,7 +1155,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 686ca8753ba2..3f8bea2e3934 100644 --- a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c @@ -728,7 +728,7 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, &state->max_num_lanes)) return -EINVAL; - node = of_graph_get_next_endpoint(node, NULL); + node = of_graph_get_endpoint_by_regs(node, 0, -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 8cb4fdcae137..4c00aae013af 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -1856,7 +1856,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; @@ -1915,7 +1915,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 Tue Feb 6 02:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13546563 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 E138BC48297 for ; Tue, 6 Feb 2024 02:55:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD1B511283B; Tue, 6 Feb 2024 02:55:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="EdmyIAWc"; dkim-atps=neutral Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2107.outbound.protection.outlook.com [40.107.114.107]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDEA311283A for ; Tue, 6 Feb 2024 02:55:48 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fZp1vQ4BsU36v3BwF5l3GDZAalMfy2952qnG8QBZtZ4rXhsxTAuiNXfiIAscWjMJF73q6vbaO4xJuVZ8FhQr4NjEJaj5XqUgxUbeXATJqLmWajnPkhJ4KRWlE+of1BDPVjujrPB5Sdj5GKf82o84qnfM9Q6Bc7TkzWBFKXiWUkshv6qy6yQ4kgF4czM0V8wChNMqxKwzvw/r/60iJu5MopEXcV91H8cughAavGy7RQ9hIyG7I5u0By8kVHs56Iy/ItyKpFzjw4EIuP8/eDbwKoYKdQuPLaMq0pkQ18qDUmIhhVvoBvjTQBp4AxcXWCaraCmhPHPrkOPNJ8Wyg5Ecng== 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=dwao4mgd6zne6nju4+WqYJ/tYqJbRjF933+zKt305BQ=; b=KjR1yjetN8WSzp0Yo5348bXzJ36G2xlW17OS2TXxqCkI7ovxXvaxjtYWePh/q6f2QjiLRSIEiT5OLwjS6BdkFV75f4oJphktQd4l0rUvH8FbkjMZxf9FyRQvSA/fQQd0XO/QXCa2bGL0ir7NukSf4JCWEz3Pw5nKJFUTjYBYmuli1pLUB6YvIC3sthLthj0WEwq0JxSn6sEjE5Bsx6jWncBBaR96govSmw1Rc50cqsGs2aqvnR/Vo0hdiUoD/MobzrshsudpMHJA2igqyWja27bI5rhHYix+VWOV2Uvw4Ytyx9wrXNw8PR/aAiaUffx7B88EbdJlteqLFZLkK/0tPQ== 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=dwao4mgd6zne6nju4+WqYJ/tYqJbRjF933+zKt305BQ=; b=EdmyIAWc1V+DKpmjKo8xE+5OwtTIELlbX0ikORh/lUArYjUqSX4zk9lFHONEsBp33c9mkFyDBtDJ9W0EI831g8RNyXjXnz2aurD1ZS+Mg0/MrHPcckka/wZKj2ZHdMuhcbd94kvri9ZIBhesokZWQ1I6NzEGBPHP8kVXR+TlInQ= 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 OSZPR01MB6229.jpnprd01.prod.outlook.com (2603:1096:604:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 02:55:45 +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; Tue, 6 Feb 2024 02:55:45 +0000 Message-ID: <87o7cunvwv.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Biju Das , 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 , Russell King , 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 4/4] video: fbdev: replace of_graph_get_next_endpoint() In-Reply-To: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> References: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 6 Feb 2024 02:55:45 +0000 X-ClientProxiedBy: TYCP286CA0013.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:26c::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSZPR01MB6229:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d489229-5ff5-4a76-9b6b-08dc26bf1d61 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: S++4mPn++clG+pFGR0DnATtGuo+fjwusi67vT+tivWp2j/0523LzLYRLa477A8phmkQvikd8hdtOoyMF4oNQHrETPFgxYvUC15yhXUsHCncHpfZkMBKgW9TcecLS0rxJaZm8JViyVTvteG4dBjZ7kzwAVqPPlT6yBTgj0K7Q7JefiwGXSjkKIWINDgsuM8zyrehUXGxYwHrg6NuJayXI7hsIKz8rHwFITNILqCuGchX66cSEUE//nqrueHbPGgbF1aRjQTMMKUOJWrYq5iFDQ475ttoCf/zvS57eKVScj8O/oO153S0txrImlYEfUW8to0R4JOR4ZChioQ9xwC7ZdL8YT4lA5VZrGXAaPvCo6shptuokZCSxY5S+O1aXHxNqEeTsImWN7TUF7KIDSsRE+ucq4PqWRMNTg17aWyPJeEVmPdbesdZDGum21PfpX0kvx5otoC2zPsIo+n9sWfVnL4GsaczCsHj2R3hEJso7OgCreWHErK0YPo5BFajeNZlc4j80jnWy5wLCRHku/Rhqo6H/koDMPfIxyPZtdacofrP0OoZeq4IjvIGPnSZdELZ/w8Kfq3oaAXDTvwPxHL1eFTHq8Xz3APwxhfHpYcj+16lYj/YjkuhCWTGycI3Qn7mU 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)(376002)(136003)(346002)(396003)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(52116002)(6506007)(316002)(83380400001)(26005)(86362001)(2616005)(41300700001)(8676002)(8936002)(6512007)(36756003)(921011)(2906002)(478600001)(6486002)(966005)(7416002)(7406005)(5660300002)(66556008)(66946007)(66476007)(38350700005)(110136005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8/DyDToJ0X8YYfX5tHB4iguLuGFAjiPTyivWvfVh84a8VDWD366WJVRiQmkKrNil8r7rAGANG93O2lNKEc44h970SXk6fGANpqMZU+exMd2Z1Z1BmoHcTeWPG7552uE7ptS9oas5KJjq17532EmnzhmTbdtYV7b/d+7X+W0JqXfimQyAqRMTtxvLYMQvtGDQaW1JTtAHz6Q0/19KDOAI0zgn+YPuccFnfCJrKnJb27IQvrm+0ITLQk5Zp06NGJk2zKSVxBQJqxqTUpIir5wd9Mqntf6TMSRH0heO/abVQ2HaS1US+LdPpkYvD6Zt7eV5r0lse5G7DBou/JlltfspGA26T6tPaP1OmG9+VA6DV1YJ78WgsE2lU5swCHbjj6MF33YaWy0K72VrkWFyZOBZmtxE0JTB5OKrrJNgOLtTKjEQVqUC/YUpymPHzDhEhW83bklqQbixT0SLlwMgGo+MAfQrAKmPPlMLIrRisFjV1zNMtzBfq+BBDCQiuPkimAT7sm7EVh79vVWFVJvFe33slITo7uoaij5nZYeanQqlt8JTNWcVGqAV4M/+rlKNYTyPYDffRuQ89xcvd4deb8O26MUSfT6f3ajzIrZdlvlnc+nUsnP72fWsuaKADNU2txqEvXFQUw+rg/1CeY6a+hdix2loUzD728srgn7XWaPXNSzKMIxxBAoAv+VIoP50fmGGs3dYEgTMfLRH5jYy2KQseX+H+DqBV3UYSEgS3NVY99Bo/TWyP4lRhf+N1D/VlPx3cfOXwav3/VD0ne8RithmBJkIs0vF1d0MHDmWrOgyJlnUHt4DXcE6PKAm6SlEQAt+g/xM4vno8p7WmY/y7xlvfGGcpVJekX2wmGBNoXGT4U+3PXhkK0y1puAbiBguFq5WnKJekALkW/TTNsoBH+thGitvt4EZ7JBQr9pAJis8hLPfEvEXUpvHvPHMsrUimxROldhxtzESzI1XbfSJa2UP8kvt1F/zv1dTMzTfCDRWX/PoqwrxszrdkzlMRZTQBTIBkSAwsHupHuxGVK2yH2bjIJqYVkPCJQTLsVMuXRUadi65Bg7nCtukIo8akmUHLRK6EnB8OlB9uF87DzPoW4W1PiZMfbLyH1Xv36j++8O/bd48vjG/+9aIVJu7ZUNS5QzaOvxhC9FtnYYF56oNx2zsQ7ht96YujAH6mhSF+eMCJC5POQnWFKh1MpAv5Xp0zj3WmjG4EOzNLRFVcYZSzMYY/q5Pb0SMoenS7vg/9199zYFevmShdogdEgqzrcys5z+xGaBBZ+Lcq2s2QhmvNFNVGfpMxx4/SMZ9OcmSCP7aVljX7JotODTo9blmLuToWeK6DRfVFTNJB6VEJqzAK2jp36QVw9985BAAXRBBPVk2RtyiJQkZsXNvCfPdrzSvJj441lHAItyiZVx4LeSdLBNykfFGv4cVaZoFIdMnN8XqtDGMlpOuPz8G/8JKZIErLZ2UzRMBLOu9HF4IXpnyHqgkMY94StPuivGCIR43EDRwcNoOOC0yDXQA1/RMniampkPHyyIbsStbrLeyyft5BrkCwsI5UcHry0CzbWJfQAmq8hQwJvD1WfhTHkd7lbBSUJinx12lMGeOog55GOVtBqsJZFoOfNbaSmtqYOC3MDCYVqE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d489229-5ff5-4a76-9b6b-08dc26bf1d61 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:55:45.4737 (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: cEicr3Py2OkIdi0H/2E/mQDUa6zW2q7DB/m8GbOKPWr/jezflWziAPWNeHc4hNPqbFK15qADkSTuLdxchqcMsV1HfzqupSNKGtjTvay7gFxPxHRxfUNIsKs5EmrvNULe X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB6229 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/amba-clcd.c | 2 +- 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 --- 8 files changed, 11 insertions(+), 28 deletions(-) diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 0399db369e70..2371b204cfd2 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -691,7 +691,7 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) /* * Fetch the panel endpoint. */ - endpoint = of_graph_get_next_endpoint(fb->dev->dev.of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(fb->dev->dev.of_node, 0, -1); if (!endpoint) return -ENODEV; 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