From nobody Wed Feb 11 00:56:02 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 E3E3833F392 for ; Fri, 19 Dec 2025 19:23:27 +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=1766172210; cv=none; b=QZTDeJOhbQ75p+6eTw5K1KPzUAW1PUT20mIar9C/2I5m/Bz2GYvY0dHIQtVYuPvDrETarWabAkmgcwl8/HPix1hPNscEZk1MsGiVQ+l29zseo/Zlb+9q5DUepU5Orx/u1r68BYnhaSTdIoV9rGZv3fndD2X+h+1P+aJboxkLGvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766172210; c=relaxed/simple; bh=Xg6XHj6KozlX4NrGzKx/YCl8Yj2IOOPWG22yyPcuZ80=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bGkJb7B/R0i7dBH3njvsg7nFRRSpwyioX9Z5eaY1AFlzp5tngLJXLgKZSKJfCH+As/HARN5D4UwuK1ZemgnWnL/Td2aPNUrFfp3R1Dx6N1hg+kk1PLwh1M9tKCM9WrxJZQyPULVM5zavFBoBudMRb7KRatlf0QPYCqgq1269PPg= 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=Gj+1Z6hF; 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="Gj+1Z6hF" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 75AAB4E40B7D; Fri, 19 Dec 2025 19:23:26 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4D4166071D; Fri, 19 Dec 2025 19:23:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 461F510AA981E; Fri, 19 Dec 2025 20:23:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1766172201; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=PT1SPgDsRcvNYZ5/SapnZsLtcwfzwA7IG18t6F0iYJk=; b=Gj+1Z6hFqsWd4w22uR6ASCST6fEewFiYRrbbGGa97OMKH8pS3pwQM4HYaLFiWVGPZxcC+h myYkDo7dJAnFzASv0oc9PLXa2dqp4MpOReQHy3fLoTBWF+eyiIYYAN5JBoehCgMn84ExC6 8+ycMuT1OnI1Dx8Hb+O/Dn+NNPp6twkg/AfnVsL9bocC6j9YuSCK1iMdYSB6AqWG6Bhqzd dt7k+Ot+pqwm4ANkwVT7BlO535ZQL6jB+Zu/b70gSprkslPDXBDdvuLjDp4syAb3XoWXnZ 0RAlNDGQxu/LSTZs35pxOC+OSJb6JSLXNjGJce2MmG8kdg0awFIJxQJa49tHHA== From: "Miquel Raynal (Schneider Electric)" Date: Fri, 19 Dec 2025 20:22:10 +0100 Subject: [PATCH 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: <20251219-schneider-6-19-rc1-qspi-v1-8-8ad505173e44@bootlin.com> References: <20251219-schneider-6-19-rc1-qspi-v1-0-8ad505173e44@bootlin.com> In-Reply-To: <20251219-schneider-6-19-rc1-qspi-v1-0-8ad505173e44@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 ff0ddd2c0d41..f282a06ba383 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2044,6 +2044,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 @@ -2063,8 +2064,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