From patchwork Tue Jul 2 08:10:44 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: 13719093 Received: from mx07-0061a602.pphosted.com (mx07-0061a602.pphosted.com [143.55.144.161]) (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 44CDB14B977 for ; Tue, 2 Jul 2024 08:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=143.55.144.161 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719907861; cv=fail; b=dDaBDn6rqF6/uyV6lKPnBZ523nk1lwWNWxUIp2eoz3tP7occrXholYj/YAjJY3RjZhE/CueYAbpwU7EwnSs3JvjSJ/BYvOjoVE84HEVPyY7niFJeighm44Evta3c28/cR114KmLbD0fHn3efkFdXfgJKSluxBBWkhCwg0tqCLJQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719907861; c=relaxed/simple; bh=pMjwfyarpek+i4kI9Rb2ZAku9+DVxgB+g4lk+hptXhE=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=QSSAL6GgE+WWBysv2aOlSB4XzerwutsO3qo3wyTooISrRYzQ5t9/GceFGUIcssmdy3h60kx4/ivRSGXw0EjuuP2BBSJPDmDooja4sqT5dCX/kT2dUTAUjnD1BpW8BZXiwZzU6uB6WuH6/4snRdfZww7wG6ar7AJu6EuzdgwBr+8= 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=anrICpYv; arc=fail smtp.client-ip=143.55.144.161 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="anrICpYv" Received: from pps.filterd (m0278995.ppops.net [127.0.0.1]) by mx07-0061a602.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4627sVp6005022; Tue, 2 Jul 2024 08:10:47 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=G0x0C5ms6eu8jJkMUHPPzZWQ21zJAm/eyQO4v7Omk8k=; b=anrICp YvJzqsMDoVDEiE21w2DShdSUOD+y3wO8YoNXnxq6n9TDUXxC8vQ9uPCdfIvackjq +d/1YJnL9PMaZfPgdvSY66qTBmpG4/7TZaqtR/WUAmiNHw4AOI8MXrR4gT43Lqkh mvw2jRItoWSu7cPZfM6DDlbxCA+ET2D68QcsKkPiPBmn/rRfKEPooApGsRRtl2oA ufAyLkuBKv3LSjiiyZOXXjUGKHxfOq7xI98m1wKDPsNd3dBQBsV71WDQ5kLLWYdK WsTJNXkGu2iz09jAfTFgQgs0y0Wq1wkwDO7TxwetVcNPHhiToTyOdidGf0L6dUCK kPQ4yMCaYys/9M+g== Received: from eur05-vi1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2169.outbound.protection.outlook.com [104.47.17.169]) by mx07-0061a602.pphosted.com (PPS) with ESMTPS id 4027c8badn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jul 2024 08:10:46 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V8kVec7a6aNUBomMVlxHyVj8CVRlS3E9y2ufd7mozJdcyCtZEZ/7foAOhwcqdfxX78/I2dvKE+Xak/0/tM7qQy9eP0nPrh8yfNwYlmfxxDAsKIxQMieQkz9wHXteRNg3PnZc1deTTZOc6YI7h3Pd7QnheS84vtlDkqaGNz+FHeIcP+eyXlWeNp4e/lTJZbjRaWKRTHNw0agfUg26ODW3b7l77iyNMLMwYIKVPW1pi0WsdW04LcH6PcA28oNXHFcoeZDt4tlwbJmI70IzyutCmhb1UEHXkEBgI+Im6/tCvRuWxg54P440oFIti0Gf/68sowjOoZpQTdNk70eoJJAlGg== 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=G0x0C5ms6eu8jJkMUHPPzZWQ21zJAm/eyQO4v7Omk8k=; b=Gq+eCss/n+BSyxCEuDxZpltQaJz6mDkuP1P/NYfr+2k2DUPlI90Su1XJAzTbJ0RCtqKm1l8pbgCDiHTZ1Py/yJ4Z8Q93gtV/9jFKob8R/CEye9U9yySExg8JAcIsQraf/4Q/tJCSZhvjpiF2h7otyMycdeuIDh0NqSspolcdi87FhpNb5NLAcO/FLLNs7v2VnUKz6QfDbwyDC9HZ69lmy8ZQKSOMb/6aPlA0lpu//9Ctz2+5KQHGKAn8Z14xwfz3WOzypYbNCjuQjjkaoVmXdmCe28PvJ7glmgLkEZutc0VLBuufmCxi6MkBwKScppSeKVQsYwoQurKFYFuPWWygwg== 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 AM0PR01MB6513.eurprd01.prod.exchangelabs.com (2603:10a6:20b:167::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Tue, 2 Jul 2024 08:10:44 +0000 Received: from DU0PR01MB9382.eurprd01.prod.exchangelabs.com ([fe80::c41d:dc9b:3f97:1ae1]) by DU0PR01MB9382.eurprd01.prod.exchangelabs.com ([fe80::c41d:dc9b:3f97:1ae1%6]) with mapi id 15.20.7719.029; Tue, 2 Jul 2024 08:10:44 +0000 From: Diogo Manuel Pais Silva To: Peng Fan 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 v2] clk: imx8qxp: Defer instead of failing probe Thread-Topic: [PATCH v2] clk: imx8qxp: Defer instead of failing probe Thread-Index: AQHazFdWN/m8O/jmP0WAh/I/zksSxQ== Date: Tue, 2 Jul 2024 08:10:44 +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_ActionId=feb09c1b-e3b6-48ef-89cf-48121eb19752;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_ContentBits=0;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_Enabled=true;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_Method=Privileged;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_Name=TTControl-Public;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_SetDate=2024-07-02T08:05:07Z;MSIP_Label_6d12e765-bdb3-4a42-8d1e-507ff5c9fe67_SiteId=5638dc0c-ffa2-418f-8078-70f739ff781f; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU0PR01MB9382:EE_|AM0PR01MB6513:EE_ x-ms-office365-filtering-correlation-id: 056a171a-608d-4345-994a-08dc9a6e78e8 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|366016|376014|7416014|1800799024|38070700018; x-microsoft-antispam-message-info: ASdYPJOfGUdRJwoMeYZQDClj5LPIZfR96pBo65PsEbdbqjxxsB3GBp31HfkUTCUbYcrCkat27BV45jiUAZulpUdzoe5gzyWZG/Xr9X1ftaaMkdMSJa83G5BylgcaR66J6B9fOadZIFGtMjI4cLmRH04ZK+i+xRUA+eb5YSLFK0TfEntGsF6gNc05NEdIWhaqDtsACZm2mopTJYaBhwUj33vDDqul13BKk4+xemo+V62F3zsURu6uBRHaXlK4SV8wcO7D0RzeQhd1sPEB2tJZYcMDR3gER1nCwu0orzbWiaACfMi4mX+jUFV/w619dufo4UJLvA/QMbpcKK3Ay66ujen6n1aomYiFEpVPtb0Uoi8jh9buRjzx1awZ3UK/MKsL0tpZK4AHy1K3r94xuRYFOBqQv/qDw3wnrPJmArm/pWYDXIqyqLo+/rLDyFEhKW+gixLWHQnRQQe6/X6R7lbCYoykCUEqYi19Yo+4gKjk0SMjllJifa2IxDnVcrZUJAw8v9kv42WGUs6jCT7uDfPGWr0AsloDHJF3WPSg4nNaf1J15N8OKopSmIVtqzr7mEW+Qz/24Dw1N049jEusXw5nbVpeM0atc4/HdId5JOtbcKXJbQfU8wy5Sg5NhKrblJXNoC0b78ZLnAevE5UAr4e3AizGq9+oZxNUlVVTK1PWTaBo5iCvf4RODwywieijJ4h3+tPz33YDNwq6aFlUwIeCPYLKNz3q0TglAbDEJ46tuh7oBEdi9+lnF+NcpH2rv01f5idZIDPpA3LBg77Z4x1o4slvYV4jsw5Ai7EYrt9JKRB+vEOH5/QtHoNnmdt20X5S6NhnJjQRHO2pTc57b8KBxm2lAETyyx1jT0FwPKBYZQ2qbise55q1hI7BBR2P77nfMvqiGBsTpbQ/VvMPsUBaWHQEGWFU8LdtWAFcPCYqs2nunYsdxHdrFpcuyd6CqIJLUoblWPTo/wkjjFrmiZGJAExlto0kOufoBc7fdf8ogdoBQNyLQHuJDLT1/buQpB1wdtsJSO4geSzNkQ+UId7SEryvQZitgDgn0oC/4SLZTQNqDaNqz9Oo3H9yD5wciL/hC0lEMkiltOdZi2bAn6/06jrOOO/XlUSsWJ43+uqY0T6YOPHz6GRfYRy45yPWjT8K5kMXvS0eJViMiundCLIKAT2QtBgT0V/mjG8IPQbj+qKrs7i3mA1gdHSkBKviBY28k36KVrx8bhml171vKW6Awyi9EkwXZkC+j6/IcdaGuvoDm2L7jiCClc/CfRX7uDfUVADTa1YBllJFob9zntRaZak/yWvvtD1ipeceTykpkjeX8Glf7WgZ1ZJOM2+4OeX5+s8ag2o3DvjTyK0JI5HbA6gQ/RA43ieoyRZeHJqJ7J265yY3l9UqEKO0vGD2k8Ehe5+CF6RzS9i19TMpf1/NLg== 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)(366016)(376014)(7416014)(1800799024)(38070700018);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: pEelCHD2nsWWcRXe5/GlNtAGuFZInTBsm6I6kA57C9yrsg4/FZRSIL2OTKxDuPi7n6o5qqdwIJb16IT91i8CnzUvYi960gwMYOhK4P2VrhHrqxl7w7wDe/9d1F6DBV/GJn1Jar2WiDbitfCdgqnJN41dxp3MXqMEvkc6cg6/UN/zjbX75HjLIweJ9WmedaE/08Wf824zs5xefVA6TEfTKcaDEX6Ll+yIdk6mei9YUOnw73C6hCQPtZzpeVQpNo3YcCdwGR6uRw2KGm8Vd8px+vjtJMzs/6dfqkSM0A4Y3l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3kh5avNDgo/vDBTxwF5P44yBzmgfAxS75d35gnA9pwVyNDDBbVMZdOTOVEW+AfAsEVXm9p6FY0L6WBpoObk0I5CsEcOdrjbJO5se6AsTQ7gIy1LX54na9pDfKGFAZWqt8u8/J/d/ufnrL3mgtzfkJUxbuPDm7ytEnY7exU96N6LYlhtb33ZNs/Qa95xqi4RrLPz+jNzJG1BVO0JVCeTtnrmR8 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: 056a171a-608d-4345-994a-08dc9a6e78e8 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2024 08:10:44.5329 (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: bOVN6WWGr8fUnp5dLSqV3k0ZtMdL0k0eI++6QiKJZHhFPDo+KSWf0K7zgX05e3gx/dYnOfmLupsY9Ibqgz+8tWOJSPc+guxRry/7nEbDdoU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR01MB6513 X-Proofpoint-ORIG-GUID: pjn8LIHxlK5UuZqiziMbBDF9pV6xz4r9 X-Proofpoint-GUID: pjn8LIHxlK5UuZqiziMbBDF9pV6xz4r9 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 Reviewed-by: Peng Fan --- v2: change from dev_warn to dev_err_probe --- drivers/clk/imx/clk-imx8qxp-lpcg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 CONFIDENTIALITY: The contents of this e-mail are confidential and intended only for the above addressee(s). If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, copying or delivering it to anyone else or using it in any unauthorized manner is prohibited and may be unlawful. If you receive this e-mail by mistake, please notify the sender and the systems administrator at straymail@tttech.com immediately. diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c index d0ccaa040225..7bd9b745edbe 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",