From patchwork Wed Sep 4 06:50:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diogo Manuel Pais Silva X-Patchwork-Id: 13789819 Received: from mx08-0061a602.pphosted.com (mx08-0061a602.pphosted.com [205.220.185.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20EA013AD03 for ; Wed, 4 Sep 2024 06:50:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.185.213 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725432621; cv=fail; b=MovsXAUAK4ivobSmJQBWzfGMIQG0lymRXmGMSpTq+8v8Gs0jOl5VPvfx1hEy1xLrlbkzjbQfi7oYtlYA7XCzFzmU5xp2Hg8wLWOvuYAeb9tqXoIjgb1BMQ1ScDyPDRmfDcHmKPbUL8vW9Ws2qsCg98hwSgyxBNeXkqugXshdqss= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725432621; c=relaxed/simple; bh=6bDv1FnQrEG/4uc3bKM4jbTKFxd1wIzNPw2RnFO8Zfk=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=l+CNPiD4hAETWoMXoIMzgktxAw5Hgnex5YT7g01PvJmoNwlMk0hQtyb9bygOUZMvsaDXYgBBy9FgHEn84ghNLJ/3Ni+2AAdZthcmG54WEhxVUEcsh/x5F2qCCztvuVVOnR6XtRxuwzEhVye4dvLFCFJoCCI/Ux9sFa/Iw1e7aEo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ttcontrol.com; spf=pass smtp.mailfrom=ttcontrol.com; dkim=pass (2048-bit key) header.d=ttcontrol.com header.i=@ttcontrol.com header.b=r3hM3vDR; arc=fail smtp.client-ip=205.220.185.213 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ttcontrol.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ttcontrol.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ttcontrol.com header.i=@ttcontrol.com header.b="r3hM3vDR" Received: from pps.filterd (m0278994.ppops.net [127.0.0.1]) by mx07-0061a602.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4843F2lm019146; Wed, 4 Sep 2024 06:50:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttcontrol.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to; s= s2021; bh=K7X4HSAjjkca4VheVWdxBZ0EZTLZ5+FhgCjZ+kJmqBA=; b=r3hM3v DRbLv7JJ2ETl5V4EYy1BnLYN2Moqg4CHwdNGRBNdXz7zPVN/u33JY63NELLuJHfB EzlF6eXGRCh7fj4F+jhn0CXv7jVMEgtigN50/qkAW8CArTUAGkqFCw35qoSotGvd 3MAmcPnFqbJBrfDehHwaV3CSULnjiqKGKQqEO0oZXv2OUISIkSoL41s4xVpnlWvz mm/bshpVrxLwB8xLEHPrMaVkf2zllUSBnKkm29Dx1mbFHtMO3FLIAxccEcV6j1+A jSW2k+vc8U9ZeahZ+Jk/hiB4iJlYU3DOKWJfey5IEr3UoNQOljfbnCLZ3dze6DhW ZrO5vPOHY7OR8y5w== Received: from eur05-am6-obe.outbound.protection.outlook.com (mail-am6eur05lp2110.outbound.protection.outlook.com [104.47.18.110]) by mx07-0061a602.pphosted.com (PPS) with ESMTPS id 41edy987dw-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Sep 2024 06:50:05 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pGF63uHu+whzafmfJrOjo0gdZKqzOqmvFw5nnzxmIfOhU1lCZu1L3BAn9V9DwWfRseQOFI/+w0rJisNKQj79s/3FTAknF9L3eMqzuk3PJWQzpWcPM5al70Kl3dv0IlYz33Dh37MJeCBYlqEMWH89YcHDEbSf+khTxV1CAB9BFzb2BFkO8fcfTotDXPqhQkUc4+ZCdRRbxRvpmOOcD77ZhrznR4jUo6iTlwygHoY3H9yJwjE5dfDugZwWUiWgEIVZaQoQF7Y+FTxuo2ZRSgxfqpZO94/vtJHxTnUSKqcQrDvMAIQqZoAHZ6/hDs86pAfFAsMGSimoTgkWjkUtiSMK8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K7X4HSAjjkca4VheVWdxBZ0EZTLZ5+FhgCjZ+kJmqBA=; b=Q0C2cEkb0I1itCjRLKbdaQhClKmRnnbk4seWuVOuxKfg2xpGdrSCtsvFZGX1WaLTkipzpmvQYsSxcBhJ0jQnWQDQ08LDN8HuEHmEjWpMM+Fjwn8D/4ITtPtLBDq0OUpnhnuoLdtwNP7GEoRs0qiyCBhlZ1/CQjBgX2F9tlDLMi60l1esnrGbglXBsnoxHOT79CpCrumBxaY6ELgYogrhuXQUmmjyzei2b8l5ljz/l+Dx64V25jKRIVdk9p6nlEvHEPFRmHemvqAlZDAQgfFD+XORtUNAsEs4/Ip67yUFVb6TzxhxmunZaNhjr2m1Y239FyxOignGQA+6N9Tvy2QGoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ttcontrol.com; dmarc=pass action=none header.from=ttcontrol.com; dkim=pass header.d=ttcontrol.com; arc=none Received: from DU0PR01MB9382.eurprd01.prod.exchangelabs.com (2603:10a6:10:32d::6) by AM0PR01MB6242.eurprd01.prod.exchangelabs.com (2603:10a6:20b:168::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Wed, 4 Sep 2024 06:50:03 +0000 Received: from DU0PR01MB9382.eurprd01.prod.exchangelabs.com ([fe80::c41d:dc9b:3f97:1ae1]) by DU0PR01MB9382.eurprd01.prod.exchangelabs.com ([fe80::c41d:dc9b:3f97:1ae1%7]) with mapi id 15.20.7918.024; Wed, 4 Sep 2024 06:50:03 +0000 From: Diogo Manuel Pais Silva To: Peng Fan , Abel Vesa CC: "abelvesa@kernel.org" , "linux-clk@vger.kernel.org" , "shawnguo@kernel.org" , "kernel@pengutronix.de" , "s.hauer@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , "sboyd@kernel.org" , "mturquette@baylibre.com" , "festevam@gmail.com" , "imx@lists.linux.dev" , "EMC: linux-kernel@vger.kernel.org" Subject: [PATCH v4] clk: imx8qxp: Defer instead of failing probe Thread-Topic: [PATCH v4] clk: imx8qxp: Defer instead of failing probe Thread-Index: AQHa/parsKGDNP+Jxk22GRtAewCBaQ== Date: Wed, 4 Sep 2024 06:50:02 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_Enabled=True;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_SiteId=5638dc0c-ffa2-418f-8078-70f739ff781f;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_SetDate=2024-09-04T06:50:02.569Z;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_Name=TTControl - Public;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_ContentBits=0;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_Method=Standard; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU0PR01MB9382:EE_|AM0PR01MB6242:EE_ x-ms-office365-filtering-correlation-id: 985d410b-e97a-4899-2ffe-08dcccadcd8c x-ld-processed: 5638dc0c-ffa2-418f-8078-70f739ff781f,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?zStkYB08XvkOQS3QfZbsZyxrji?= =?iso-8859-1?q?zBGTjY4RxijE4g7fF6xp1YkL+b03HLDAJpJonS4oubr1MXSi7pGyS/NqYBob?= =?iso-8859-1?q?6fP4LrRJJUK5hhsbBR1zJplQirOWr48uNY0F7BYJEX6PbaF5AMvdA8lS3foz?= =?iso-8859-1?q?NRrt/axsb/JLkU1Bj6Get8YxpnfmIuYsCwG7ohfYqyjU01t7mT1RobC21RUD?= =?iso-8859-1?q?de/ySGu5ljJ2mdA9btDNoTI8iAKvuLdmePPhmpVropIMVjzTcFXjEvNlFEaJ?= =?iso-8859-1?q?3ENkdmBRkYWcGwi9vA/9WIhi86/MGRc3eAg+nlHBUM1zRo3vad2Ei55G71dc?= =?iso-8859-1?q?dVs7UF+kG79tLBiLSID3D+7dGbB044HAC0uZqX0SYrLGO6IN/M12CBy6mD9w?= =?iso-8859-1?q?/PQVQHYmAAqH2A64AeTyww3EiTl9xHxzbjKHkl/YC5AXvNwijMVEzQ8g0Rhb?= =?iso-8859-1?q?KTknXrjaxwuUtoHeaPxY2OMP7Atw3ZEjpdeZqEBFCIek9lRXvqh79/nYXX8L?= =?iso-8859-1?q?PHF8teD6V6fEZb9jBe1rrx63lZTOl/rcG64sc7t/vQj/fDVqEZY3gjAjhdSB?= =?iso-8859-1?q?sCc8hgtYaWOsFQGVeE3A+bH5TWTg80UUEerMXUuyaayyeMALERroopl92Iev?= =?iso-8859-1?q?5ftYASK/cGYHrnFkvT2lJz1Duz0eK1Uu5uEvfJlbEN9gbd+Vq9ysNkqQBLM6?= =?iso-8859-1?q?QfszZam7lCTMYYuaNtWMKhMs/oeDZmmvciuHeFNBbTgLmBbWyJX4sjkP957v?= =?iso-8859-1?q?J2Y615TrjT6VI/7oBCaXhG3/epdI2UWebo+G380nMkP5z6hj9ESD6r0mxeys?= =?iso-8859-1?q?EmzElOfQdaV/Hj25U987jJsrTBJm4/edDacZkWPXhBHZV2pVRQDG73Lm+DpM?= =?iso-8859-1?q?uforsFFvsSh2tUe9snf2q1QxS9D2yM4jlyNxrExwq73CFWVGIARyDjOmOBfs?= =?iso-8859-1?q?l2NgY3PshZ2GuLZDvt2UqqFug8yqQvf0htNPZ27B67wQTGGoyblYwQYTzONe?= =?iso-8859-1?q?s/6RAnittqtopuVIpDmtQIfnXoO/P3lAgqhzsybtg4/oYr83sSDe/pOnpmmN?= =?iso-8859-1?q?9n7ZLBOzq+3qYLFcbwOw9FKwS0utIzjvCMSGdb42XNDr/LIy14LSKQTOQwYL?= =?iso-8859-1?q?WLgYELAQnZ58EnrmBHwm6WF5pFzOl3dTS3cAJsNCdb/0RlX7fd9qvsOD0Teh?= =?iso-8859-1?q?Zjnv3Uveq/LyQg9sC5McxdC+kVq1yrQ36LLETMy/F8Rldp6TOIhoCmICrIHt?= =?iso-8859-1?q?JX4KP4cabvJ/j5pQwHnVAdlvqDg7/mAk8qyteRQ2ufnAdo3eBf8EyMT4c28w?= =?iso-8859-1?q?NrmVSjsKoIo5AaCG7WlQ9gO/EZ72+QebG6fbliK+oyY3vynsSLcgxYeRPuQx?= =?iso-8859-1?q?gVUhavAg2EdZbPKvJMeNCVMQpR08qmkSIKXXCqbOSxmHmtzf/747QBAoZk1A?= =?iso-8859-1?q?ZXydbH6wPbk4anAgFdgmj9Ew=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR01MB9382.eurprd01.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016)(38070700018);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?edffg5lYAsBcRrduhm3VQDm?= =?iso-8859-1?q?DunNgvVrOribi5VGeaWZgKlE7jsZOH7Hy0BHjKmmvG6/PDzgAEvPKU+YOi0X?= =?iso-8859-1?q?j/d1iGELTsUOkZ1c/s9x/A00YrySsB9yhUU56D6q4k3Fo8hwux1mfZMzQL8j?= =?iso-8859-1?q?tzRp3T0JEkMXnd7SYbMveq8EA3LfYTkWy0dSAl2LZ66lQ00L1qTEeV+J/ueQ?= =?iso-8859-1?q?VECHbqIk6nftH6W7BYF3BbkHjz9XBF66/OgRipxYyvajWfD0Vlwsied4Dpbj?= =?iso-8859-1?q?x31AWsaK7Q+Z+9qr28nuOHHNslhsttMlHpfKvFWcMqcJiorL46kM+qEkEYLM?= =?iso-8859-1?q?+blLv2PXuvnd7kJO+cYS+gFFmEcY+yEeW+wNM1FWGoGFxmB7KwzTX4f2EQ+x?= =?iso-8859-1?q?qeZi+wKnRqLTgxFTT0WSECW2lPt3443fyVHCGOyKG1gHaYGmpuPBOjUQvhKq?= =?iso-8859-1?q?l7tkgBobU6R2kjjARRqyyRgq9O8Lq2lIRc+BA2ocSUvDFOu7MPSwipKvykHd?= =?iso-8859-1?q?m0qxfZjOe8nY9NDRdgrWWZxI39dOrWF5W/3px15unICsQXUfh4FBd9qe7zH3?= =?iso-8859-1?q?3tSz/NgWNWaUilIFBUxCPdQyhsIvFe0KRvSac8UgrRwB/3u7sTildx4Ggne6?= =?iso-8859-1?q?gRdPxX90VQwKODHZH5pU4H1nHotq6u/P0TtqLoH+jPkPSuhrB8GWl3rmYmY2?= =?iso-8859-1?q?RY6ew2pUidMcsSEy0IjennTVwcV5S0GL1bwT1W5Nb7nY1Wvqtod2trE3SAMt?= =?iso-8859-1?q?q1D3n+GrhK4GgHRGXUR9N19hU/p+OkCCQY7IDNXewLN0kepQHcvLu4IyA1cH?= =?iso-8859-1?q?PzkuQJSXALauECZBhiVopepyQ3FTevxFGDUFugaSP1i79SxXHlqhbQLLcK/C?= =?iso-8859-1?q?F5pbyBCqljK5BXteOxtUo7LnReWAzXhbSvhHpTrHrBCEbIHp+IT4xAFVwT6k?= =?iso-8859-1?q?6FCv+QihKnlpAETCERRcH4uA1jS63AoJFT3GKGY5OaPFUgf/VaSOFH7rQerT?= =?iso-8859-1?q?/AFEYxINaAzx4vb2kD69Wop17MspdlOQE+eNZdaxoj+WFja8lq7ywNJwRbAc?= =?iso-8859-1?q?M/SPWaNS1kFfpzcHX1steL3RsewLOa+T2Roip3topOjDymM4WE9+GppDR/4x?= =?iso-8859-1?q?nAEzG3fVK377I3LxfXNzNYBnllNzLUFiCRp+l6qga7+IGygb8TbZ88RmmXwn?= =?iso-8859-1?q?Zt6A6vWZt7vipB4U4Tis2fBOwed7cvg4PTOKXXRFWLA54NWe+vQYV+y8gw22?= =?iso-8859-1?q?M08tWBOTjWfGplNYGYg/YPXCMeg3UkWVAI7SyJb73lYUph6LT4dGfE9wqYMx?= =?iso-8859-1?q?L5wRnlg/42OprJMhB0uMwOxzjdSqBmxCf/ZhV3CZFdylRxBlxGZQJ7DoZaXC?= =?iso-8859-1?q?tQtfTfEDxaACD6OUXGENcdSCjEmkcH7YIwhafvUYugEBddWQbAIxGFSfG2aR?= =?iso-8859-1?q?qu84WSREqE2aV56vmeNbgE0xrBxpSIUZiyHh98zGnXE+G30JQNpEhL+likQG?= =?iso-8859-1?q?aHyCd3m1M5JF7eU2Bd1eOIkyl53JKbIypIZtYpunPmcEjIQa7ysU4zlm06YW?= =?iso-8859-1?q?MTDY0IPcin3qPomUmQ0gNiVRqQG33V3S7mDqJ+SEHdNyuh+iT6LEabI6ZQ0m?= =?iso-8859-1?q?nmBFqjHUKg4af00S/?= Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: ttcontrol.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU0PR01MB9382.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 985d410b-e97a-4899-2ffe-08dcccadcd8c X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2024 06:50:02.9168 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5638dc0c-ffa2-418f-8078-70f739ff781f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JiM3mmU3/l/8p/47SQfK43LEmaBXHLsxd03CFFczQ8Sa8lqyNh9KmJtUx9u3ukWqSXwb/txUGylNat+ea9wM67I1hFmAfLJMOdL6OXHPn90= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR01MB6242 X-Proofpoint-GUID: F-4PO-tknZl3rILgwZdq7LEDIKJyObVp X-Authority-Analysis: v=2.4 cv=RpCXLzmK c=1 sm=1 tr=0 ts=66d8031d cx=c_pps a=gP2taHnPVrKuxa3Y2Z85qg==:117 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10 a=EaEq8P2WXUwA:10 a=9E89HhfwiosA:10 a=EZQmGfNXMHUA:10 a=nxb4IF0AAAAA:8 a=8AirrxEcAAAA:8 a=VwQbUJbxAAAA:8 a=JfrnYn6hAAAA:8 a=IpJZQVW2AAAA:8 a=pGLkceISAAAA:8 a=KKAkSRfTAAAA:8 a=rsmfmBjOAAAA:8 a=KVT2gqi4WtierUUwmrEA:9 a=wPNLvfGTeEIA:10 a=muotpCzfy8uUhEcWaHt4:22 a=ST-jHhOKWsTCqRlWije3:22 a=1CNFftbPRP8L7MoqJWF3:22 a=IawgGOuG5U0WyFbmm1f5:22 a=cvBusfyB2V15izCimMoJ:22 a=5SoQ0aNoiOvKt2feW1sf:22 X-Proofpoint-ORIG-GUID: F-4PO-tknZl3rILgwZdq7LEDIKJyObVp When of_clk_parent_fill is ran without all the parent clocks having been probed then the probe function will return -EINVAL, making it so that the probe isn't attempted again. As fw_devlink is on by default this does not usually happen, but if fw_devlink is disabled then it is very possible that the parent clock will be probed after the lpcg first attempt. Signed-off-by: Diogo Silva --- v2: change from dev_warn to dev_err_probe v3: refresh patch v4: correctly propagate probe defer error --- drivers/clk/imx/clk-imx8qxp-lpcg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c index d0ccaa040225..1c3e1a7df8ca 100644 --- a/drivers/clk/imx/clk-imx8qxp-lpcg.c +++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c @@ -225,8 +225,8 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev, ret = of_clk_parent_fill(np, parent_names, count); if (ret != count) { - dev_err(&pdev->dev, "failed to get clock parent names\n"); - return count; + return dev_err_probe(&pdev->dev, -EPROBE_DEFER, + "failed to get all clock parent names\n"); } ret = of_property_read_string_array(np, "clock-output-names", @@ -301,6 +301,8 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev) ret = imx_lpcg_parse_clks_from_dt(pdev, np); if (!ret) return 0; + if (ret == -EPROBE_DEFER) + return ret; ss_lpcg = of_device_get_match_data(dev); if (!ss_lpcg)