From nobody Tue Feb 10 06:58:33 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 07B4735CB75 for ; Thu, 15 Jan 2026 09:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768469151; cv=none; b=M0kaavAt6xDm8D80SIb0BtFrH0W3SN6gwzCM/DzV7YIVyBhCs1ov62W0X5Xmm46MZIPXxcbs4oOL7uWiUlDxdnr1SnebbzbBXEQ3SF8dK0JEM4IyMOYfBaeNjLSpMa6tvYGFuch5wwdij2ucZJ3ZuY8n8Fc4RsJjmvoDIOQJK0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768469151; c=relaxed/simple; bh=5w+nJGs9oDRhAQ1vYw6KNG+JP0RoMRK+8xX9EdcSHWY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RuJ9ieoVM/HcuZpSH/OyEB8kLWw3eaQhJcaX+Hm7RHK34AmMV4zbMaILUm8/rulugQ3nx4m6IUuw6lmDpFBtOsHzMJhMKRPiQx+2qRWlegZAmP4nkE1a0Thot6BfWDktbfXMbsfTmL8g3dM1Mdiq7AbHdadNPnL5Yk2Pd9ocjWc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=l21yX7ot; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="l21yX7ot" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id C2A424E420FD; Thu, 15 Jan 2026 09:25:48 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 987CF606B6; Thu, 15 Jan 2026 09:25:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0703A10B6852D; Thu, 15 Jan 2026 10:25:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768469147; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=vpyrsnWMYxiBaejIiwzp/rVmHvQvnlGjk2HnSaZLv1I=; b=l21yX7ot3xvF2RGZmeyKiVsXlVoTlONCWcqSLT+dQlbxkl6unVePe7GXK7rKqjMvzsZ4BL hb9HrUDrmJ/dFrE2xubZyXtOQkRW12gjHmMh0o2Cnr/g9cjs+CBhzXris/ic9G5LB9tNZj 7EnJ6O3pc8fnFKHz68sWwqdmIiuUB9OuwHAfxWJs6kpX38Sp7e2tmu4XbYT0650lokBxig 5NraivdIx8wv7Zq2BenzYcSHyAUWFvB4lQIxJal1GP7FQ0AqNLKM78TMyCExtFcFMiFtn0 CeM9EeYIWpWP6DmWtPUdop+eHY0HgzK5QeC7VkihVuK0jR2enoAoeVUsNvDQXw== From: "Miquel Raynal (Schneider Electric)" Date: Thu, 15 Jan 2026 10:24:59 +0100 Subject: [PATCH v2 08/13] spi: cadence-qspi: Try hard to disable the clocks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260115-schneider-6-19-rc1-qspi-v2-8-7e6a06e1e17b@bootlin.com> References: <20260115-schneider-6-19-rc1-qspi-v2-0-7e6a06e1e17b@bootlin.com> In-Reply-To: <20260115-schneider-6-19-rc1-qspi-v2-0-7e6a06e1e17b@bootlin.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Vaishnav Achath Cc: Thomas Petazzoni , =?utf-8?q?Herv=C3=A9_Codina?= , Wolfram Sang , Vignesh Raghavendra , Santhosh Kumar K , Pratyush Yadav , Pascal Eberhard , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, "Miquel Raynal (Schneider Electric)" X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 In the remove path, we should try hard to perform all steps as we simply cannot fail. The "no runtime PM" quirk must only alter the state of the RPM core, but the clocks should still be disabled if that is possible. Move the disable call outside of the RPM quirk. Signed-off-by: Miquel Raynal (Schneider Electric) --- drivers/spi/spi-cadence-quadspi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-qu= adspi.c index 4bfe65af458e..af0ad24d8d39 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2039,6 +2039,7 @@ static void cqspi_remove(struct platform_device *pdev) const struct cqspi_driver_platdata *ddata; struct cqspi_st *cqspi =3D platform_get_drvdata(pdev); struct device *dev =3D &pdev->dev; + int ret =3D 0; =20 ddata =3D of_device_get_match_data(dev); =20 @@ -2058,8 +2059,10 @@ static void cqspi_remove(struct platform_device *pde= v) cqspi_jh7110_disable_clk(pdev, cqspi); =20 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) - if (pm_runtime_get_sync(&pdev->dev) >=3D 0) - clk_disable(cqspi->clk); + ret =3D pm_runtime_get_sync(&pdev->dev); + + if (ret >=3D 0) + clk_disable(cqspi->clk); =20 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) { pm_runtime_put_sync(&pdev->dev); --=20 2.51.1