From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 61A573126C0; Mon, 3 Aug 2026 14:40:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768003; cv=none; b=NqMyGA2NNZTVBkG0s7LAw49JBTki+/hvXKga7Hkorv0gWDPKXWPrKl1H3i63Ab1PTDWLUQAKkmiYAPtGEL7D5hlVGcj57jF85tyo8xzeEMG13VZkYSrJQ0IzO1NgQ5Fi0SFWDq/CferH/qmXY9tDc1aPaHRfrOm+99EDkzO+WEM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768003; c=relaxed/simple; bh=ol4uKXH7i4gu7VakjvIyR8hDTyorvMn2IbbT8yyJUqM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J0bAYR6StC6KDdkIqibjF0UTqEz8MYMgyVfidC6nENJn+pPCq75e8cR/bGrjeVydnLyNrxr8uoQs/EGdRzkjt5yhXDgUkBSchqp4LOOIECIqyaWTkhvhslwNlQ3uVOZcIQTbsZdH2Pwoexm+AcP16TrTxSb2vMEDGMyy93ZlrpA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EJlGoIju; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EJlGoIju" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 136581F00A3A; Mon, 3 Aug 2026 14:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768002; bh=drBHcizTpLHwnjvGDS/+4JRuC2WyW4AxibKwlSKT+iM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EJlGoIjugiKqIfZy5lUV1psVwBjW5oXgyGaJuIJ1lkUGP4mTGYkahbca/cvsrUwdy l9QOGdgQ6bPS8GjaLz7vWL7XiSWgTc2A0rJffFI1uKGKe2j+iGCaR+HW5u/19FIo10 CVmAD/9gGJe2izBWGDxuwivNWtk7TxU+0HLJKeClIEu9nABO1rIxFX//Q+28Fs1LZ7 XO4IBCEtubgTGgLS4Y16s9hoOitgwzFm7a5BPlvEO85Bsi6gjOOiaeB5uLMa0ghi06 mGvl89B9qza6V1HRxo2vM52oYsdr819Z9p9gZo7X3ZR++/oKdJB60fXVogs9nmV5HA 92mUwzbFjf2ug== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/39] spi: atmel-quadspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:25 +0800 Message-ID: <20260803142003.12857-2-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/atmel-quadspi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index aaf7f4c46b22..28b6cfcaf34c 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -1527,7 +1527,7 @@ static void atmel_qspi_remove(struct platform_device = *pdev) } } =20 -static int __maybe_unused atmel_qspi_suspend(struct device *dev) +static int atmel_qspi_suspend(struct device *dev) { struct spi_controller *ctrl =3D dev_get_drvdata(dev); struct atmel_qspi *aq =3D spi_controller_get_devdata(ctrl); @@ -1554,7 +1554,7 @@ static int __maybe_unused atmel_qspi_suspend(struct d= evice *dev) return 0; } =20 -static int __maybe_unused atmel_qspi_resume(struct device *dev) +static int atmel_qspi_resume(struct device *dev) { struct spi_controller *ctrl =3D dev_get_drvdata(dev); struct atmel_qspi *aq =3D spi_controller_get_devdata(ctrl); @@ -1586,7 +1586,7 @@ static int __maybe_unused atmel_qspi_resume(struct de= vice *dev) return 0; } =20 -static int __maybe_unused atmel_qspi_runtime_suspend(struct device *dev) +static int atmel_qspi_runtime_suspend(struct device *dev) { struct spi_controller *ctrl =3D dev_get_drvdata(dev); struct atmel_qspi *aq =3D spi_controller_get_devdata(ctrl); @@ -1597,7 +1597,7 @@ static int __maybe_unused atmel_qspi_runtime_suspend(= struct device *dev) return 0; } =20 -static int __maybe_unused atmel_qspi_runtime_resume(struct device *dev) +static int atmel_qspi_runtime_resume(struct device *dev) { struct spi_controller *ctrl =3D dev_get_drvdata(dev); struct atmel_qspi *aq =3D spi_controller_get_devdata(ctrl); @@ -1614,10 +1614,10 @@ static int __maybe_unused atmel_qspi_runtime_resume= (struct device *dev) return ret; } =20 -static const struct dev_pm_ops __maybe_unused atmel_qspi_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(atmel_qspi_suspend, atmel_qspi_resume) - SET_RUNTIME_PM_OPS(atmel_qspi_runtime_suspend, - atmel_qspi_runtime_resume, NULL) +static const struct dev_pm_ops atmel_qspi_pm_ops =3D { + SYSTEM_SLEEP_PM_OPS(atmel_qspi_suspend, atmel_qspi_resume) + RUNTIME_PM_OPS(atmel_qspi_runtime_suspend, + atmel_qspi_runtime_resume, NULL) }; =20 static const struct atmel_qspi_caps atmel_sama5d2_qspi_caps =3D {}; --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3B2A6414DFA; Mon, 3 Aug 2026 14:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768016; cv=none; b=O5UKeIn2cHfmybDW+Sus0QaRyoCFrgApRDjDv99wICiwZ/Ten70CsXHd1HmMZ7q7uiiHcWZRwjk/fgLrQlOlm8atmHQtgWCIBDAWoO2kCc19E0KXaxUcbzR1Jc14dX6jt277WcQIvXeQDQFCPa8qHXrlVU0wgDiTplCJPSubOeI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768016; c=relaxed/simple; bh=j03Ip6HwLTm4Bm01zZdYl5S7cjV8eaaNcVDuFyQLqCQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FMnS7ReifhhxNr/3FOb13suUtFGDpmU51Sq4PM7oSXOmRo4SAHqJtucOX5SPxw9SFBbA5TSnZgfoLgsWjZzO6zfwIZ8J5P6SXnRHsZeElGSYOSHR50hjgC84ExSHol1AqCu/1NqlTKz1LpMegjYdGFbgYzYHpZyy7bxYNOemS9k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oouUE4Gu; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oouUE4Gu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A26601F000E9; Mon, 3 Aug 2026 14:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768014; bh=VxglCs+ea3c0Dxgwyd90UOXbko+4Uh7TAYs69rXIsqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oouUE4GuXW5dVVs3myp/tQcsUMd8xfQZda2iTuHW+9oFkcJs7BI6LWR+lVI0R/2a5 eHC1J7ShZaXwzs/pcK1cYmIsRboY8zzdy7j85tbXTHLQTOLWnMdJLQ47gRc0wRxCYY 8UaoO6/HNhVWmLq2a1EOTnbilu5Qik+RQ5KDDTx2rQOXxF8LyrN5RT2AH3JkmMNZT4 cDX3M97jvJN23HgzmDr5LzGW8ksEJ4whM5Yttqc74l1WnKF98s0l4mXino1kcRyJ3N KAEXvu5fBwIP9JWDP++PpJ66E/ln0vrkpblvzBXBuabmnoW+YwHIXyVVYAR1w9C14s 9IMTj9vWPVDGg== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/39] spi: amlogic-spifc-a1: use modern PM macros Date: Mon, 3 Aug 2026 22:19:26 +0800 Message-ID: <20260803142003.12857-3-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-amlogic-spifc-a1.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi-amlogic-spifc-a1.c b/drivers/spi/spi-amlogic-s= pifc-a1.c index 77a2c11bec5e..388bd2472dc0 100644 --- a/drivers/spi/spi-amlogic-spifc-a1.c +++ b/drivers/spi/spi-amlogic-spifc-a1.c @@ -374,7 +374,6 @@ static int amlogic_spifc_a1_probe(struct platform_devic= e *pdev) return 0; } =20 -#ifdef CONFIG_PM_SLEEP static int amlogic_spifc_a1_suspend(struct device *dev) { struct amlogic_spifc_a1 *spifc =3D dev_get_drvdata(dev); @@ -409,9 +408,7 @@ static int amlogic_spifc_a1_resume(struct device *dev) =20 return ret; } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int amlogic_spifc_a1_runtime_suspend(struct device *dev) { struct amlogic_spifc_a1 *spifc =3D dev_get_drvdata(dev); @@ -432,14 +429,12 @@ static int amlogic_spifc_a1_runtime_resume(struct dev= ice *dev) =20 return ret; } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops amlogic_spifc_a1_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(amlogic_spifc_a1_suspend, - amlogic_spifc_a1_resume) - SET_RUNTIME_PM_OPS(amlogic_spifc_a1_runtime_suspend, - amlogic_spifc_a1_runtime_resume, - NULL) + SYSTEM_SLEEP_PM_OPS(amlogic_spifc_a1_suspend, amlogic_spifc_a1_resume) + RUNTIME_PM_OPS(amlogic_spifc_a1_runtime_suspend, + amlogic_spifc_a1_runtime_resume, + NULL) }; =20 #ifdef CONFIG_OF @@ -455,7 +450,7 @@ static struct platform_driver amlogic_spifc_a1_driver = =3D { .driver =3D { .name =3D "amlogic-spifc-a1", .of_match_table =3D of_match_ptr(amlogic_spifc_a1_dt_match), - .pm =3D &amlogic_spifc_a1_pm_ops, + .pm =3D pm_ptr(&amlogic_spifc_a1_pm_ops), }, }; module_platform_driver(amlogic_spifc_a1_driver); --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 79354305680; Mon, 3 Aug 2026 14:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768031; cv=none; b=ov06QFbPjlNaAtLm13V+Gb/aiUqDSywooUdpGmLTvRmENzA8QDbzcvivPtoJkCrXC9TkVxRk6PQCD23s88h3e8WFQdhdg4Rk96/jCPWGZlhGFitz8hbFk2YqX9uBDvO08xmFNV1n+EX02Vv+0vltSMgLU3K8D0fI9pKCNORTAUA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768031; c=relaxed/simple; bh=FRMTeOORCNHJa+B3xULuyOtxsobQDwoma4CE7UPW16o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d9JTJazBTFxgxgPypINBVYuA8rdiSd84xWp+q8f1QdAQxfwewMBNrj8YkdOXvX5ejZENR0tdQhSaT72saHntNbiyGD7+WxnzQGmuiU4ITE0lJtOJfkGkrUblhQ0yR5DHGZQWhbNjLzMwBtZdexXkW3dc4cs746dxmB0pM1E6OsE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fh6FaZZY; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Fh6FaZZY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB0481F00A3D; Mon, 3 Aug 2026 14:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768030; bh=bipLPRMz6JcFCwPqw3LLEk55cURIlQcQ9jExHCqAyWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Fh6FaZZYr+oCLPA/RJwYvBZ22dX0wnTAK7oK9cJMnwrgAq9ck6bbORM/RE94u44ZP XYhMZaOEIIyIEOKroZT8Yz/oFjyGNGvJXeGcTSwzloAKIiCBkg6qcVk/eS8YlNMJv1 IrCqJQdfKW1/uvhKqXabS/LCmuNQAuKCf8OHXKfMy+4vUGHHmOnt81Z+shapvFcCeS 7i8B9I9LFgCNqXdX0PwHf4m5JRtlgL+tAqSVvbCI1hWsauZRuUjiB7ONpS/WEeftzp IZ5qf3WM6X+e8d4VN8XZOhmOdR3ufNjmSzHs30rqMBvMrBdr7JKUTUMyQButJmmHjh DRa10br+6pgRg== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/39] spi: at91-usart: use modern PM macros Date: Mon, 3 Aug 2026 22:19:27 +0800 Message-ID: <20260803142003.12857-4-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-at91-usart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c index 77cad4118202..804f6194c830 100644 --- a/drivers/spi/spi-at91-usart.c +++ b/drivers/spi/spi-at91-usart.c @@ -571,7 +571,7 @@ static int at91_usart_spi_probe(struct platform_device = *pdev) return ret; } =20 -__maybe_unused static int at91_usart_spi_suspend(struct device *dev) +static int at91_usart_spi_suspend(struct device *dev) { struct spi_controller *ctrl =3D dev_get_drvdata(dev); struct at91_usart_spi *aus =3D spi_controller_get_devdata(ctrl); @@ -587,7 +587,7 @@ __maybe_unused static int at91_usart_spi_suspend(struct= device *dev) return 0; } =20 -__maybe_unused static int at91_usart_spi_resume(struct device *dev) +static int at91_usart_spi_resume(struct device *dev) { struct spi_controller *ctrl =3D dev_get_drvdata(dev); struct at91_usart_spi *aus =3D spi_controller_get_devdata(ctrl); @@ -616,13 +616,13 @@ static void at91_usart_spi_remove(struct platform_dev= ice *pdev) } =20 static const struct dev_pm_ops at91_usart_spi_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(at91_usart_spi_suspend, at91_usart_spi_resume) + SYSTEM_SLEEP_PM_OPS(at91_usart_spi_suspend, at91_usart_spi_resume) }; =20 static struct platform_driver at91_usart_spi_driver =3D { .driver =3D { .name =3D "at91_usart_spi", - .pm =3D &at91_usart_spi_pm_ops, + .pm =3D pm_sleep_ptr(&at91_usart_spi_pm_ops), }, .probe =3D at91_usart_spi_probe, .remove =3D at91_usart_spi_remove, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D06B7400DFF; Mon, 3 Aug 2026 14:40:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768044; cv=none; b=PKc/3oVzM3r/nmusm3d9EEuKQCMdqxS1Q+Y044Pp0M8MirwFNmjAJNDCGIfgv1kzU93JRrGTRhFgyYq4cCOg8BASytF0g1SYhoYwSVqiufOVC+AT8kzyUt1v2b0A2gFSlIuut14dgG8edb+m4UkcuyWVNuotNcWT9NCRdO7B+ko= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768044; c=relaxed/simple; bh=8zI5Hz2QVh5YdJw9ebJiuqgTOOtUw6epfK6KtmVJ7CI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VuNAPuVZ5Eloc+dWzg7k6so//yBCd8Bf0VEsivICvqkNwhtLI2FLmNyemUENHDTjmBjQ1QBsrjKny1raYfiFkfD3B/E6dmrwS/Q66YckYqmXY5ka+jP8gtWq2zeupHQsqcV1dP7VtPC7HyhNz6t03sVSxuzjMT3zyhmiscMlQE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Yt9F+Y9j; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Yt9F+Y9j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E408D1F00A3A; Mon, 3 Aug 2026 14:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768042; bh=TSi20WCkH5JDBxJK1bjShT5TFErSjKY4MvQZmEwMtjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Yt9F+Y9j9QSvoF+22q6z7h/6RyseB4zldF+TpwkoJpPHtcuwhPSkXbjgswk83llti lQb2+aqRd6C6knyyMOZW0woAgi9gaAIe/91X7GD0pIiFQ5yuaMjwLmTbt6M/urTHAg HM7m1LfbSeUY//dTvEGNijlyMLIlCj2FHs5WN9UrmecBkdUkxD8vTCrmDLN+F9D2lH X3V/sWXeGHi2F/dX7UwcELvC6oGtecQfApXwTYjtOZkaOK/wRkxXpJ+xQpfpDSAvzN D+PojuRVdSl4EuNcy/PHOB14hHCrFbvC9AI1/oXqkECtMvP8Mpq/KWk0D4AeAPLa2q RBrtzLAt96A3g== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/39] spi: axiado: use modern PM macros Date: Mon, 3 Aug 2026 22:19:28 +0800 Message-ID: <20260803142003.12857-5-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-axiado.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-axiado.c b/drivers/spi/spi-axiado.c index 649f149617ce..c8e389e3e97e 100644 --- a/drivers/spi/spi-axiado.c +++ b/drivers/spi/spi-axiado.c @@ -902,7 +902,7 @@ static void ax_spi_remove(struct platform_device *pdev) * * Return: 0 on success and error value on error */ -static int __maybe_unused ax_spi_suspend(struct device *dev) +static int ax_spi_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); =20 @@ -917,7 +917,7 @@ static int __maybe_unused ax_spi_suspend(struct device = *dev) * * Return: 0 on success and error value on error */ -static int __maybe_unused ax_spi_resume(struct device *dev) +static int ax_spi_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); @@ -934,7 +934,7 @@ static int __maybe_unused ax_spi_resume(struct device *= dev) * * Return: 0 on success and error value on error */ -static int __maybe_unused ax_spi_runtime_resume(struct device *dev) +static int ax_spi_runtime_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); @@ -963,7 +963,7 @@ static int __maybe_unused ax_spi_runtime_resume(struct = device *dev) * * Return: Always 0 */ -static int __maybe_unused ax_spi_runtime_suspend(struct device *dev) +static int ax_spi_runtime_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct ax_spi *xspi =3D spi_controller_get_devdata(ctlr); @@ -975,9 +975,8 @@ static int __maybe_unused ax_spi_runtime_suspend(struct= device *dev) } =20 static const struct dev_pm_ops ax_spi_dev_pm_ops =3D { - SET_RUNTIME_PM_OPS(ax_spi_runtime_suspend, - ax_spi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(ax_spi_suspend, ax_spi_resume) + RUNTIME_PM_OPS(ax_spi_runtime_suspend, ax_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(ax_spi_suspend, ax_spi_resume) }; =20 static const struct of_device_id ax_spi_of_match[] =3D { @@ -993,7 +992,7 @@ static struct platform_driver ax_spi_driver =3D { .driver =3D { .name =3D AX_SPI_NAME, .of_match_table =3D ax_spi_of_match, - .pm =3D &ax_spi_dev_pm_ops, + .pm =3D pm_ptr(&ax_spi_dev_pm_ops), }, }; =20 --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2E5F840E8E7; Mon, 3 Aug 2026 14:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768060; cv=none; b=ewTl1UQJfuYlO3+wdwyqmNJN19MX+CmORNmcazJVs73qg8GIeYERr6L8C1vl1yzT+DK/pE4CJbeGgYamXAOq23z7Cn8QZiq6xQ5m6QVkS4dlxPzfMLolIRrVTdEPLstGCHFwxhw460sczNopQ3zimzMxXRz7kaSChZnWWNMinKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768060; c=relaxed/simple; bh=PGAoRXoN0hyS54Lr9Rc8E3c+eY5oWMkvJfeVcCjTjho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f3Q9LORmdX8kIekNWTyBC068oqJ5Gyg89e06naAYALhcZiowsJol0vQ28oN17Oo4yTZi7BrC6dBkhmoLpGAVp8CC8DeCoUacRUbmOf9sFVekm0d21wz/RSDIGB/iK12XqOHGBWtT/X3A+CLIRjr6aKTTyW4TQEDXQaESOFFrQRw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ctWWWFFn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ctWWWFFn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 933C91F000E9; Mon, 3 Aug 2026 14:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768058; bh=FErana6KyfLoG+9M15o1hw3+E0XT2WYvRc8tNlGG7O0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ctWWWFFnrwmypgMYWcxzJFo5TtsX6EMIUzsSXQXSHM0O9KZ/jg10h8NvvP0WaRdml W2G56FZfmg3ex0ZUNrwaOMXBVsoksqdS0ZMb8fjNyINFRo2nQCxvf2PEYEkLc/L39+ NuZs3efWumZ/c40m43kfwHiKpa2A7pglgKMQgBWzuDzOi5RTyzpgBPuB8/ZdLDwIpy RmcoG5msJuoXlDHlLnajejsnh3kUbc0BswKSC3hHX7H0yLBFP5m5JtFpF0pZsEvTXo x6qNE6bGzKxeQ7FZ9/aOh1erx6tFuNk8k61XZKDnrCgNAhz3fzA72GZH9bs9XGdG0G NtX63Hb20lddw== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/39] spi: bcm-qspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:29 +0800 Message-ID: <20260803142003.12857-6-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-bcm-qspi.c | 6 +++--- drivers/spi/spi-brcmstb-qspi.c | 2 +- drivers/spi/spi-iproc-qspi.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index dcade7b99cef..0db24fe7a109 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -1689,7 +1689,7 @@ void bcm_qspi_remove(struct platform_device *pdev) /* function to be called by SoC specific platform driver remove() */ EXPORT_SYMBOL_GPL(bcm_qspi_remove); =20 -static int __maybe_unused bcm_qspi_suspend(struct device *dev) +static int bcm_qspi_suspend(struct device *dev) { struct bcm_qspi *qspi =3D dev_get_drvdata(dev); =20 @@ -1705,7 +1705,7 @@ static int __maybe_unused bcm_qspi_suspend(struct dev= ice *dev) return 0; }; =20 -static int __maybe_unused bcm_qspi_resume(struct device *dev) +static int bcm_qspi_resume(struct device *dev) { struct bcm_qspi *qspi =3D dev_get_drvdata(dev); int ret =3D 0; @@ -1724,7 +1724,7 @@ static int __maybe_unused bcm_qspi_resume(struct devi= ce *dev) return ret; } =20 -SIMPLE_DEV_PM_OPS(bcm_qspi_pm_ops, bcm_qspi_suspend, bcm_qspi_resume); +DEFINE_SIMPLE_DEV_PM_OPS(bcm_qspi_pm_ops, bcm_qspi_suspend, bcm_qspi_resum= e); =20 /* pm_ops to be called by SoC specific platform driver */ EXPORT_SYMBOL_GPL(bcm_qspi_pm_ops); diff --git a/drivers/spi/spi-brcmstb-qspi.c b/drivers/spi/spi-brcmstb-qspi.c index 7a33b479c1f7..651a73446cff 100644 --- a/drivers/spi/spi-brcmstb-qspi.c +++ b/drivers/spi/spi-brcmstb-qspi.c @@ -31,7 +31,7 @@ static struct platform_driver brcmstb_qspi_driver =3D { .remove =3D brcmstb_qspi_remove, .driver =3D { .name =3D "brcmstb_qspi", - .pm =3D &bcm_qspi_pm_ops, + .pm =3D pm_sleep_ptr(&bcm_qspi_pm_ops), .of_match_table =3D brcmstb_qspi_of_match, } }; diff --git a/drivers/spi/spi-iproc-qspi.c b/drivers/spi/spi-iproc-qspi.c index 392acc4026ab..5255d5124385 100644 --- a/drivers/spi/spi-iproc-qspi.c +++ b/drivers/spi/spi-iproc-qspi.c @@ -141,7 +141,7 @@ static struct platform_driver bcm_iproc_driver =3D { .remove =3D bcm_iproc_remove, .driver =3D { .name =3D "bcm_iproc", - .pm =3D &bcm_qspi_pm_ops, + .pm =3D pm_sleep_ptr(&bcm_qspi_pm_ops), .of_match_table =3D bcm_iproc_of_match, } }; --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 66BCF40F75D; Mon, 3 Aug 2026 14:41:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768071; cv=none; b=c2faOakhpNTpB+NrL1XlpWYWmQqCy68HhQKmaGxeB4ZLRM1WZyRmXbDbVaeXLohBAPFm68xZiukcux3JNnjGn2T0RG6yRmirHit7L7t9nvhgGvZ8uRtrxZAOZHKFbfrD1TPpoH+43de4EotyGsSSzf4DyfQZrmyapj1GytvCRGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768071; c=relaxed/simple; bh=8XMGcf4hqA37XtV1JFhfvIHAKpWdPrJl0mhUxOEJTgU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sIJvQkgIeU0tbrg3jfwtfNxZ8UREZXMCe8HxzbxOs+G3bIUbkV66mgAUwD+Mjv5VW6O8G03ZgxoqBagychm4DC5qC5PH/OIi41ldM1YaSpCI00i1DvZd5qVKy+S6IFuzY1VmE7bcrWqbGYqjz2YK8lDue+AD2CIT1YRx5pKL1eY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VeljzgWe; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VeljzgWe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F15E1F00A3A; Mon, 3 Aug 2026 14:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768070; bh=oIrju3YJXP0D6mBAvc98/Vs2ufAIvXkeUIskpU98D7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VeljzgWeF9lfqns1Cu7UtJkRkwXLD1EGFMt6lP31jhUrOkrCcedmVkouA+akmotpV qMmQ60EqBvEmJ1dTRCV5Nc5CM+2llVFiDEPzekqfd4AWE2rIbjQJOjTZ4F0X4UEFJr sDQbPLdB2QV1vwBYTM+wkiEs13COu3H3A7BxB6CGDG0kg2G+modaIj5AJWhrA7tI/I 0Vh81ZXkbfXPQQmsp9A5hRdU2KQDthn8BUqgpW1y4i/kDyYt9wF4kdo+2op7yGDTNj b116t4qlEKEAJkEq+nbna3Y/nfeBhnYUKMgg70OBFFhOZjnl0wFVDPp7ra6V2V1in5 Cxvbc3HeP6CSQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/39] spi: bcm63xx-hsspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:30 +0800 Message-ID: <20260803142003.12857-7-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang Acked-by: William Zhang --- drivers/spi/spi-bcm63xx-hsspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hssp= i.c index 58012e1b5ae7..ca6cf7c19835 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -884,7 +884,6 @@ static void bcm63xx_hsspi_remove(struct platform_device= *pdev) sysfs_remove_group(&pdev->dev.kobj, &bcm63xx_hsspi_group); } =20 -#ifdef CONFIG_PM_SLEEP static int bcm63xx_hsspi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -919,10 +918,9 @@ static int bcm63xx_hsspi_resume(struct device *dev) =20 return 0; } -#endif =20 -static SIMPLE_DEV_PM_OPS(bcm63xx_hsspi_pm_ops, bcm63xx_hsspi_suspend, - bcm63xx_hsspi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(bcm63xx_hsspi_pm_ops, bcm63xx_hsspi_suspen= d, + bcm63xx_hsspi_resume); =20 static const struct of_device_id bcm63xx_hsspi_of_match[] =3D { { .compatible =3D "brcm,bcm6328-hsspi", }, @@ -934,7 +932,7 @@ MODULE_DEVICE_TABLE(of, bcm63xx_hsspi_of_match); static struct platform_driver bcm63xx_hsspi_driver =3D { .driver =3D { .name =3D "bcm63xx-hsspi", - .pm =3D &bcm63xx_hsspi_pm_ops, + .pm =3D pm_sleep_ptr(&bcm63xx_hsspi_pm_ops), .of_match_table =3D bcm63xx_hsspi_of_match, }, .probe =3D bcm63xx_hsspi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 891B340E8E7; Mon, 3 Aug 2026 14:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768082; cv=none; b=RqfgLrfv74YKClzFbuVvtCJ5b4yPZSV5uz9ZqkSUKUrDjbcxFF7QjG/VxPvtcuVwC1enUGQuYt1Cmjc3xMh6W0Mabj1BX+q9lCZbEyCfB4nkY9/gzhS5+Gw8RQu6CcYdYQOSPkFsAm0xjK9nSWb4Ks1T8eeMY4DfQEJ3e9Dy2ms= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768082; c=relaxed/simple; bh=1rRNGmFC+phyVnpsF/RZ2gxLxly4iuZul4MaBmj+rJw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t4xJYq3xfyK6TUSuQGUqjSScdme2qZwnruuZBEXbf7qhKvscw1DwK9H9R4Jpmk36OnTSq0lFhnJVF3uztPu8izyZkYSa21OTwYHGeA21MzfMX7DglqMoi4Lq9/+ZC8kl53s+iuxW1Z4oq/VlaZnvPek0UaHwhoRHwBDAk95kUYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O5MXt0h0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O5MXt0h0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1FF81F000E9; Mon, 3 Aug 2026 14:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768081; bh=4kKTt8aTkXsYE6TUcGdMGQEvWc7I+G4sEwM6xHPmeM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=O5MXt0h0aTm9O9hWUSNVLaXpD2kB/Xwnc0z7aJfFqku+7qFIqOY0NgqAANgOvHcYy 37V8mZaazE1Vmoi6RJJMSprbeo1hBYT/b7SibDTH6HYCc4dLUzAjZsfPw4zH3lcEYO JPtTAJu0CZxeA/bv/dJgMIkB5OJwrSJjEzzMi5KxxDiSB7kRbkvWHpsAHYlIItBob8 Q8BJz1I2cRScr58CE+fdIHZ8EgXc/Ta2YT3gQiHsHZ+JJR6f5PGDsmbxs9bOu5Mk53 dk8+RBp6k83uiiHOjrUgZbHnvEH9oywZu0BKBr5JikfJgTb4PSxcDw8NfoL42ZpdZM ioqI8V5M+Vi3g== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/39] spi: bcmbca-hsspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:31 +0800 Message-ID: <20260803142003.12857-8-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang Acked-by: William Zhang --- drivers/spi/spi-bcmbca-hsspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-bcmbca-hsspi.c b/drivers/spi/spi-bcmbca-hsspi.c index 09c1472ae4fa..570ea635ab0c 100644 --- a/drivers/spi/spi-bcmbca-hsspi.c +++ b/drivers/spi/spi-bcmbca-hsspi.c @@ -563,7 +563,6 @@ static void bcmbca_hsspi_remove(struct platform_device = *pdev) sysfs_remove_group(&pdev->dev.kobj, &bcmbca_hsspi_group); } =20 -#ifdef CONFIG_PM_SLEEP static int bcmbca_hsspi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -598,10 +597,9 @@ static int bcmbca_hsspi_resume(struct device *dev) =20 return 0; } -#endif =20 -static SIMPLE_DEV_PM_OPS(bcmbca_hsspi_pm_ops, bcmbca_hsspi_suspend, - bcmbca_hsspi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(bcmbca_hsspi_pm_ops, bcmbca_hsspi_suspend, + bcmbca_hsspi_resume); =20 static const struct of_device_id bcmbca_hsspi_of_match[] =3D { { .compatible =3D "brcm,bcmbca-hsspi-v1.1", }, @@ -613,7 +611,7 @@ MODULE_DEVICE_TABLE(of, bcmbca_hsspi_of_match); static struct platform_driver bcmbca_hsspi_driver =3D { .driver =3D { .name =3D "bcmbca-hsspi", - .pm =3D &bcmbca_hsspi_pm_ops, + .pm =3D pm_sleep_ptr(&bcmbca_hsspi_pm_ops), .of_match_table =3D bcmbca_hsspi_of_match, }, .probe =3D bcmbca_hsspi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8E5A0411F84; Mon, 3 Aug 2026 14:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768096; cv=none; b=u8StgB3oewSWtcd8WGireHvK/xPeHrnnN5084Zw5T9JZkqbKDt14ESu5UuQ3qrUBOom40nIhf90Qx/DBxv+Bq2yqa5oxVTCbDUVA7UJh5RYXp8MXt+jAZQp6mB1ahr3oNfypMMDi75N6j4PblT1ERtfEECj2BBM/LRQaJ6DP040= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768096; c=relaxed/simple; bh=0asNrLcvhZ2XBzhqXhAK7XMkZnVd3O4Yq9Ox+DK4dJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r6d/w3YfZ5AcvmdmbUNW7OvaYs9WK19LB6lCkE7At7wksXhiZ/BK1DQQFuAusC8yV4IesKMvzWg/4QiHfcfDJWxzxV3hgDHTgE/cTuyCZ50ELi+0Dk/upuZon7iIRVQ4sJWzHXaLL9JJyYz5HEu0hNhzZEIGDZ3BkIFKu4s8ic4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LxGP9gUC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LxGP9gUC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F225C1F00A3A; Mon, 3 Aug 2026 14:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768095; bh=MAIwjk+5CNQswN5q5GYfXKSlxvy7dSo8503a5y5nOgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LxGP9gUCUKBBON8LKPIYo/vxWduOwjs+b5rA+/uNqUB6Wq0dcPLjCHQ5QeSMfl4hr 68ukS9W90IlOepPoZhm5XZNnALM+NRAW6kSSEQlG0am5i664MhLPIjN6G8+08SmZ3t jsr26bCANf2oyIdJJZ3FoRK9m/4l9wjIb0xl6vRhJ9FDLeUlGrU484NxxGMKzJZAUn 1pOW8gZXs8naD9B+kYcYglB1WjA/lwqD6UJBuYj8OH38fCD42oEy+84eSj7UzCdgFo xI9aGFIiLl71fCDVxIQJq5IUUZLeNQ0LIY+1qyMkwOg7JBn++8SCVJvdswx5GTpLK5 S+TyYHyP0yJlA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/39] spi: cadence: use modern PM macros Date: Mon, 3 Aug 2026 22:19:32 +0800 Message-ID: <20260803142003.12857-9-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-cadence.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index 9b4e5b7013ae..a5e1e5a46bb4 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -801,7 +801,7 @@ static void cdns_spi_remove(struct platform_device *pde= v) * * Return: 0 on success and error value on error */ -static int __maybe_unused cdns_spi_suspend(struct device *dev) +static int cdns_spi_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); =20 @@ -816,7 +816,7 @@ static int __maybe_unused cdns_spi_suspend(struct devic= e *dev) * * Return: 0 on success and error value on error */ -static int __maybe_unused cdns_spi_resume(struct device *dev) +static int cdns_spi_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct cdns_spi *xspi =3D spi_controller_get_devdata(ctlr); @@ -833,7 +833,7 @@ static int __maybe_unused cdns_spi_resume(struct device= *dev) * * Return: 0 on success and error value on error */ -static int __maybe_unused cdns_spi_runtime_resume(struct device *dev) +static int cdns_spi_runtime_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct cdns_spi *xspi =3D spi_controller_get_devdata(ctlr); @@ -862,7 +862,7 @@ static int __maybe_unused cdns_spi_runtime_resume(struc= t device *dev) * * Return: Always 0 */ -static int __maybe_unused cdns_spi_runtime_suspend(struct device *dev) +static int cdns_spi_runtime_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct cdns_spi *xspi =3D spi_controller_get_devdata(ctlr); @@ -874,9 +874,8 @@ static int __maybe_unused cdns_spi_runtime_suspend(stru= ct device *dev) } =20 static const struct dev_pm_ops cdns_spi_dev_pm_ops =3D { - SET_RUNTIME_PM_OPS(cdns_spi_runtime_suspend, - cdns_spi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(cdns_spi_suspend, cdns_spi_resume) + RUNTIME_PM_OPS(cdns_spi_runtime_suspend, cdns_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(cdns_spi_suspend, cdns_spi_resume) }; =20 static const struct of_device_id cdns_spi_of_match[] =3D { @@ -894,7 +893,7 @@ static struct platform_driver cdns_spi_driver =3D { .driver =3D { .name =3D CDNS_SPI_NAME, .of_match_table =3D cdns_spi_of_match, - .pm =3D &cdns_spi_dev_pm_ops, + .pm =3D pm_ptr(&cdns_spi_dev_pm_ops), }, }; =20 --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 DD6163438A2; Mon, 3 Aug 2026 14:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768107; cv=none; b=a7oNpRkM/v/kp5yqnG68keV5lM7LdAkbWkVMLukVbLjHqljWquvyLqTPejghKM4COBH7l0kG8s5Sdbwka/yZ6UAOE4qsZJrIYCMMWjUHEZsLDnzcd3M4umdo9Insi1z1+zZF0pAzSDAdYHDKUPan8t74FEGX1pjXa7ZqIbUZJbw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768107; c=relaxed/simple; bh=gz3szEOCrC9R8SjBVtMeP8ZWLxODaFtFa8nAVXagjkg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NfBrfPgDIJv0NZBdFCliQwhljSrg/DCaxXIM7lolWtvyG+a/D+R7IrYeNfoZAlor7OsU9ToUB9ypZPKt1en2I64bujX1kTjCAsS2V2FYMYMSah4eUbaEbA34YkFF48A3Bw382xSYkEJ6djl3+bXtYFTOzMqhtpnX8XBCCgp0iJs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=likeEqfA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="likeEqfA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 436FA1F00A3E; Mon, 3 Aug 2026 14:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768105; bh=ky+A7/Ksh+2lxFezuifq/rx0NQiQ9BbBRodbWBfFtU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=likeEqfAZs3IraEH3/HWcIP6S2RCdbSJVDku0V5SrfxRGNeKXB3eD8XmagMR2MmM5 JTY35EDCby1ZnwxxwFG4UHNH/LAJa9P8ldTvgBuSJfvV98Qj+XKqjmg25E3QfgdbqQ eSXbuJsBSQanQve0jsz2eVkMu7PcLdy6qe/xomb9LkFj05YR9oJrDhkBV9Fx4/WVd6 WI62WAZYL0h2gAG11XtLizthA0YOZ+a6WzvNUQhTn+VM+4WBV7pnZ/xRXaHmdQQZeY DhYCv1bHPJmVLcvh4H+6cobBOcPSJa9aY22ybzYvABN5JsHShyjzV0Po/8PQazKinb 2+8eBr3Y0d0hQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/39] spi: coldfire-qspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:33 +0800 Message-ID: <20260803142003.12857-10-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-coldfire-qspi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qsp= i.c index 3b175c1da36b..3c8290e08b6d 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c @@ -437,7 +437,6 @@ static void mcfqspi_remove(struct platform_device *pdev) mcfqspi_cs_teardown(mcfqspi); } =20 -#ifdef CONFIG_PM_SLEEP static int mcfqspi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -462,9 +461,7 @@ static int mcfqspi_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif =20 -#ifdef CONFIG_PM static int mcfqspi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -484,17 +481,16 @@ static int mcfqspi_runtime_resume(struct device *dev) =20 return 0; } -#endif =20 static const struct dev_pm_ops mcfqspi_pm =3D { - SET_SYSTEM_SLEEP_PM_OPS(mcfqspi_suspend, mcfqspi_resume) - SET_RUNTIME_PM_OPS(mcfqspi_runtime_suspend, mcfqspi_runtime_resume, - NULL) + SYSTEM_SLEEP_PM_OPS(mcfqspi_suspend, mcfqspi_resume) + RUNTIME_PM_OPS(mcfqspi_runtime_suspend, mcfqspi_runtime_resume, + NULL) }; =20 static struct platform_driver mcfqspi_driver =3D { .driver.name =3D DRIVER_NAME, - .driver.pm =3D &mcfqspi_pm, + .driver.pm =3D pm_ptr(&mcfqspi_pm), .probe =3D mcfqspi_probe, .remove =3D mcfqspi_remove, }; --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 220E533B966; Mon, 3 Aug 2026 14:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768121; cv=none; b=l1vq+6zcbXz0cevJNc3agqv7bApV+/Xu6x1hoeqYpWrydCfERIl7cyNpZb91sSOXJqsravo+wYdyj9k5/ZWj3rcGDqG/zcA9cvNsxqBzs7asfH6VQKwalm4UgKfu+9Blwp7HF9dY9zuyeAMQkzetAwgCQn+DAGY03Gmx4l0eRvU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768121; c=relaxed/simple; bh=1wd+C6cKWSo6dzRaHPjd4tZ420rBctZI2BavERGy3oI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YYNFXooHc8YebLVBut6S9XqkZsJnzl/UGnP3S49sCbaZoyS23Dv8f9+oxBUlnWzAx7uVpKqXJuD+sSmBG2ZrXdbGfgc3tHkHvPtKFq9HiiWjYubdr2PAUpy2VuO5GDaoCGAmlnpDMEnMhK5aUuSiBfo6mT4bc79Cl8DK4CJ82+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YXPZVPib; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YXPZVPib" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F1921F00A3D; Mon, 3 Aug 2026 14:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768119; bh=nwXyZFKSpehk0+5nBqQkijz+4Lthn5Q3qCLKD5iQ6D0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YXPZVPiba0MM0l+dBNlq6FZzsCYfKNT/Xf/ohaVI2I0fqk+H28B+AvHOt2yKSigpx mn2RiOVVH4Y0II8nZguX3XlEjX/dsXOxXEmcLadpbKX43OLIgpC3qhWC9buOAG9mfD /I/m99+rbMmF8U/cBcap/CMtowrrLVesBtmI2zzyDHvlyeiQm1ZJrp93yHBmXs/con yKrZnvyT2NucCV8EhBu9iIPVl/CMhxdc7RoBVI3QT9XO9ndFEo6OX/DWgi6TtILUaX B/lETaA6Zy+nW7eAf64B7Q9/sksQy1bkYT+kaFMB0F1WUQqJDytKigIRq7RJnOSnlK q951pAGsyuhaA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/39] spi: dln2: use modern PM macros Date: Mon, 3 Aug 2026 22:19:34 +0800 Message-ID: <20260803142003.12857-11-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-dln2.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c index 8333dda7d1e8..60085ed04a06 100644 --- a/drivers/spi/spi-dln2.c +++ b/drivers/spi/spi-dln2.c @@ -787,7 +787,6 @@ static void dln2_spi_remove(struct platform_device *pde= v) dev_err(&pdev->dev, "Failed to disable SPI module\n"); } =20 -#ifdef CONFIG_PM_SLEEP static int dln2_spi_suspend(struct device *dev) { int ret; @@ -834,9 +833,7 @@ static int dln2_spi_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int dln2_spi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -852,18 +849,16 @@ static int dln2_spi_runtime_resume(struct device *dev) =20 return dln2_spi_enable(dln2, true); } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops dln2_spi_pm =3D { - SET_SYSTEM_SLEEP_PM_OPS(dln2_spi_suspend, dln2_spi_resume) - SET_RUNTIME_PM_OPS(dln2_spi_runtime_suspend, - dln2_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(dln2_spi_suspend, dln2_spi_resume) + RUNTIME_PM_OPS(dln2_spi_runtime_suspend, dln2_spi_runtime_resume, NULL) }; =20 static struct platform_driver spi_dln2_driver =3D { .driver =3D { .name =3D "dln2-spi", - .pm =3D &dln2_spi_pm, + .pm =3D pm_ptr(&dln2_spi_pm), }, .probe =3D dln2_spi_probe, .remove =3D dln2_spi_remove, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A422040DB47; Mon, 3 Aug 2026 14:42:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768133; cv=none; b=S063ieMOCjkuMe0iIPH1DIl04LidIrFnOZiiCnQMS2wcZuoYShPms1JBzbnsN16oz8ZNS+wzcTcmm7R7t3P+s26+Omi8OCiuplaVyj8xb98/fIdaG5Un1hNgvsIsjh03icl1rRQ/IAm6jsTLjYvBLp9LBGtMAjxqz7C0RNcbkAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768133; c=relaxed/simple; bh=zENYT5DzrS8BJScxKJ1eXzPGAS9tDYUtGL7IBMZyKm8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MDcu9sN2B/S5tLWzKBqLZAk2bV4M6+HDt805McEcUzJWhrViMIYsFdG282DQQRa9wYfg0vp9c+i8RKsYKfa/dhzrq3DpBpqQC6E7c3AD2Gaim2+F4oQBaL80inKnR9nnn0KWKla7DmU59GlC98LDtba2I1cY/s66wMD62jAopc8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F6GckL2+; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F6GckL2+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B8551F000E9; Mon, 3 Aug 2026 14:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768132; bh=7RCVfL8Urn36uGNhjYgoVgTOFCNUrI39Z/L69BlIOVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=F6GckL2+gQYCe0GKb7Ch2/FYD4wS9CU3Do7nHwqd3tmmwiWemXCzBqisEZxZrHjdZ r97U0OpcklaJLYnOTrsdub+Upgi+GHz09naK0ynF5LZo31jGQHgrPFQ70rKoKFJkgW EaAUh3bOFDkMEadvMAPXo85zR7n7UFXLfPDOwRtLxJ5BBF/LmJhON9OZxE19FuyaKf ZPaa9im75e0OipwvgxPLNQkrZBnPQUM+q0Sq/Y5J5OlR5EnbEZtkMmVyD9rAoDBstf tNgb0hQTdfQyf6SLoCV2icyONX6cu43wGDSvLr4gzZ+uhI5/K+eRDq0DZuqyYaDqlt KY2pCsM1m0gUA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/39] spi: dw-pci: use modern PM macros Date: Mon, 3 Aug 2026 22:19:35 +0800 Message-ID: <20260803142003.12857-12-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-dw-pci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c index bfb874f96a26..2f3bea51f1e6 100644 --- a/drivers/spi/spi-dw-pci.c +++ b/drivers/spi/spi-dw-pci.c @@ -154,7 +154,6 @@ static void dw_spi_pci_remove(struct pci_dev *pdev) dw_spi_remove_controller(dws); } =20 -#ifdef CONFIG_PM_SLEEP static int dw_spi_pci_suspend(struct device *dev) { struct dw_spi *dws =3D dev_get_drvdata(dev); @@ -168,9 +167,8 @@ static int dw_spi_pci_resume(struct device *dev) =20 return dw_spi_resume_controller(dws); } -#endif =20 -static SIMPLE_DEV_PM_OPS(dw_spi_pci_pm_ops, dw_spi_pci_suspend, dw_spi_pci= _resume); +static DEFINE_SIMPLE_DEV_PM_OPS(dw_spi_pci_pm_ops, dw_spi_pci_suspend, dw_= spi_pci_resume); =20 static const struct pci_device_id dw_spi_pci_ids[] =3D { /* Intel MID platform SPI controller 0 */ @@ -197,7 +195,7 @@ static struct pci_driver dw_spi_pci_driver =3D { .probe =3D dw_spi_pci_probe, .remove =3D dw_spi_pci_remove, .driver =3D { - .pm =3D &dw_spi_pci_pm_ops, + .pm =3D pm_sleep_ptr(&dw_spi_pci_pm_ops), }, }; module_pci_driver(dw_spi_pci_driver); --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2C7BC3126C0; Mon, 3 Aug 2026 14:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768145; cv=none; b=OjuYfIZc/64KLVS9DO04rykEMS9n+bKAZmI4QqL5VB+IlZTs004UWruW14wMlZO3GheMZNiKCaSik36w+G89Jzhjx3uswbI/a7m66niN+VaAbwdaIkmWmji6VFUgX/j1F5c4Wkg54B9DTy61voH8gRA9QdgsVfsDaIIvsZlG5Mg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768145; c=relaxed/simple; bh=T6TBlRBar53eqthofIswZsTIkJ6Qk7Bsw0hEzLkN7yE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LBywii0C76xYTMS+Ok6KG81h48m4B1kmG+tXLwca3AoDvjww5O8PPG9CDG6IG7d7bwXt42T/u2vRXpIzhCpNUSeFqg9bW0u2p+lHGnZQb1rTJs1hg0+dlMESxG54HjzA83shNd3/QUXblbEHBgCTbnZFE3VciKh1yZTZk/o6WNE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GyI+FJA7; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GyI+FJA7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01A571F00A3A; Mon, 3 Aug 2026 14:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768143; bh=QcD2hSb+okH/yv0zcBzalnMjVU7hZfPP7gfMFbX7jvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GyI+FJA7F4jVjUAnIoiA8GOxeFMfWJ4Uyq7527kt51nlLO2i/6NQCDI5U3Rln396c GkB9MNuhBnZPICfYrsSH5EBeXkaLXdnml1BR8qDqWgFVcjTjp/0tx4X8/scl1H2IqF ZOWWfVP59PKTE2RsFHM5C+Y/AOn5rjjkAabBDMsaiV6dhsnhGiCetYtkX1ZGYWuOfa 7FG9weUCtm8tZ8kAiDKWbMCo9luLpbXooUfhziww0vUl3qGRedOe4/kqHV5IceqqOH cdXgV2M8QT2GAXT6Usoq93sbhHBmJASv4L4TS9jyyikiWf9wrRal3wcsj6GH7smFNu 3NnBativh0xJQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/39] spi: spi-fsl-dspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:36 +0800 Message-ID: <20260803142003.12857-13-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-fsl-dspi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 019d05cdefe6..ef86267c1772 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -1460,7 +1460,6 @@ static int dspi_init(struct fsl_dspi *dspi) return 0; } =20 -#ifdef CONFIG_PM_SLEEP static int dspi_suspend(struct device *dev) { struct fsl_dspi *dspi =3D dev_get_drvdata(dev); @@ -1500,9 +1499,8 @@ static int dspi_resume(struct device *dev) =20 return 0; } -#endif /* CONFIG_PM_SLEEP */ =20 -static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume); =20 static int dspi_target_abort(struct spi_controller *host) { @@ -1727,7 +1725,7 @@ static void dspi_shutdown(struct platform_device *pde= v) static struct platform_driver fsl_dspi_driver =3D { .driver.name =3D DRIVER_NAME, .driver.of_match_table =3D fsl_dspi_dt_ids, - .driver.pm =3D &dspi_pm, + .driver.pm =3D pm_sleep_ptr(&dspi_pm), .probe =3D dspi_probe, .remove =3D dspi_remove, .shutdown =3D dspi_shutdown, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 97EAE34F497; Mon, 3 Aug 2026 14:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768156; cv=none; b=FZ/LovpCKk8thPYEA7oQsnBiGY7cf77XMAHacuf9DaLK9g7ogsguoDzX8UdwWxH/AvYNF9CMdagxOJQg8/Qb0EZQy4nT6LazDStu8gmZRV+e8bDKZV1l1pXeo3aJq/PF7Ky8jGd7+19q55HZJ016ORpnk2iI4I4kS0atvf6o7n8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768156; c=relaxed/simple; bh=wi4rSLjF8igkEk5Hb4y1uIgJc2aGWF9+Vfs+f881cKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d/fk1KlHGrrenbICZNfDhADZ0seSTNzMXWsENwqS6EeUT6ZPMl36xiATx0KQfhDNSurVYejSI9R+V6VVJwlgmuKddtpowwmP923UPWtGkwytAQsW6nAnoLp1GTWswn0JHCoWRu/ncHx5DvdVswIpAmFAy0ySQkTf1+IvEfhDA20= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=T2Z23oOB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="T2Z23oOB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 405881F000E9; Mon, 3 Aug 2026 14:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768155; bh=vMpPIe2+3JKmGQVDSBH5+n4a6i7E8FOu08o9TWP+o54=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=T2Z23oOBdOFyR2gO3/YnPcslmtdAI05sg4yCtD4fHqI1rtigB793GgBQI6bWSdjlL RHRYsz6Zyje283JV3wn+4ZW0bHprbFh9RX8+qCD2DAij77FiuL6dGVPTabSaPqBZfv gsWiXj2cwKL7BXwyJWDsQ9CJf3e7Ok8Fzpa7bbXYsDrga4iG0HjR/cW5+weX4LUlLa 0vfArkZmv/crDwI2wgyaAon6P9MQJkmi9CzuksvT2UkbKS8AXoFhHkc/G4A1q6R4vq ZF+ezXXqPcCoUKjz6idfBCFMVgLrpoI7xHUeTMol4gjHFGiD7paQTTwkx6gVSdvB3/ RU9mXrCuDsnaA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/39] spi: fsl-espi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:37 +0800 Message-ID: <20260803142003.12857-14-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-fsl-espi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 1341bdd7db75..4ac8f9b06783 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -580,7 +580,6 @@ static irqreturn_t fsl_espi_irq(s32 irq, void *context_= data) return IRQ_HANDLED; } =20 -#ifdef CONFIG_PM static int fsl_espi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -606,7 +605,6 @@ static int fsl_espi_runtime_resume(struct device *dev) =20 return 0; } -#endif =20 static size_t fsl_espi_max_message_size(struct spi_device *spi) { @@ -785,7 +783,6 @@ static void of_fsl_espi_remove(struct platform_device *= dev) pm_runtime_disable(&dev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int of_fsl_espi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -811,12 +808,10 @@ static int of_fsl_espi_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif /* CONFIG_PM_SLEEP */ =20 static const struct dev_pm_ops espi_pm =3D { - SET_RUNTIME_PM_OPS(fsl_espi_runtime_suspend, - fsl_espi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(of_fsl_espi_suspend, of_fsl_espi_resume) + RUNTIME_PM_OPS(fsl_espi_runtime_suspend, fsl_espi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(of_fsl_espi_suspend, of_fsl_espi_resume) }; =20 static const struct of_device_id of_fsl_espi_match[] =3D { @@ -829,7 +824,7 @@ static struct platform_driver fsl_espi_driver =3D { .driver =3D { .name =3D "fsl_espi", .of_match_table =3D of_fsl_espi_match, - .pm =3D &espi_pm, + .pm =3D pm_ptr(&espi_pm), }, .probe =3D of_fsl_espi_probe, .remove =3D of_fsl_espi_remove, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E36EF3126C0; Mon, 3 Aug 2026 14:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768168; cv=none; b=Ye6SJe7iaafY5i0UZ+MlgWLPPkBXr9lp92Fly9ulVyVxBJxeGK0b+DAVO0aCj+1SBv1LEwCUwfl9sCrilbUCac/xCUmWqyjAa2i5cWTa3OLQWktMh+1l4MCNXmQReHEPPZJYv/QisNW8KugS/Fqqm8NajiODvRsaANXZQ/BvBxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768168; c=relaxed/simple; bh=cIObQkN3i8E7FNYuQ1EXWCTa23k7x49O2WzfO1Nwtjc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KTq/Rq58W/gkrguPsyvtT3oJWiVjNhA68gNlS2nVJfssis52/OUWih/SuI5tWcIZhxwxiklRFaYQBaP11G0MfhKjptsK7RLzLW2xPz6sfXlG68VPA3ddjghH+3Odrbttw/0TPS/DKx2RsmFKfNH02uhj84ja5Ws4WF71dYWfkms= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jq0SzQuC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jq0SzQuC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A589F1F00A3A; Mon, 3 Aug 2026 14:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768166; bh=mu04nVcHEVGTHqVvLbmhVSQzsCdFINUhaQSAgnCXqz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Jq0SzQuCKBUhLxcWGUxwGft/o2OElSpoXRZRXR5jPNRm2yedF5jG171F8u160+piV UludJvSE1p6LTZkWNzEW+L5sOXZbb9S0s06zMY2HGUYUqvriUb6zLIylRjYZ66jitu zPhbZBW62udEUl3MN1fFYwSbhRmiGV8kNP7qYYlfZk9ucSY5GE1jJKC16rDDctQ1J6 wEwpyeRDu1YA1cHZWZdzFofBUNFXP/Ce8dIBtY4kcj10qnAjO3y6eaF9GRsG3TFtzV m+d5L6W/aTUn8ejSvS3Snclm3kfH6IrOSYzg47cPEWI8iiM4+OSNrs2wHKKy6oB51C bA2q3zXjUjhbQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/39] spi: fsl-lpspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:38 +0800 Message-ID: <20260803142003.12857-15-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-fsl-lpspi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index e14753144e19..5aa0a75b4e57 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -842,7 +842,6 @@ static irqreturn_t fsl_lpspi_isr(int irq, void *dev_id) return IRQ_NONE; } =20 -#ifdef CONFIG_PM static int fsl_lpspi_runtime_resume(struct device *dev) { struct spi_controller *controller =3D dev_get_drvdata(dev); @@ -876,7 +875,6 @@ static int fsl_lpspi_runtime_suspend(struct device *dev) =20 return 0; } -#endif =20 static int fsl_lpspi_init_rpm(struct fsl_lpspi_data *fsl_lpspi) { @@ -1056,8 +1054,8 @@ static int fsl_lpspi_resume(struct device *dev) } =20 static const struct dev_pm_ops fsl_lpspi_pm_ops =3D { - SET_RUNTIME_PM_OPS(fsl_lpspi_runtime_suspend, - fsl_lpspi_runtime_resume, NULL) + RUNTIME_PM_OPS(fsl_lpspi_runtime_suspend, + fsl_lpspi_runtime_resume, NULL) SYSTEM_SLEEP_PM_OPS(fsl_lpspi_suspend, fsl_lpspi_resume) }; =20 --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6198D41687C; Mon, 3 Aug 2026 14:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768178; cv=none; b=HO7AjI9Rqw9M7LYikCTlkyPkCSmCmxPkKwXhyBYLBxFh7vU++nYb5+Aibfw5Hf76GY8X2Sar0L1vGSE878JQ8yUlFYKxsnKljlMhNAE0nJUbD02+9omChXxzHRLJz7setjGa6FHcglZF4911NCLvaRIJkug5LGqaHduiwrQyQwI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768178; c=relaxed/simple; bh=YjEkptkkjUucN7xS1M9k9TojJa6LecmCsbw/OO3hswo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LWQE93Jwgv1oFjC26GzSD2OxEUDegRD1o53SvdCEEOzlN+Csk95ks8lnRDWKqbGOYjvrhRXdhUROyKtc7fRhPaDiqkYJVUDbqE9+FcB8J8sigGovLzkSilRRM8b2sNW/Nrcd8UDD/VJvOOoTaJ85sDPSUdfWAIcL/ImJbi599rE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gXHzpm6H; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gXHzpm6H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36BFA1F000E9; Mon, 3 Aug 2026 14:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768177; bh=8NjXoA9GQkX96CvZjFUHkqjbXY29+/71VYBPqzvTc1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gXHzpm6HXTzihvojHbQPerVlSMds4SS+IIHVpWnxJj6n1JMvLVLQ+PPWXb0rgHhF1 iFSWtQWQFDDbhupDplAViZ4CRDaEGy5IgKZrHci9RCimxh6Cix+WZFO9meDj+rAD0b dN8elbzLrN2joyTd6C9qOFn9/Pqkp3KRxFBZKTnWsQyiCwA/Fxw+uQzKfRO3Zp5NMO jAtKmRTXr1E8N6qqiagpSKaPX397MjJ6izkxy5+k14gCKqe+qlTqJy4/jdNTgT/2GS 6+v/sHOu4o1IN9QgUH8bGi9RslrknyiDmdtPjhXmpnz+ddtixiFb6Xk/2mqBsB3n3r Wb69/7L7nSqFQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/39] spi: qcom-geni: use modern PM macros Date: Mon, 3 Aug 2026 22:19:39 +0800 Message-ID: <20260803142003.12857-16-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-geni-qcom.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index 26e723cfea61..3b055d087b55 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -1150,7 +1150,7 @@ static int spi_geni_probe(struct platform_device *pde= v) return devm_spi_register_controller(dev, spi); } =20 -static int __maybe_unused spi_geni_runtime_suspend(struct device *dev) +static int spi_geni_runtime_suspend(struct device *dev) { struct spi_controller *spi =3D dev_get_drvdata(dev); struct spi_geni_master *mas =3D spi_controller_get_devdata(spi); @@ -1166,7 +1166,7 @@ static int __maybe_unused spi_geni_runtime_suspend(st= ruct device *dev) return geni_icc_disable(&mas->se); } =20 -static int __maybe_unused spi_geni_runtime_resume(struct device *dev) +static int spi_geni_runtime_resume(struct device *dev) { struct spi_controller *spi =3D dev_get_drvdata(dev); struct spi_geni_master *mas =3D spi_controller_get_devdata(spi); @@ -1183,7 +1183,7 @@ static int __maybe_unused spi_geni_runtime_resume(str= uct device *dev) return dev_pm_opp_set_rate(mas->dev, mas->cur_sclk_hz); } =20 -static int __maybe_unused spi_geni_suspend(struct device *dev) +static int spi_geni_suspend(struct device *dev) { struct spi_controller *spi =3D dev_get_drvdata(dev); int ret; @@ -1199,7 +1199,7 @@ static int __maybe_unused spi_geni_suspend(struct dev= ice *dev) return ret; } =20 -static int __maybe_unused spi_geni_resume(struct device *dev) +static int spi_geni_resume(struct device *dev) { struct spi_controller *spi =3D dev_get_drvdata(dev); int ret; @@ -1216,9 +1216,8 @@ static int __maybe_unused spi_geni_resume(struct devi= ce *dev) } =20 static const struct dev_pm_ops spi_geni_pm_ops =3D { - SET_RUNTIME_PM_OPS(spi_geni_runtime_suspend, - spi_geni_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(spi_geni_suspend, spi_geni_resume) + RUNTIME_PM_OPS(spi_geni_runtime_suspend, spi_geni_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(spi_geni_suspend, spi_geni_resume) }; =20 static const struct of_device_id spi_geni_dt_match[] =3D { @@ -1231,7 +1230,7 @@ static struct platform_driver spi_geni_driver =3D { .probe =3D spi_geni_probe, .driver =3D { .name =3D "geni_spi", - .pm =3D &spi_geni_pm_ops, + .pm =3D pm_ptr(&spi_geni_pm_ops), .of_match_table =3D spi_geni_dt_match, }, }; --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 ABE7238837D; Mon, 3 Aug 2026 14:43:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768189; cv=none; b=VhRITwlvebrdOMil1CGx6gaOu9dmHxm3RIFEu8VJKDY5CPINlSYPbB2LWPbbc7iSQLuXmIFy8j5BcNNoYzKfS/5APTSd02XyGVgetBQv9LrV/Qp8C3liPxCWlzanZIYOwOiEfLSRBUr28xSUoDZ4KetkSF7DyZ7ENOoz4KWhI5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768189; c=relaxed/simple; bh=OdCi3x60R6oZKpMlzyxLYNTTaKUiDXUPphpFYWqThWQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h/EY7m3nrS9pDnNnmPL8lDMhWZlcGgBotIulKG/6StNzfDPLY1Q0lkznI2vCZQSwOchdfnwQ/MLhClw+Htx9kmIWAjlcaHCaUGpmbbNmdyVI5tzFuVyP+ILerO9nUeHOx9s3T0LpobfykZAUfmc5g+Eoq57G41KYwZ3tqVvVIdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hUAkb6ts; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hUAkb6ts" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 965C21F00A3A; Mon, 3 Aug 2026 14:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768188; bh=daGpi8WW17Z4aS26DoYco+2G9yFG/WRrelS5U9+0Kfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hUAkb6ts/hWwVE48dyESArnWGp5vpZQVxEQm6uGv32P9H3PorTaqd+GXSDJKXBoob dHraq16tB3if1Lmc16qL1Uo/oZ/cWQOxbDMGY7j5/bUVSbox6eEB+nkwuBHtleYtYV qAdA7OVX0h1pGYNJInajj6nqXKsGMA39XqN+EbG/IxVF8QI2atbT85WVuYqfDiNevO yJkUcNO5ZBPCPZAKsXs2RxcAONlfzBuOCnAhHJY73ELsqpC/AGwmo3tTz+El4yanG9 hXe07rBs4ko2D6W7/Sd5aEeDpGYLxTWeqkSfAodKRMwy4HV3lUyJn5ZMA7P8CsfnQX cGwiW+/RRNgmg== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/39] spi: img-spfi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:40 +0800 Message-ID: <20260803142003.12857-17-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-img-spfi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index aec724e3f824..19c8250ddb64 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -677,7 +677,6 @@ static void img_spfi_remove(struct platform_device *pde= v) } } =20 -#ifdef CONFIG_PM static int img_spfi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -706,9 +705,7 @@ static int img_spfi_runtime_resume(struct device *dev) =20 return 0; } -#endif /* CONFIG_PM */ =20 -#ifdef CONFIG_PM_SLEEP static int img_spfi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -730,12 +727,10 @@ static int img_spfi_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif /* CONFIG_PM_SLEEP */ =20 static const struct dev_pm_ops img_spfi_pm_ops =3D { - SET_RUNTIME_PM_OPS(img_spfi_runtime_suspend, img_spfi_runtime_resume, - NULL) - SET_SYSTEM_SLEEP_PM_OPS(img_spfi_suspend, img_spfi_resume) + RUNTIME_PM_OPS(img_spfi_runtime_suspend, img_spfi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(img_spfi_suspend, img_spfi_resume) }; =20 static const struct of_device_id img_spfi_of_match[] =3D { @@ -747,7 +742,7 @@ MODULE_DEVICE_TABLE(of, img_spfi_of_match); static struct platform_driver img_spfi_driver =3D { .driver =3D { .name =3D "img-spfi", - .pm =3D &img_spfi_pm_ops, + .pm =3D pm_ptr(&img_spfi_pm_ops), .of_match_table =3D of_match_ptr(img_spfi_of_match), }, .probe =3D img_spfi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 644D74137B9; Mon, 3 Aug 2026 14:43:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768201; cv=none; b=dGkoF9fpUpVX6JTmY2WWKDBZn/yl8X5k0WxlTRHs3zfkZtIMt1r/Za+alm41g3Mol+z3TDfmR6NwzNS9KCGX8MCHvQFPvrG1foxddpHSevg4dxMTJzPrddHDw9loDBdwknk+8q08TkzT/fHvRqRDWqS0qWAH1KupfL7BXbA7eRE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768201; c=relaxed/simple; bh=128D1CmfpB4hDCFvZHbrEcuX3UD620EghvWdnOwKeTw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JSDvbi5L2sYn1SVt1/ytlYtIrA3PVMbv2b51x27zzozeeOtSz7WZXzldJaB7NaZJ/arrgM8tc7HdDgh42dE20ScoC6C43HPxw9DBeSReIoCdqlPMmBp8oJaSHnTrz00CTnFb1P/JokYdV8XKZqHmb3fS1cAYsBbK26FhC/9lUSE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y2s49sww; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y2s49sww" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9A0D1F000E9; Mon, 3 Aug 2026 14:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768200; bh=ivN5Aq/EyYjo0qiUP2YpxxDgbYqAgKxP7Zc3nRYCQaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Y2s49swwDTPZYVKstRSKor/OasJIfy5JkXJVanG3QXw37G34OoJG3D6julTn2dyDl EdbTyzXnGJiWvebreM1RwPfcXqZTA+fGI9ERxBr4Q4/zg72bwvVlNoX5yDv+uFt6Pi czWRNBbiEHXCiRVCLFf+/tfvTdjmUNiodd3f9vU6v3mDU8GSzclXIhRZDav1ass1Mx CrFfOUW5WedVvdzly9IvbTeIEvNSYQ4F56lNTtNMaxkBiZ+88beZVhDPsMY6Z2OJfl KOD1b/r/ySAdyoznCFGpo17czmLcqMsS9N1zWkoD/Yh4SIROoWNcShHNoWBauleV3Y 8nvm8GxkdojBw== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/39] spi: loongson: use modern PM macros Date: Mon, 3 Aug 2026 22:19:41 +0800 Message-ID: <20260803142003.12857-18-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-loongson-core.c | 4 ++-- drivers/spi/spi-loongson-pci.c | 2 +- drivers/spi/spi-loongson-plat.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-loongson-core.c b/drivers/spi/spi-loongson-cor= e.c index f50423c3db4c..30b6a7176ce9 100644 --- a/drivers/spi/spi-loongson-core.c +++ b/drivers/spi/spi-loongson-core.c @@ -229,7 +229,7 @@ int loongson_spi_init_controller(struct device *dev, vo= id __iomem *regs) } EXPORT_SYMBOL_NS_GPL(loongson_spi_init_controller, "SPI_LOONGSON_CORE"); =20 -static int __maybe_unused loongson_spi_suspend(struct device *dev) +static int loongson_spi_suspend(struct device *dev) { struct loongson_spi *loongson_spi; struct spi_controller *controller; @@ -249,7 +249,7 @@ static int __maybe_unused loongson_spi_suspend(struct d= evice *dev) return 0; } =20 -static int __maybe_unused loongson_spi_resume(struct device *dev) +static int loongson_spi_resume(struct device *dev) { struct loongson_spi *loongson_spi; struct spi_controller *controller; diff --git a/drivers/spi/spi-loongson-pci.c b/drivers/spi/spi-loongson-pci.c index 2fe5419a8dd2..ccc26efd88fe 100644 --- a/drivers/spi/spi-loongson-pci.c +++ b/drivers/spi/spi-loongson-pci.c @@ -43,7 +43,7 @@ static struct pci_driver loongson_spi_pci_driver =3D { .probe =3D loongson_spi_pci_register, .driver =3D { .bus =3D &pci_bus_type, - .pm =3D &loongson_spi_dev_pm_ops, + .pm =3D pm_sleep_ptr(&loongson_spi_dev_pm_ops), }, }; module_pci_driver(loongson_spi_pci_driver); diff --git a/drivers/spi/spi-loongson-plat.c b/drivers/spi/spi-loongson-pla= t.c index 550b237838c0..6f8202264341 100644 --- a/drivers/spi/spi-loongson-plat.c +++ b/drivers/spi/spi-loongson-plat.c @@ -35,7 +35,7 @@ static struct platform_driver loongson_spi_plat_driver = =3D { .driver =3D { .name =3D "loongson-spi", .bus =3D &platform_bus_type, - .pm =3D &loongson_spi_dev_pm_ops, + .pm =3D pm_sleep_ptr(&loongson_spi_dev_pm_ops), .of_match_table =3D loongson_spi_id_table, }, }; --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 774DC411FA9; Mon, 3 Aug 2026 14:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768213; cv=none; b=JgntCkVFcsovyddVxWjNhNwJxQjjNcIK4cst6IFuLTw7OsWRJZXqWnsFrE10GOM3spU+8eqOoiEoVYN/3bqxPF6LoTMTalEL6fjVqSbrU+rOW/uRQPIqXeATqMwwg+wkyDDap/82QMAJ1HacZKFUIvyeHNs/6Gr2i2FfcseCXSQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768213; c=relaxed/simple; bh=47hBFYwv1QdhUP4ows3APuspFj39h+bkn8E16rn4EEs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ed46SP6DYOKiti5UBCB8it9nW+6ZVvjrkKXoA23Ky0E6dFmDiOhLRFO4gVQkmwzDMUQz0pRia1LJ+UCDLA2aq49KRcR3h8RuN6Ychi/XpxVn/giGhu3dBPgNPwNY5bpxS5+nfthtLSN+54gmM2xC5hJPGTFVlVCwgIzXrb11Mt8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q2WPZiZQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q2WPZiZQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D6771F00A3A; Mon, 3 Aug 2026 14:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768212; bh=qlIUiMjQYU3CDsVD7Nq654m9H5XXKXU9Fx2wGOali6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Q2WPZiZQm+TAUHy80rzSrKMgpSEkbdagezOFxnshMyTOfln15G1ptgLJTN4RoGiAU fS8j9n9fgEVK5x87v+O3HTxsNS7Vo2RaUqBLrvMjvSVIZH0JByv6XSs0dIFM+Nlksj jSNao/hBQDc/sBETw11b5p7tyScC4+TEK8+xI07pnjOaL1ArOgzppdkEEvx0xvjh6T e+O1U1EnMOjFSkEYt99NItGIY+RTcSqHHsW3uqQBqmweHUrvsGWNwOCnXbIVMxxdmL LCP7JN/lNfDWnN9lctSWJHQVdh8lockkPjQ1/c3hXc9GNgDX1BeX7wnrzJkucPTs2W 8dbV0G4jIhF2g== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/39] spi: meson-spifc: use modern PM macros Date: Mon, 3 Aug 2026 22:19:42 +0800 Message-ID: <20260803142003.12857-19-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-meson-spifc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c index e36aa94bbdae..2ef090dec7ba 100644 --- a/drivers/spi/spi-meson-spifc.c +++ b/drivers/spi/spi-meson-spifc.c @@ -348,7 +348,6 @@ static void meson_spifc_remove(struct platform_device *= pdev) pm_runtime_put_noidle(&pdev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int meson_spifc_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -385,9 +384,7 @@ static int meson_spifc_resume(struct device *dev) =20 return ret; } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int meson_spifc_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -405,13 +402,12 @@ static int meson_spifc_runtime_resume(struct device *= dev) =20 return clk_prepare_enable(spifc->clk); } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops meson_spifc_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(meson_spifc_suspend, meson_spifc_resume) - SET_RUNTIME_PM_OPS(meson_spifc_runtime_suspend, - meson_spifc_runtime_resume, - NULL) + SYSTEM_SLEEP_PM_OPS(meson_spifc_suspend, meson_spifc_resume) + RUNTIME_PM_OPS(meson_spifc_runtime_suspend, + meson_spifc_runtime_resume, + NULL) }; =20 static const struct of_device_id meson_spifc_dt_match[] =3D { @@ -427,7 +423,7 @@ static struct platform_driver meson_spifc_driver =3D { .driver =3D { .name =3D "meson-spifc", .of_match_table =3D of_match_ptr(meson_spifc_dt_match), - .pm =3D &meson_spifc_pm_ops, + .pm =3D pm_ptr(&meson_spifc_pm_ops), }, }; =20 --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 05F3033B966; Mon, 3 Aug 2026 14:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768225; cv=none; b=nFEHNOQRmUdnyBuy64FeghpGYK6FsuCjPfeM61c2SSJswBdb3XOo6vww8uSq6yxrG2vQtfCIYGflyf/Q6WhBVuIPNT3fOgWX2Vf8frPXKL+UxNGv5WJnRnGLs/Gf2hkgqA/JYKpJ7GeQ2GK4jpqieFaSNrqjdx8inZONpNltGzY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768225; c=relaxed/simple; bh=eEw8Qk2hOhPUcBITw/f2Wb4FvaPaelHXMrBfA+OllwM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZkP6R5dYLC88QbRmnk9t1Lz9ZUcoKxMAvQQy8fnS89WQhXL0lWc4GnnteHLfD88B06FihsoAVpCTj21XulYbguzOt+T2FHzRUwoQiE5tCcNZesKvCiY2JqBr1qTFRjMPea2LK+ctIa0SMzSymcMp2kiLKflSF0yUYW+/mlGdaK0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MA9a0iDQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MA9a0iDQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F7381F00A3D; Mon, 3 Aug 2026 14:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768223; bh=Aq5eKq2jQllo0UFgmqt8MgpdseF2d22YCYfpSye94Lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MA9a0iDQTpjsMzVcuXmY7ReHpQMBNOgCbYtLmvRch+jN2aRExK8yKwHhx4J09UmF8 lfBwmvY3/zRg9y5Y3O6NiLnvTUkD4FB8hA7NKlqQqN0vuq3L14ykeLyuW2axpeeQLK 9T0U25UL4pRak4mSI1Rh4ej111CHTcQC/cRdk648UUcwkWlV8KP/1ZSMtu5304+tlF cI154XM0qwPXkFa5tub+H9lcppaNWrQrrqT9ffP1zRuP89Lq1GmvJk+fdUXLHxyykl p6qSGA18xKWAOYae9WySvYE8Pdu5epIYHPxpTHLf45HeFsQYRFJdgdAGxI6BUJkFGc wta0SSjtlNQrw== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/39] spi: mt65xx: use modern PM macros Date: Mon, 3 Aug 2026 22:19:43 +0800 Message-ID: <20260803142003.12857-20-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-mt65xx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 96f8555be983..b845a599f7c6 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -1367,7 +1367,6 @@ static void mtk_spi_remove(struct platform_device *pd= ev) pm_runtime_disable(&pdev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int mtk_spi_suspend(struct device *dev) { int ret; @@ -1419,9 +1418,7 @@ static int mtk_spi_resume(struct device *dev) =20 return ret; } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int mtk_spi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -1473,18 +1470,16 @@ static int mtk_spi_runtime_resume(struct device *de= v) =20 return 0; } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops mtk_spi_pm =3D { - SET_SYSTEM_SLEEP_PM_OPS(mtk_spi_suspend, mtk_spi_resume) - SET_RUNTIME_PM_OPS(mtk_spi_runtime_suspend, - mtk_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(mtk_spi_suspend, mtk_spi_resume) + RUNTIME_PM_OPS(mtk_spi_runtime_suspend, mtk_spi_runtime_resume, NULL) }; =20 static struct platform_driver mtk_spi_driver =3D { .driver =3D { .name =3D "mtk-spi", - .pm =3D &mtk_spi_pm, + .pm =3D pm_ptr(&mtk_spi_pm), .of_match_table =3D mtk_spi_of_match, }, .probe =3D mtk_spi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A0C51314A8E; Mon, 3 Aug 2026 14:43:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768237; cv=none; b=dym1pzQx3tHUyriTye70RgsjokZwVR3vhJyea/ZGVdvyOrxDOprkdcjPaSar8dZ4+67J9G1RlngPeBOS6frksnMSM4YJlSaUijW/ktPwSfK9P+ZCGm8MV/c0/FdcVbvg8Gi27rnqu2mqZbA552fjDUwerb9Ltdf7HuWLBDe5a7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768237; c=relaxed/simple; bh=6x1chWzRmz3GtKAZMXqA3VpMzOHiVAzj3Ew/WfpXWMQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Es1n+mHVXFKM5y0xkgmB/CONsSVQadueystK1JSdswEVd6prty/QrjhWAxIY2ZpJt2ziA0UoSOk3ks5ak3jqu8AW2ZLZmANqDA0bX1GUeA1O2E9RvANlRLxcKhN2DAXbrR0w69IM6NwgM2aLJaNx53AbP/1Xg4mBfMUFhV8NGKk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c6/Hu9Se; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c6/Hu9Se" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57C0B1F000E9; Mon, 3 Aug 2026 14:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768236; bh=hZrAkotQa6HumBZo0ApaJSkT743EScJ3Bb7qgki/piI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=c6/Hu9SewVq06BlnIrTLSNmsjzLZk6VF7rXadROXYNpr89qk5YBPDf0S/a9L3xnUJ awTLWdx+cE+TRMObOg/4kf+zLC2RaT4J+eb7eFNbctR1MwX8/o+5Y2rmurmZT7F1CZ 7N6bF/vZ4AMu/unLS/LFLVJINW4AefPRjnrxF4FAYrF/Mnq4jhqdLrqXB6dJjw6SJJ yN0xINHYUghpn21gz4QmvDCnNS5UJxMRF0AyahuOGVx9iUvSj9QfrMX/dWkTMScDvu 5s8dH2cfNq3ch8kcIn/r6wXiImO4V4ZDuJlQE1ZwxGQrmiEvFHGM/m9xDpqW1YKKd4 WFXozR35JcGFA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 20/39] spi: mtk-nor: use modern PM macros Date: Mon, 3 Aug 2026 22:19:44 +0800 Message-ID: <20260803142003.12857-21-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-mtk-nor.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c index 74f34537b02c..5e1fdbb40ffb 100644 --- a/drivers/spi/spi-mtk-nor.c +++ b/drivers/spi/spi-mtk-nor.c @@ -947,7 +947,7 @@ static void mtk_nor_remove(struct platform_device *pdev) mtk_nor_disable_clk(sp); } =20 -static int __maybe_unused mtk_nor_runtime_suspend(struct device *dev) +static int mtk_nor_runtime_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct mtk_nor *sp =3D spi_controller_get_devdata(ctlr); @@ -957,7 +957,7 @@ static int __maybe_unused mtk_nor_runtime_suspend(struc= t device *dev) return 0; } =20 -static int __maybe_unused mtk_nor_runtime_resume(struct device *dev) +static int mtk_nor_runtime_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct mtk_nor *sp =3D spi_controller_get_devdata(ctlr); @@ -965,12 +965,12 @@ static int __maybe_unused mtk_nor_runtime_resume(stru= ct device *dev) return mtk_nor_enable_clk(sp); } =20 -static int __maybe_unused mtk_nor_suspend(struct device *dev) +static int mtk_nor_suspend(struct device *dev) { return pm_runtime_force_suspend(dev); } =20 -static int __maybe_unused mtk_nor_resume(struct device *dev) +static int mtk_nor_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct mtk_nor *sp =3D spi_controller_get_devdata(ctlr); @@ -986,16 +986,15 @@ static int __maybe_unused mtk_nor_resume(struct devic= e *dev) } =20 static const struct dev_pm_ops mtk_nor_pm_ops =3D { - SET_RUNTIME_PM_OPS(mtk_nor_runtime_suspend, - mtk_nor_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(mtk_nor_suspend, mtk_nor_resume) + RUNTIME_PM_OPS(mtk_nor_runtime_suspend, mtk_nor_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(mtk_nor_suspend, mtk_nor_resume) }; =20 static struct platform_driver mtk_nor_driver =3D { .driver =3D { .name =3D DRIVER_NAME, .of_match_table =3D mtk_nor_match, - .pm =3D &mtk_nor_pm_ops, + .pm =3D pm_ptr(&mtk_nor_pm_ops), }, .probe =3D mtk_nor_probe, .remove =3D mtk_nor_remove, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 08E58415F08; Mon, 3 Aug 2026 14:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768254; cv=none; b=pbmel/1eNj43uIlQq/4ZllulIwUL+IEWYgxRBFcnv/O4nZnN7E6SjITIh3IqZQhs4RZ6oBIlvTu2BHoSHZUb4JafAOQHhiVY9K50f0tpwWzqqAWMuKbMkpuUoLpNiKQc95f095A3y50js2W8ao2D4gyz+nH5lh4hUMw9mWUFM3s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768254; c=relaxed/simple; bh=DunFNjHwf3icjYe5ZHlztX4j2oXJeKJ129eE46vw5/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uUTAO/EYdmMG/11SlaSpIO9XHbeyt0ZtzZD0fIWjQ36gJVOJbGcyJ4Myi6zx5f7qTUI+qI9JR3blsvd6hq11XiM3Kn+6TQc4QSEOf/oZZmo94H+O1oKfdIvLArl230qFCkVft3Jq/S86beQ5cpLY7GLMShYDv6QY1t6loF2vBJo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OrYZUQoq; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OrYZUQoq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2CBD1F00A3A; Mon, 3 Aug 2026 14:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768252; bh=0Wy9JOaeFGBeAJk92ZmHHFd5ZfCYJpWQRTgBXTS91c4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OrYZUQoq0laq8B7dUK0dQO+htHpXQwZrGnduhQUnF9/U6evzdxDerO+bgxkoMHVVQ x4oxojMN+2ehH0hWDWAzt5DZErNKnTLZjlckqMo+JDlvFmhGRs8RUYVxm2TqWOZ05C /qnkRdlRhPXHlIB0Xd55ML6EhGbO1+4GP6MNMEjqJ1G8V1zM6JbOjgU1minK09vy1t U69m6JMKdko8At1EYn16xcgcgS607UBhE1xBIepZU0ma4h+zSfAPnCVmhAvGIMfhDO mSegpMW2pEmO/Jv7Jiq23zw6Q3sqUMa1hHFpgi3z50FaZsGN6Mogty05BM6UKRvFmX vaTVmnq9UmkhQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/39] spi: mxic: use modern PM macros Date: Mon, 3 Aug 2026 22:19:45 +0800 Message-ID: <20260803142003.12857-22-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-mxic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c index 83b688e65284..e3c85e5191e3 100644 --- a/drivers/spi/spi-mxic.c +++ b/drivers/spi/spi-mxic.c @@ -721,7 +721,7 @@ static int mxic_spi_mem_ecc_probe(struct platform_devic= e *pdev, return 0; } =20 -static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev) +static int mxic_spi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct mxic_spi *mxic =3D spi_controller_get_devdata(host); @@ -732,7 +732,7 @@ static int __maybe_unused mxic_spi_runtime_suspend(stru= ct device *dev) return 0; } =20 -static int __maybe_unused mxic_spi_runtime_resume(struct device *dev) +static int mxic_spi_runtime_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct mxic_spi *mxic =3D spi_controller_get_devdata(host); @@ -748,8 +748,7 @@ static int __maybe_unused mxic_spi_runtime_resume(struc= t device *dev) } =20 static const struct dev_pm_ops mxic_spi_dev_pm_ops =3D { - SET_RUNTIME_PM_OPS(mxic_spi_runtime_suspend, - mxic_spi_runtime_resume, NULL) + RUNTIME_PM_OPS(mxic_spi_runtime_suspend, mxic_spi_runtime_resume, NULL) }; =20 static int mxic_spi_probe(struct platform_device *pdev) @@ -850,7 +849,7 @@ static struct platform_driver mxic_spi_driver =3D { .driver =3D { .name =3D "mxic-spi", .of_match_table =3D mxic_spi_of_ids, - .pm =3D &mxic_spi_dev_pm_ops, + .pm =3D pm_ptr(&mxic_spi_dev_pm_ops), }, }; module_platform_driver(mxic_spi_driver); --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 F1102418A2D; Mon, 3 Aug 2026 14:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768266; cv=none; b=chJimTUqlnrcDZ4PS4VVSbo6VpGElzAJNd9w92FNOEOoMqLOekJ2LF0nEz/OV53p48rvkUjNCuYs1QguJO+gYTy+zBILwrNkpCUZ6eWwGJr8sXmlW+kwGQ/C0ndTBcDWdGD9LxRjFjfTpghnN9SyILVfHwIKgN96UI7Oz5r4HxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768266; c=relaxed/simple; bh=OZMf4gTIrZ/pVY27YsjH+kf+35klhlZ0okl4yrZutk8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kfire+EvWACYJ9P+2edxHJVoYHLb9k7jbjK5XkFgZB9bFH5V7bqtcjPpImHkLhBjupk9sA//bfvMfZ+I4aPmztkHZH4gmbNY2eLRcnFcsv05CuDo/n2mahKLUzUCVA/LoCmicGonUb/VFu6YpOw9BrppH7rOEVO/x9nfhRzpdkc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ok4kDBXP; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ok4kDBXP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 591581F000E9; Mon, 3 Aug 2026 14:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768264; bh=4BXG8pZY3UvhCBljpc68bnMGflRKin05J/fYHypUzMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ok4kDBXPSJgspsKclwuqrWvx1gikabqhUoBWl1UTXy4VvijFBTYHJ8Besb/e1EjGu 3oWTEE3S/wuNNjQcZpMEAN/2aqgZR9CsCyiatv8/J+9uLpJnfLSolhiBWh2W9g0QXv CBk+HiMdtY4wYrVzLuOH04wHdm4vXOQXAuwxZIl95GCPxvmbGHI6o9rEDDGGzdw7PP bUOddhnTLrdflFUmwpH0upbXWRwp/rY+7QZv3b7f/7a09GJNO8nJ/SvTnYcelEQEUt TOtpmZ67F8Uezvo4nvkMDf7Txn7ssqS5l7jqIAB7g6DGCGqF7h04LjE8k80taspWlE +NemcXfMoYH7Q== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 22/39] spi: omap2-mcspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:46 +0800 Message-ID: <20260803142003.12857-23-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-omap2-mcspi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 9cc078acc13c..a3355147f5de 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -1620,7 +1620,7 @@ static void omap2_mcspi_remove(struct platform_device= *pdev) /* work with hotplug and coldplug */ MODULE_ALIAS("platform:omap2_mcspi"); =20 -static int __maybe_unused omap2_mcspi_suspend(struct device *dev) +static int omap2_mcspi_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct omap2_mcspi *mcspi =3D spi_controller_get_devdata(ctlr); @@ -1639,7 +1639,7 @@ static int __maybe_unused omap2_mcspi_suspend(struct = device *dev) return pm_runtime_force_suspend(dev); } =20 -static int __maybe_unused omap2_mcspi_resume(struct device *dev) +static int omap2_mcspi_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct omap2_mcspi *mcspi =3D spi_controller_get_devdata(ctlr); @@ -1654,8 +1654,7 @@ static int __maybe_unused omap2_mcspi_resume(struct d= evice *dev) } =20 static const struct dev_pm_ops omap2_mcspi_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(omap2_mcspi_suspend, - omap2_mcspi_resume) + SYSTEM_SLEEP_PM_OPS(omap2_mcspi_suspend, omap2_mcspi_resume) .runtime_suspend =3D omap_mcspi_runtime_suspend, .runtime_resume =3D omap_mcspi_runtime_resume, }; @@ -1663,7 +1662,7 @@ static const struct dev_pm_ops omap2_mcspi_pm_ops =3D= { static struct platform_driver omap2_mcspi_driver =3D { .driver =3D { .name =3D "omap2_mcspi", - .pm =3D &omap2_mcspi_pm_ops, + .pm =3D pm_ptr(&omap2_mcspi_pm_ops), .of_match_table =3D omap_mcspi_of_match, }, .probe =3D omap2_mcspi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 539BB41D227; Mon, 3 Aug 2026 14:44:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768277; cv=none; b=bJzhadPLTkFoYIynpnHGrXB665oXFkprAVmJm2JakhOKphXeSStOy+5Zm9C4iQNtYtOJtnNzbhU6X5kXx1/Jp4Tm8k7LF4e6lCGo6yINV8iCbkscpjhe59ouRJDDF+4WQDwLFTpNPw3zgzr5EOmlpNtjgliuB3OC4t4WysmW2f0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768277; c=relaxed/simple; bh=QAH8O2n0XZVtqOMENH1xpHdVuTvSWcyBNs1sKcOfQTc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h66wzbEEzKbJi4o5lx8VZe+dItTOn7iFi4d2JW0m7DWed+8sB6IIwuge7+8v+Czf7vTk/Bst+5WHygILLr043E90sXBoNe+6oULEMBJrZZu9v0Tc9GbUMsfbDKyeiLeSl+2GWjOyvDVXX6OV7e/lNlQXHu2aFc+heBG0MNrTvjM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W320FhgI; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W320FhgI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E3F71F00A3A; Mon, 3 Aug 2026 14:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768276; bh=CjaGFOxr4nU+4hu6sOP96XKGU6m8y4A1jNpucRrIXvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=W320FhgIR3sDSIMSzQ3s9AsS5ld544sgO/L7h/zDkkknjjHreEIS8ILx9il4qjnpt kohdQxBo+hh/717VKan7AATNkuuWWyqpCspgG8N6qhQykYWOmeYXg5Uki21SpoH/cC 2bxamaaaUR9hznOsPbD877Oidydz3yxJfs4ePS4wZzr64aP4GYItQz6h7Z2+PtPGMu fLLSwd5tFOwdsi10UykS5uvFNhaxNs8D7sFwbD88u8a/t59LG2QzArMAD953w/dtks q2mZVACHLMjrnT9vYFyYyKiw8mwPdKTArkXnZbDhJ3Oe8fHy/SJsAwE40NdxESbUXX qmwsBGLjaC0Tw== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/39] spi: orion: use modern PM macros Date: Mon, 3 Aug 2026 22:19:47 +0800 Message-ID: <20260803142003.12857-24-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-orion.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 265708a94984..a33b5840b95f 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -100,10 +100,8 @@ struct orion_spi { struct orion_child_options child[ORION_NUM_CHIPSELECTS]; }; =20 -#ifdef CONFIG_PM static int orion_spi_runtime_suspend(struct device *dev); static int orion_spi_runtime_resume(struct device *dev); -#endif =20 static inline void __iomem *spi_reg(struct orion_spi *orion_spi, u32 reg) { @@ -814,7 +812,6 @@ static void orion_spi_remove(struct platform_device *pd= ev) =20 MODULE_ALIAS("platform:" DRIVER_NAME); =20 -#ifdef CONFIG_PM static int orion_spi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -834,18 +831,17 @@ static int orion_spi_runtime_resume(struct device *de= v) clk_prepare_enable(spi->axi_clk); return clk_prepare_enable(spi->clk); } -#endif =20 static const struct dev_pm_ops orion_spi_pm_ops =3D { - SET_RUNTIME_PM_OPS(orion_spi_runtime_suspend, - orion_spi_runtime_resume, - NULL) + RUNTIME_PM_OPS(orion_spi_runtime_suspend, + orion_spi_runtime_resume, + NULL) }; =20 static struct platform_driver orion_spi_driver =3D { .driver =3D { .name =3D DRIVER_NAME, - .pm =3D &orion_spi_pm_ops, + .pm =3D pm_ptr(&orion_spi_pm_ops), .of_match_table =3D of_match_ptr(orion_spi_of_match_table), }, .probe =3D orion_spi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 1635D42122B; Mon, 3 Aug 2026 14:44:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768290; cv=none; b=uCzJZZdbYeSWKDf/bVefOYtg8oOqe7IW0l/9LqkJ0gEkE0vbCHeBjsvKipcTMseumrWmUh2oiTmep1/YLf2MlTBw18/xoBMQ6zPZU8G54TRgsIEskjezC9987kiL0CQisUhneSDowqoZt97fvRuNpuHpKOpx0bMvbgJy2jrKmQM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768290; c=relaxed/simple; bh=hYzhGLxgD9w7IbZFWF/gsM2g6Bjy4QmH6doHcS1NlDc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yeonv9uR5EN+SlOzjnDF4JhNh50eJP6fHTcIxzRJWYBKDuLj4FJM+SaGHYTE6OzXU6+pvHRnIuloMT3y/g1l79z3cuK36D/U7CTZZ6HR3JrulcTnkIEtLKW/t9p76lajTEOmRIVdmkvl9DgQYegylOS8sibea+C1Ze7drtBN66s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YpQT0iHX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YpQT0iHX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6434B1F000E9; Mon, 3 Aug 2026 14:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768289; bh=qy56uKywTC/l6VJWha0vrsN0jl56R/p44DX7cb65BIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YpQT0iHXQKfps7LyHkx3qAqVwoBah4JHtspAQ8zIrCB/hRwYVRv1H4ByaqiQio9sQ 9Wxb9Zh1KcvXmsIVnOF22fxsY3+7+7nWTMMjxmg+o556UjCwYmloY2AdOjBd9GQ7Pb efK39my8hA+tE2EtW+p1lXZkKbwQ3R00j5nwnu6BX6+7jP3IFIbC9OgGwlHttsj39V jJXwXN6oIgP/zuYWUSSFD7pk1gi3Ecrl6yS6nkERKvhEgaWGG7lNNFNePnVicbDDzI BJD1MIL5Y9Hv1LE2B7OAHIYHVS0CmuuU+oiqHL04nfkpvy9dz2ZUSXaO2QleivT3A1 qinOQs7AMB0CQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 24/39] spi: pl022: use modern PM macros Date: Mon, 3 Aug 2026 22:19:48 +0800 Message-ID: <20260803142003.12857-25-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-pl022.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 95652df5fd09..4877ab909c51 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2011,7 +2011,6 @@ pl022_remove(struct amba_device *adev) amba_release_regions(adev); } =20 -#ifdef CONFIG_PM_SLEEP static int pl022_suspend(struct device *dev) { struct pl022 *pl022 =3D dev_get_drvdata(dev); @@ -2049,9 +2048,7 @@ static int pl022_resume(struct device *dev) =20 return ret; } -#endif =20 -#ifdef CONFIG_PM static int pl022_runtime_suspend(struct device *dev) { struct pl022 *pl022 =3D dev_get_drvdata(dev); @@ -2071,11 +2068,10 @@ static int pl022_runtime_resume(struct device *dev) =20 return 0; } -#endif =20 static const struct dev_pm_ops pl022_dev_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(pl022_suspend, pl022_resume) - SET_RUNTIME_PM_OPS(pl022_runtime_suspend, pl022_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pl022_suspend, pl022_resume) + RUNTIME_PM_OPS(pl022_runtime_suspend, pl022_runtime_resume, NULL) }; =20 static struct vendor_data vendor_arm =3D { @@ -2166,7 +2162,7 @@ MODULE_DEVICE_TABLE(amba, pl022_ids); static struct amba_driver pl022_driver =3D { .drv =3D { .name =3D "ssp-pl022", - .pm =3D &pl022_dev_pm_ops, + .pm =3D pm_ptr(&pl022_dev_pm_ops), }, .id_table =3D pl022_ids, .probe =3D pl022_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6143640DB46; Mon, 3 Aug 2026 14:44:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768299; cv=none; b=X+KiR85f2ZF4FBpDuotL8iDe9rrG84r1GwGNbN9OT6fp6PAMgznH5cLYtj7aWFaICEzpXSzn6mnBg4/hX9wLO+F9vrFNu5+lOmTaaN9VOKNPMeGUwlbzhldxBwhlpLgf62nJc1jigW4p1Wdd2SuZuiK5ygGho/3v1AZlIyHr+9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768299; c=relaxed/simple; bh=UNSKTuRmiOEsmMGigBwqUvq7f/+uzz/d1bv+ZEdBJwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=euVC0MeuCqqp7EWJ0BkLse9vcf8e2xBYQeoJB3+sNz0n5HdCbJzNPl+sXbaZhCBTzLBxoMPuGBy9S0mPjPnLOSnpC5bxD1W7XuLD+kzaCVr4JotTiTC0+cLT6OI3ea6H//VEXL9dOExz5xTLZS3vqhOz1hfWl0pJjFTPNo/uQK8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FguBdYtO; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FguBdYtO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 684681F00A3D; Mon, 3 Aug 2026 14:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768298; bh=y/BAOdQjaKVdNWLZgzpeRkbbNiAISlSOmcwNyY7cYho=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FguBdYtOD6gwBRDMujVlcTSZ5O9D/32GspkJQGQ055Rf1bsbGUz2sCoR1SK5eoMW+ DCzIR0XzZ/CFytAoW03p0ENuLukt65WyhVgMboFIFOYuuCeuC1RFRZaCGKx2OMzYJY tyAzCeH60hLrQRYiP2ayClaGADwStSFS5/juGZWVLOcVydM2kFVQdzqdTHwfUQ5SwB B0D6f6PU0EQWN+WfDRUCC4yr9yLmD33Gfn0Hg0lj2w6E8PkZJ4uxRR97xfdkCGeiKZ Y+PNQ/KWC8YnAdtqwK2F2FupCmOTgm/WipOSD6ppexHGFGELSjwmsKUDUuF7g5q9rD e0uRdFJ8rwL+A== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 25/39] spi: spi-qcom-qspi: use modern PM macros Date: Mon, 3 Aug 2026 22:19:49 +0800 Message-ID: <20260803142003.12857-26-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-qcom-qspi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c index caf55a6f70b3..0ac06a1ab868 100644 --- a/drivers/spi/spi-qcom-qspi.c +++ b/drivers/spi/spi-qcom-qspi.c @@ -828,7 +828,7 @@ static void qcom_qspi_remove(struct platform_device *pd= ev) pm_runtime_disable(&pdev->dev); } =20 -static int __maybe_unused qcom_qspi_runtime_suspend(struct device *dev) +static int qcom_qspi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct qcom_qspi *ctrl =3D spi_controller_get_devdata(host); @@ -872,7 +872,7 @@ static int __maybe_unused qcom_qspi_runtime_suspend(str= uct device *dev) return ret; } =20 -static int __maybe_unused qcom_qspi_runtime_resume(struct device *dev) +static int qcom_qspi_runtime_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct qcom_qspi *ctrl =3D spi_controller_get_devdata(host); @@ -916,7 +916,7 @@ static int __maybe_unused qcom_qspi_runtime_resume(stru= ct device *dev) return ret; } =20 -static int __maybe_unused qcom_qspi_suspend(struct device *dev) +static int qcom_qspi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); int ret; @@ -932,7 +932,7 @@ static int __maybe_unused qcom_qspi_suspend(struct devi= ce *dev) return ret; } =20 -static int __maybe_unused qcom_qspi_resume(struct device *dev) +static int qcom_qspi_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); int ret; @@ -949,9 +949,9 @@ static int __maybe_unused qcom_qspi_resume(struct devic= e *dev) } =20 static const struct dev_pm_ops qcom_qspi_dev_pm_ops =3D { - SET_RUNTIME_PM_OPS(qcom_qspi_runtime_suspend, - qcom_qspi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(qcom_qspi_suspend, qcom_qspi_resume) + RUNTIME_PM_OPS(qcom_qspi_runtime_suspend, + qcom_qspi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(qcom_qspi_suspend, qcom_qspi_resume) }; =20 static const struct of_device_id qcom_qspi_dt_match[] =3D { @@ -963,7 +963,7 @@ MODULE_DEVICE_TABLE(of, qcom_qspi_dt_match); static struct platform_driver qcom_qspi_driver =3D { .driver =3D { .name =3D "qcom_qspi", - .pm =3D &qcom_qspi_dev_pm_ops, + .pm =3D pm_ptr(&qcom_qspi_dev_pm_ops), .of_match_table =3D qcom_qspi_dt_match, }, .probe =3D qcom_qspi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 F036C3043DB; Mon, 3 Aug 2026 14:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768312; cv=none; b=oeLkMHy223HSrjIYwfia0OkWYBPPAwKn98wFDBxM7Q4ZNoy6bEl8fifHr9m076oahWq1DgOCXIwrnpNFUegn9+vqYcu6OcQhnegI9CHsyLQL+lBOBhuAPs/NzqUKNJ9Uvb+Yl7cNSk+ZnNO3PvW9FHnl6L7lKDVM7MN6LbiPLZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768312; c=relaxed/simple; bh=oIRs66QZvJQSNZyNkENWFPxE2U5vULn8lIiwe2SBGHA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pxuvvUv9gHd+KkrZOAC2dXRUrhiz2KgUDXv9Fs3J/88YrL3qWvewrmUlXv1y4F+oZS11dh8rlE57jxoeDnBUf/XJ2R99CVBhsOxRR8nIhh78IxvR8ZCG9BW/AfHNWjBVoVSssC5z3TGWRf0hsmAbaHmRgPk/Hj7igd1P5YTgFGw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FkKP2Qvy; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FkKP2Qvy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B48821F000E9; Mon, 3 Aug 2026 14:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768310; bh=ZmQyfTV1Mv5u+ObaXKEqD3LBqLLXg6aYEChvXy0LKRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FkKP2QvyHa4+J9NQd83z3CnHfXJMse0Q0oCp+aYWOx1bADRSbYV6C3K5r98STcpof YlaTVCb51YXIHaBiyNtl0TO31NGT2pmFunUoJq4F/BY9TXcGG6n9H/aD76tKeYgFIm SjWFvqRYSPpl3I8iSI6DHsz8D31Qvj2JsKWcgqvCNtAoqXR/OYRQXV6eDKu2mlXrO1 0emmOeahSx3QeueLuMHeSMJGdQpnyS1heuK+aegtT/gmDdU3r/vm4/5M5QSQ8AmDYv qx4ixFhejPUcX/nrjCUxD7svJKU16y+ubml22orYFfrYcxhir2FGYFnX+0EauEB0cn 9a6nRkMB64dqA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 26/39] spi: qup: use modern PM macros Date: Mon, 3 Aug 2026 22:19:50 +0800 Message-ID: <20260803142003.12857-27-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-qup.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index 034546b3f058..e8b076b1622d 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -1211,7 +1211,6 @@ static int spi_qup_probe(struct platform_device *pdev) return ret; } =20 -#ifdef CONFIG_PM static int spi_qup_pm_suspend_runtime(struct device *device) { struct spi_controller *host =3D dev_get_drvdata(device); @@ -1253,9 +1252,7 @@ static int spi_qup_pm_resume_runtime(struct device *d= evice) writel_relaxed(config, controller->base + QUP_CONFIG); return 0; } -#endif /* CONFIG_PM */ =20 -#ifdef CONFIG_PM_SLEEP static int spi_qup_suspend(struct device *device) { struct spi_controller *host =3D dev_get_drvdata(device); @@ -1312,7 +1309,6 @@ static int spi_qup_resume(struct device *device) clk_disable_unprepare(controller->iclk); return ret; } -#endif /* CONFIG_PM_SLEEP */ =20 static void spi_qup_remove(struct platform_device *pdev) { @@ -1352,16 +1348,16 @@ static const struct of_device_id spi_qup_dt_match[]= =3D { MODULE_DEVICE_TABLE(of, spi_qup_dt_match); =20 static const struct dev_pm_ops spi_qup_dev_pm_ops =3D { - SET_SYSTEM_SLEEP_PM_OPS(spi_qup_suspend, spi_qup_resume) - SET_RUNTIME_PM_OPS(spi_qup_pm_suspend_runtime, - spi_qup_pm_resume_runtime, - NULL) + SYSTEM_SLEEP_PM_OPS(spi_qup_suspend, spi_qup_resume) + RUNTIME_PM_OPS(spi_qup_pm_suspend_runtime, + spi_qup_pm_resume_runtime, + NULL) }; =20 static struct platform_driver spi_qup_driver =3D { .driver =3D { .name =3D "spi_qup", - .pm =3D &spi_qup_dev_pm_ops, + .pm =3D pm_ptr(&spi_qup_dev_pm_ops), .of_match_table =3D spi_qup_dt_match, }, .probe =3D spi_qup_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 928454137B5; Mon, 3 Aug 2026 14:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768323; cv=none; b=IVIcxVl6zW9AkBKUsQGlKU1nbM9+lRETcCptG5RCbSYs5yxg0NmfKrWx4Gk/gDTbFF7fNN0Mb6+5SN4j+vhC4I2NthdoWjGfaYkuuBopJlsaeJUNsp18mF/vu8mAMfOU0IuNnDbjlJYKL53M96OCPxNoTyATwdyaT0bfLcj552o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768323; c=relaxed/simple; bh=slhoggWz7pPyKpRVUPl9vdCdwgaHZrzrbhKPzBX0JC0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EDxj+wHgY5Keuqo3ty/VkylsycOLLfanfNPqAppn9k2COxlsNpzLyxPgOZ+cxnZ0gU4bes9lmxRsClvim/9jN+BgxVXmLAusbavpDcFrLBEk7h4lbZosr1cnc1czWXRAN98StoOMmE52upyCkz++07syDBOtnaO4E5iDwTMBmDA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nsSS3w5w; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nsSS3w5w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13AB61F00A3A; Mon, 3 Aug 2026 14:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768322; bh=47vBJGCs0olAvDipuGWQVcPv02dyV3Whb//pV4b0Fqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nsSS3w5w5a4BoSq36WGN63111iNPtpaXdr2ZEwSspSSUPEo4IxPVVfhGWdup0Qb/9 gYTaY/GnVz+BT7ACvEVZpGWHvXczFzAy/Aay1RAu/z/7ksyniIv+sMC/W1cPb6uFV2 b4pEFIqkNOm7GheHPvbRDB27tWSKVn9PLBdFs+NAAtU/xMEcCJ7fHeK7JmmG13U/uQ cYiOzFofIL5UcVG1uuVdpj2+kqS2PXJxNNj1zLpjwVw/FjlGO5y39JZhTMhMlsBsMG 6L9elxFWbD7CqVb0TpzP55BORlh7j/5Ng5IOZJaDh22cLtVpeuRmJhvrg8fErm1Te4 +Gj720Dv1vkRA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 27/39] spi: rockchip-sfc: use modern PM macros Date: Mon, 3 Aug 2026 22:19:51 +0800 Message-ID: <20260803142003.12857-28-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-rockchip-sfc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c index 174995042f53..662a994da60b 100644 --- a/drivers/spi/spi-rockchip-sfc.c +++ b/drivers/spi/spi-rockchip-sfc.c @@ -751,7 +751,6 @@ static void rockchip_sfc_remove(struct platform_device = *pdev) clk_disable_unprepare(sfc->hclk); } =20 -#ifdef CONFIG_PM static int rockchip_sfc_runtime_suspend(struct device *dev) { struct rockchip_sfc *sfc =3D dev_get_drvdata(dev); @@ -777,9 +776,7 @@ static int rockchip_sfc_runtime_resume(struct device *d= ev) =20 return ret; } -#endif /* CONFIG_PM */ =20 -#ifdef CONFIG_PM_SLEEP static int rockchip_sfc_suspend(struct device *dev) { pinctrl_pm_select_sleep_state(dev); @@ -810,12 +807,11 @@ static int rockchip_sfc_resume(struct device *dev) =20 return 0; } -#endif /* CONFIG_PM_SLEEP */ =20 static const struct dev_pm_ops rockchip_sfc_pm_ops =3D { - SET_RUNTIME_PM_OPS(rockchip_sfc_runtime_suspend, - rockchip_sfc_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(rockchip_sfc_suspend, rockchip_sfc_resume) + RUNTIME_PM_OPS(rockchip_sfc_runtime_suspend, + rockchip_sfc_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rockchip_sfc_suspend, rockchip_sfc_resume) }; =20 static const struct of_device_id rockchip_sfc_dt_ids[] =3D { @@ -828,7 +824,7 @@ static struct platform_driver rockchip_sfc_driver =3D { .driver =3D { .name =3D "rockchip-sfc", .of_match_table =3D rockchip_sfc_dt_ids, - .pm =3D &rockchip_sfc_pm_ops, + .pm =3D pm_ptr(&rockchip_sfc_pm_ops), }, .probe =3D rockchip_sfc_probe, .remove =3D rockchip_sfc_remove, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 BD61A37187C; Mon, 3 Aug 2026 14:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768335; cv=none; b=A/mqLsnv4mvtsgNLW/7ZCn5fyYm+iuhK8ZSGbJ9BHleww+eqHrNk5tFbCvVE4+7iqJAV+OPpPU9c/q7YB1Gv2VfFmJzw4WpTB826297Xn3I5R0CwyRKVVJkskDyxJZlozRhSsXy0yZRpYx+//w1clSmZDHRjZbEvgfly9mYTMGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768335; c=relaxed/simple; bh=J9A0Un2PWtIhfI338cDbcnzA6xh883TV7fFuwTjAEDI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PgcBurED82RUusvLRSawS+GxN7uKxGrxRRDV+kTKKVfsSgIYF2TbBos7+e15b8WHUWoMUnrrPjxT5aj+ug8NgqwG6HTWCjCBwT6XbyyRkmzUcuHa4EiE2f0XrsmALEfGU0XbADNh5M+dbeDvbR/iYcB6Dd7HnoA4BUaqkHJ2oek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eM/WTBAR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eM/WTBAR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A7D51F000E9; Mon, 3 Aug 2026 14:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768334; bh=D/0nUPO3LXoRbsEgRI74rqRRQDZqRdYuJsmYZrG/oqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eM/WTBARuf4/9PK1noMQWUHTY9L3DQlycPf6W8PFpzN2TEm+z3RznQrJ2Urv+Y94S aTl0EGQxAo07mQCKOG8zHivnOu+Gbfj3rOVchMfF2FTiA2LT9AfAJXRZqHkWbsddN/ Dhv9vNXSz1Kv5mylxJel96PdsXyYGwRogUmZkKi9BlYSlxnPai1my6voGhxj/xdjYd AM7zlwSsbzVBPUc6ycTPjwPC1veD77dlY/mAP3+Q8pHvSgDBydAdLf/LYw1/quypN6 tX/2ppP3tshoVV8ADXL0wMdIHCt2Fht2NRs46UNSV3XsJ+VBQv5GEIQsNCchZaegyl nXHQB/xLQeoxA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 28/39] spi: rockchip: use modern PM macros Date: Mon, 3 Aug 2026 22:19:52 +0800 Message-ID: <20260803142003.12857-29-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-rockchip.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 231fbcf0e7aa..1a81fd94b439 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -938,7 +938,6 @@ static void rockchip_spi_remove(struct platform_device = *pdev) dma_release_channel(ctlr->dma_rx); } =20 -#ifdef CONFIG_PM_SLEEP static int rockchip_spi_suspend(struct device *dev) { int ret; @@ -972,9 +971,7 @@ static int rockchip_spi_resume(struct device *dev) =20 return spi_controller_resume(ctlr); } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int rockchip_spi_runtime_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); @@ -1002,12 +999,11 @@ static int rockchip_spi_runtime_resume(struct device= *dev) =20 return 0; } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops rockchip_spi_pm =3D { - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(rockchip_spi_suspend, rockchip_spi_resume) - SET_RUNTIME_PM_OPS(rockchip_spi_runtime_suspend, - rockchip_spi_runtime_resume, NULL) + NOIRQ_SYSTEM_SLEEP_PM_OPS(rockchip_spi_suspend, rockchip_spi_resume) + RUNTIME_PM_OPS(rockchip_spi_runtime_suspend, + rockchip_spi_runtime_resume, NULL) }; =20 static const struct of_device_id rockchip_spi_dt_match[] =3D { @@ -1030,7 +1026,7 @@ MODULE_DEVICE_TABLE(of, rockchip_spi_dt_match); static struct platform_driver rockchip_spi_driver =3D { .driver =3D { .name =3D DRIVER_NAME, - .pm =3D &rockchip_spi_pm, + .pm =3D pm_ptr(&rockchip_spi_pm), .of_match_table =3D of_match_ptr(rockchip_spi_dt_match), }, .probe =3D rockchip_spi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E7C5140DB4F; Mon, 3 Aug 2026 14:45:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768349; cv=none; b=ip4LpqUKp6y2mGOxp8yGXyfdMaccaGTsS+BeDar+W6M9OkjTwTWmOju9vQYIrrl/7SbLM/mq+eJYzb1xpSNYF2wogaSNAhDN+y9LknoebE3oSNmfQoMwx8iT70H+bRWQu5oVvWhjQjhHzj4uo19WBIc4pooKAhAjpE55i62GCZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768349; c=relaxed/simple; bh=Wgq2k+xnDokBIprime2OdaG6qnvbXx7pqeczUYGbaJ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BgtX89XMrmUauoQWWLCUYztIHrpLrhW+tmlHbZ3N6iIzr+YCTdT5z9CCwhdt8P5l1RfGDWtymNbHXwfgBZS7WiiUPLYUst4bpPjyNCw2oAQhXPPvDX032R7nu8NZnA+kX/fBuBOFFBUkdroxRzBNyjRie4S34r7cVXZ/GMbFR54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cysBrl1c; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cysBrl1c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD3521F00A3D; Mon, 3 Aug 2026 14:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768347; bh=Lc2pQMao89s0oVQzCTrkPCY3b0sT34bFVhO0CBFvD+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cysBrl1cvUsDKmbTB3tO4bwPCRtlArlZ+DvH2LIKKuzfMhtmhe0ricSh2xyCeIv7m xPzBBzNDUB9rXfD7vxEIaozlMRibwWp2nYzUTgOABEG6IJp9CHlvyBP+1CtC9ezxCx psGPt5eUPdqWwGU155Yi/ZPawDuEBCY+A77kz4+Str6pHTPy3KBrTQ0FsGo4c2Eu2v Gn1K/Jli1vvUbmj0xgUNuHT4uT5odohNRhMWPN7r9qYaHLa7P18SoLLj4AKCLm18iA evpsZhpHQDD1o37xn8clMs15GZSGizg/vr2wklwECTKidhPlu3YSCtTg9ZQ1ibXfYA 6ULk8f96sBXig== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 29/39] spi: s3c64xx: use modern PM macros Date: Mon, 3 Aug 2026 22:19:53 +0800 Message-ID: <20260803142003.12857-30-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-s3c64xx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 28c56b06fa99..8d4120cf9df1 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1408,7 +1408,6 @@ static void s3c64xx_spi_remove(struct platform_device= *pdev) pm_runtime_set_suspended(&pdev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int s3c64xx_spi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -1444,9 +1443,7 @@ static int s3c64xx_spi_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int s3c64xx_spi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -1494,12 +1491,11 @@ static int s3c64xx_spi_runtime_resume(struct device= *dev) =20 return ret; } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops s3c64xx_spi_pm =3D { - SET_SYSTEM_SLEEP_PM_OPS(s3c64xx_spi_suspend, s3c64xx_spi_resume) - SET_RUNTIME_PM_OPS(s3c64xx_spi_runtime_suspend, - s3c64xx_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(s3c64xx_spi_suspend, s3c64xx_spi_resume) + RUNTIME_PM_OPS(s3c64xx_spi_runtime_suspend, + s3c64xx_spi_runtime_resume, NULL) }; =20 static const struct s3c64xx_spi_port_config s3c6410_spi_port_config =3D { @@ -1655,7 +1651,7 @@ MODULE_DEVICE_TABLE(of, s3c64xx_spi_dt_match); static struct platform_driver s3c64xx_spi_driver =3D { .driver =3D { .name =3D "s3c64xx-spi", - .pm =3D &s3c64xx_spi_pm, + .pm =3D pm_ptr(&s3c64xx_spi_pm), .of_match_table =3D of_match_ptr(s3c64xx_spi_dt_match), }, .probe =3D s3c64xx_spi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8E87040DB4F; Mon, 3 Aug 2026 14:46:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768361; cv=none; b=d7W3Av0WuRR+86mMLKhZslVSMQ8YauJNTvBR3ODaS2WUJVMVJhkIMO05ssPV5guiawXhtfK8/WdhXQW4FVHXDTkblwogvUrK6FbXdevC8rphK/u6abqEfzm1C4QDW17gHaitK/eXWrnPEdFnePGyZlFK3x1xN10Xhs13prWVfEE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768361; c=relaxed/simple; bh=WFIEy6suPs1OdQ+ryAPSruzzL4O/23jj52//B3K2UJ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fTvwFy03y5mGPnBRxZj/dp1oaL2aZSZqMNAyoQoumExvTFlIhqbVADaaExC3DO/Z6ZxhHBA+eQBAZw3q8T90hEpwGVwjSJ/Km449BAE8U5GR8Ftp8nkh8LjLpqHXyc+QedtUbgAAyTsXVSSUUNw7kwCF6vd8rIEg/IdU/s8ydZs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=flOQioMJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="flOQioMJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1DF01F000E9; Mon, 3 Aug 2026 14:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768360; bh=W/NXd+U/0G3pDXNPmzPOS5y2jm28gjnRLqb4Yq2jPwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=flOQioMJGeuKecaFMlgpIPxbIRWs2QugbDyNU78eE69PH2dfVrM+NT6V8PillfQ0K QIIzNYN5UreR68iwjXXDG4oX8IfwkfBrhxmHSF/cVle0hOEDgmCn3CJXMQFPPkFwi1 IbHzuo7/HSIrd5gMTiQIYO2IJ+oJkJK70eIfHZXdMmn31R9f2L6QAfQII176+2MJOx IH9FegxyUStvvou0WG5aTGpoa81gEDgljw5o0CDRtYEvDc2vD1HbyrvLqXOvuxwPRy Ek+3t5FsKckBwezIQ+0kSVAy1Swh6SWtl7JPj7WvJ93rI39Ghc3AI3JBaTo9is/ML0 01Q9E95/B7OWg== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 30/39] spi: slave-mt27xx: use modern PM macros Date: Mon, 3 Aug 2026 22:19:54 +0800 Message-ID: <20260803142003.12857-31-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-slave-mt27xx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c index e60ab4c18bed..256b510fa676 100644 --- a/drivers/spi/spi-slave-mt27xx.c +++ b/drivers/spi/spi-slave-mt27xx.c @@ -471,7 +471,6 @@ static void mtk_spi_slave_remove(struct platform_device= *pdev) pm_runtime_disable(&pdev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int mtk_spi_slave_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); @@ -508,9 +507,7 @@ static int mtk_spi_slave_resume(struct device *dev) =20 return ret; } -#endif /* CONFIG_PM_SLEEP */ =20 -#ifdef CONFIG_PM static int mtk_spi_slave_runtime_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); @@ -535,18 +532,17 @@ static int mtk_spi_slave_runtime_resume(struct device= *dev) =20 return 0; } -#endif /* CONFIG_PM */ =20 static const struct dev_pm_ops mtk_spi_slave_pm =3D { - SET_SYSTEM_SLEEP_PM_OPS(mtk_spi_slave_suspend, mtk_spi_slave_resume) - SET_RUNTIME_PM_OPS(mtk_spi_slave_runtime_suspend, - mtk_spi_slave_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(mtk_spi_slave_suspend, mtk_spi_slave_resume) + RUNTIME_PM_OPS(mtk_spi_slave_runtime_suspend, + mtk_spi_slave_runtime_resume, NULL) }; =20 static struct platform_driver mtk_spi_slave_driver =3D { .driver =3D { .name =3D "mtk-spi-slave", - .pm =3D &mtk_spi_slave_pm, + .pm =3D pm_ptr(&mtk_spi_slave_pm), .of_match_table =3D mtk_spi_slave_of_match, }, .probe =3D mtk_spi_slave_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 97EF741D21E; Mon, 3 Aug 2026 14:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768376; cv=none; b=tWSieChI118+P+tPJ+xSOIRI8Tnyt4x/3QqFi2H12sDJBooR9I0KrQGPL2Fz1J6L6UObqaaeg1uaDSSVamqqKaolLqb42+BxZiyPxPHOw2+SY7++LikYcL4qwopVHeXu9jfaBjg1Dl9/JJ2C7XwUrv8hU4DfHN82KsAJPCdoVWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768376; c=relaxed/simple; bh=HlpKTsyKoHTmzQrNpZAv5jOHHbvlj4P35xVIVLaPlDA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rM9j8oRcs0VSLoEPW7km2yLnfa1Wiy+sV26lTkxp+wfcwue+hELQpIYFiG/Sa6XYAXcK/jBdJK/ByEz+UHe1H/TWMdJJSZr8zSFpKrmNz8fDJ2nPCe5UpDu0bD/8evuq/tEx2zDRQyBIowMqp0DEcLJuuRfFOjl+bVFfn60fCuQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gzzocITx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gzzocITx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E01B61F00A3A; Mon, 3 Aug 2026 14:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768373; bh=llaQZ6uCqmKYby9DFqY5vdo6Mqo0ZPuV/PFMlIezwUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gzzocITx7naUalh1nwW/zr7lTVTdTp98MkwwzHocAJuEdCu/i2fuD+hcH4CaG3mvf 4vRKQIzIyUXyByMowUeWn6Ge4uVK7xtIfPMCbp8C2HgKeWXlj3cmJjZ5RylPYS7h4O jv6JOv53PCv491baP45xMT3AvPbjxPOsQ5Or0CBwuD3k9UtfuufnovCxl1FgGFjOL/ h6k44kNs19I/qCGh/+XzPwqnJ8aa2COU7ky+fg32Uxv4cmIYVPIBwIZiX9xdPc38fB EiW7Ftny1bGhQm9897ykYDxcYYwk5GxsL2lX/fquMh5w9HqXameEX5YMKn9Daw9nke IyOhLKXqJ0YAg== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 31/39] spi: sprd: use modern PM macros Date: Mon, 3 Aug 2026 22:19:55 +0800 Message-ID: <20260803142003.12857-32-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-sprd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c index 29380938ef65..12b09174bb24 100644 --- a/drivers/spi/spi-sprd.c +++ b/drivers/spi/spi-sprd.c @@ -1016,7 +1016,7 @@ static void sprd_spi_remove(struct platform_device *p= dev) pm_runtime_disable(&pdev->dev); } =20 -static int __maybe_unused sprd_spi_runtime_suspend(struct device *dev) +static int sprd_spi_runtime_suspend(struct device *dev) { struct spi_controller *sctlr =3D dev_get_drvdata(dev); struct sprd_spi *ss =3D spi_controller_get_devdata(sctlr); @@ -1029,7 +1029,7 @@ static int __maybe_unused sprd_spi_runtime_suspend(st= ruct device *dev) return 0; } =20 -static int __maybe_unused sprd_spi_runtime_resume(struct device *dev) +static int sprd_spi_runtime_resume(struct device *dev) { struct spi_controller *sctlr =3D dev_get_drvdata(dev); struct sprd_spi *ss =3D spi_controller_get_devdata(sctlr); @@ -1050,8 +1050,7 @@ static int __maybe_unused sprd_spi_runtime_resume(str= uct device *dev) } =20 static const struct dev_pm_ops sprd_spi_pm_ops =3D { - SET_RUNTIME_PM_OPS(sprd_spi_runtime_suspend, - sprd_spi_runtime_resume, NULL) + RUNTIME_PM_OPS(sprd_spi_runtime_suspend, sprd_spi_runtime_resume, NULL) }; =20 static const struct of_device_id sprd_spi_of_match[] =3D { @@ -1064,7 +1063,7 @@ static struct platform_driver sprd_spi_driver =3D { .driver =3D { .name =3D "sprd-spi", .of_match_table =3D sprd_spi_of_match, - .pm =3D &sprd_spi_pm_ops, + .pm =3D pm_ptr(&sprd_spi_pm_ops), }, .probe =3D sprd_spi_probe, .remove =3D sprd_spi_remove, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 F39A04137BA; Mon, 3 Aug 2026 14:46:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768388; cv=none; b=sSnwYxtIwxRzo2ngHFZ9cOOnS6GLsZCh7V9GYILtlibh4pIczuM1zpVHMLu/syoXuLF16ZTgUYP+iBXCSg4QKuGK4QnpQgGt14aGQ8QA5Dvqqrssg0SY5Qh5GaJpbkZotTEHsOJDc+AaOWIMtPzKFA+htXUg05Z/mNXTGEDTcCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768388; c=relaxed/simple; bh=Rg9R4XtLvFWg8NFF4P8t+FRCJByUC/qZSIO2kKSaT64=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XLxbsMmGXQatcM6tsX2w3+efuWQ9u+Fvue6EQYDpiwOkXZFUhoZhxXMHfhgonkz9FnW5TeSbeEANjelFy8kettsgxRUrWQQGOl4PrOS2T+b0K2jBn7DThuGpQnnhKKPqUA+sY9Wfjn7ZCNmqPkHnE/1JdJlEBcguviO5vmY+oQQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=biiNQJ3t; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="biiNQJ3t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AB611F00A3D; Mon, 3 Aug 2026 14:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768386; bh=Bcbtf6ZHAJGJTJISXdZ1qfeCTDXIgQZLsOdyVwXUbJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=biiNQJ3tBbti1oLeRgBek5MLDQXcbX07IeQZAcdpqbAavhl7nXyzWtOFDVct7w6dN qz2pa9H8yrF9E5bU5tBOYVIu8uWagrRSMWpyMfS1nitE7jVdfsjvepvClvPNrfqHtV RjdRSv/y4exPiC9u/26DvIS6duADsVSUNBWQIWoAysa/n2OnhCdl4HehS9NkwW2hbq EBnS2XmQt4AYgO1SYiY/Ow/xdMImpGshKyPAIKOyQJ467zYbLjViFwhPpykA9KCdPP fFMFu4b5Pr5UJJj9ow/5RxKnml2nib6clRVPgyKv0t+Yl7IQkE5aWjD2XfQVxLgH3w K8bRTTWCXiZsQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 32/39] spi: sunplus-sp7021: use modern PM macros Date: Mon, 3 Aug 2026 22:19:56 +0800 Message-ID: <20260803142003.12857-33-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards or __maybe_unused. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-sunplus-sp7021.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/spi/spi-sunplus-sp7021.c b/drivers/spi/spi-sunplus-sp7= 021.c index c1870322d976..f16fcda187dd 100644 --- a/drivers/spi/spi-sunplus-sp7021.c +++ b/drivers/spi/spi-sunplus-sp7021.c @@ -498,7 +498,7 @@ static void sp7021_spi_controller_remove(struct platfor= m_device *pdev) pm_runtime_set_suspended(&pdev->dev); } =20 -static int __maybe_unused sp7021_spi_controller_suspend(struct device *dev) +static int sp7021_spi_controller_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct sp7021_spi_ctlr *pspim =3D spi_controller_get_devdata(ctlr); @@ -506,7 +506,7 @@ static int __maybe_unused sp7021_spi_controller_suspend= (struct device *dev) return reset_control_assert(pspim->rstc); } =20 -static int __maybe_unused sp7021_spi_controller_resume(struct device *dev) +static int sp7021_spi_controller_resume(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); struct sp7021_spi_ctlr *pspim =3D spi_controller_get_devdata(ctlr); @@ -515,7 +515,6 @@ static int __maybe_unused sp7021_spi_controller_resume(= struct device *dev) return clk_prepare_enable(pspim->spi_clk); } =20 -#ifdef CONFIG_PM static int sp7021_spi_runtime_suspend(struct device *dev) { struct spi_controller *ctlr =3D dev_get_drvdata(dev); @@ -531,13 +530,12 @@ static int sp7021_spi_runtime_resume(struct device *d= ev) =20 return reset_control_deassert(pspim->rstc); } -#endif =20 static const struct dev_pm_ops sp7021_spi_pm_ops =3D { - SET_RUNTIME_PM_OPS(sp7021_spi_runtime_suspend, - sp7021_spi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(sp7021_spi_controller_suspend, - sp7021_spi_controller_resume) + RUNTIME_PM_OPS(sp7021_spi_runtime_suspend, + sp7021_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(sp7021_spi_controller_suspend, + sp7021_spi_controller_resume) }; =20 static const struct of_device_id sp7021_spi_controller_ids[] =3D { @@ -552,7 +550,7 @@ static struct platform_driver sp7021_spi_controller_dri= ver =3D { .driver =3D { .name =3D "sunplus,sp7021-spi-controller", .of_match_table =3D sp7021_spi_controller_ids, - .pm =3D &sp7021_spi_pm_ops, + .pm =3D pm_ptr(&sp7021_spi_pm_ops), }, }; module_platform_driver(sp7021_spi_controller_driver); --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 32A9441F7E9; Mon, 3 Aug 2026 14:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768399; cv=none; b=uwO300wlICYYoAoBsqIX/mtHSJVb7eimEjfDk6Z74P5mt2kg8dvoInMYVvK/SGZSe+x0BMl+QroJTA0hsMPc85kzKYaamPgvIZmKsfd7qkE1U66x1G1Pm3QhqCUAvILfsTgUBHuNntA0gU3D6zS1OgxL2pGOrqavDlctAn3I5sU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768399; c=relaxed/simple; bh=eVDYNxzibgGEnzdKlm5tkSAIZrnvBCygHRYmPVA9tmU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XUbm8DKFN/VMVWN59thz4rfS5zWq26cdsB4YhV44JE3TRg+xmErE65ZsM2+k0QszHiuwwUxM/fBgO4I9WP/3AdYBs6xXpZj72I+4YmQb7WEsiIEYUbppKeJZbFWCHqIuE87/fvS1dEeKYAVXI0wHHSALEMH8XTbL3bJ/B9DGbVQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K9H/RQdX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K9H/RQdX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 514B61F00A3A; Mon, 3 Aug 2026 14:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768397; bh=M6KcyTYYdhKMb90eB7bE0t1c7687yortLmew/Ul/dm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K9H/RQdXCRnqmyicFBdwcAhCDsoJRlBPSmc3DqSLuRiUF52ZdqpjV5mASbaTKBD7n j1am6pXzUirCpxOc37IppWJ+xBAPM9/6Y0B+7iMZ6H8SchaTjmbp5GXBGUKn7xWLz2 JjLym+HjARhfQcYmDm02lMZbhXO8uWgKqsMpkWWUnFDTtivcMXt1y385jtOD5M1CT5 l4qqiMShfRJzuLdZIOdu59Wy0H5rCpdo9nhDYSkTwENspARQpZXYSAuQ6CzXNXSjWg 9U7Wm02Mul8Cyr4p7A1NfT7GztNZ9P0cXMSZZZqb0q6+b4nJ4AvzTmSj/WaIzoFQIO Nai8JKT5kyoGA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 33/39] spi: syncuacer: use modern PM macros Date: Mon, 3 Aug 2026 22:19:57 +0800 Message-ID: <20260803142003.12857-34-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-synquacer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c index c14225e39fd1..6d0cd11637b5 100644 --- a/drivers/spi/spi-synquacer.c +++ b/drivers/spi/spi-synquacer.c @@ -738,7 +738,7 @@ static void synquacer_spi_remove(struct platform_device= *pdev) clk_disable_unprepare(sspi->clk); } =20 -static int __maybe_unused synquacer_spi_suspend(struct device *dev) +static int synquacer_spi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct synquacer_spi *sspi =3D spi_controller_get_devdata(host); @@ -754,7 +754,7 @@ static int __maybe_unused synquacer_spi_suspend(struct = device *dev) return ret; } =20 -static int __maybe_unused synquacer_spi_resume(struct device *dev) +static int synquacer_spi_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct synquacer_spi *sspi =3D spi_controller_get_devdata(host); @@ -786,8 +786,8 @@ static int __maybe_unused synquacer_spi_resume(struct d= evice *dev) return ret; } =20 -static SIMPLE_DEV_PM_OPS(synquacer_spi_pm_ops, synquacer_spi_suspend, - synquacer_spi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(synquacer_spi_pm_ops, synquacer_spi_suspen= d, + synquacer_spi_resume); =20 static const struct of_device_id synquacer_spi_of_match[] =3D { {.compatible =3D "socionext,synquacer-spi"}, @@ -806,7 +806,7 @@ MODULE_DEVICE_TABLE(acpi, synquacer_hsspi_acpi_ids); static struct platform_driver synquacer_spi_driver =3D { .driver =3D { .name =3D "synquacer-spi", - .pm =3D &synquacer_spi_pm_ops, + .pm =3D pm_sleep_ptr(&synquacer_spi_pm_ops), .of_match_table =3D synquacer_spi_of_match, .acpi_match_table =3D ACPI_PTR(synquacer_hsspi_acpi_ids), }, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 797283932F9; Mon, 3 Aug 2026 14:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768409; cv=none; b=WF3aAy3fTqejwiAag+euaSrx+PEoEqKVb2DI7RpbsA4FM7AheOr/k4sCQGzE5bw0kvbSCldsB6gCxkO2UG2plVa0eHX2MfMlB6m6EUuFvrXg9xpk5mCBNPiNGN4xD68b9W2/6JbP0paZt44QS68uj7KnckAw5Jqn5HsjN2xGqco= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768409; c=relaxed/simple; bh=qGulrWSdVKRo+oGA8tzD/K6Jrdx7b00h11uK3yAic60=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fYdNa9airxugWTRPj8P6vHjDzTOsf7gFeMa7xoHx9DRBWKiRw/jCkUTkgmiY2viKbYi8r+nuqLM8YfM1KHH/gndpVX3/a8N8jbjLvToxWKucfskbGZlGG24uY6qlHttuJY+5iHunLh0n8jYZbD3x2uALD6KvAS37ncLv4MReqrQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=laqBd3N5; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="laqBd3N5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 458711F000E9; Mon, 3 Aug 2026 14:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768407; bh=n6B911MUpU04sAyipsQMTPqrOspQmhlLZqXEs7dHirA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=laqBd3N5vPetI7kroNFcmZRkGkyjUH01GQfE37Im3g8KMDPVkaci1lbpTw05KwFFb IJBoqxW0I7dsmR9Dp+Z+2C8X2/R08zCMRLoGgatpxJWRRUce735BzGvPQt2DEYCwaA 0UrfZYGldzZrjeNRxlrgyXmtz2n9/3jbbyMLY8K0e2SLjPnMhqa3E8BVAjsptEFJIF G8gBqLzaNGQ+yzlspE+mYoQbB9KwxGkr17A9lZJ39xT7/vkHdTnH9CCMr2LGvPOoEz noZanYgGGJlaYvSuLR3wFOH54odVjiDpmwy/PK1S2N1wqzCBFzFkkiwe4AMzhCYJl5 i4q3+IF0KjhtQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 34/39] spi: tegra114: use modern PM macros Date: Mon, 3 Aug 2026 22:19:58 +0800 Message-ID: <20260803142003.12857-35-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-tegra114.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index aa44ffd09e61..333fb549214e 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -1450,7 +1450,6 @@ static void tegra_spi_remove(struct platform_device *= pdev) tegra_spi_runtime_suspend(&pdev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int tegra_spi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -1476,7 +1475,6 @@ static int tegra_spi_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif =20 static int tegra_spi_runtime_suspend(struct device *dev) { @@ -1505,14 +1503,14 @@ static int tegra_spi_runtime_resume(struct device *= dev) } =20 static const struct dev_pm_ops tegra_spi_pm_ops =3D { - SET_RUNTIME_PM_OPS(tegra_spi_runtime_suspend, - tegra_spi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra_spi_suspend, tegra_spi_resume) + RUNTIME_PM_OPS(tegra_spi_runtime_suspend, + tegra_spi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(tegra_spi_suspend, tegra_spi_resume) }; static struct platform_driver tegra_spi_driver =3D { .driver =3D { .name =3D "spi-tegra114", - .pm =3D &tegra_spi_pm_ops, + .pm =3D pm_ptr(&tegra_spi_pm_ops), .of_match_table =3D tegra_spi_of_match, }, .probe =3D tegra_spi_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2401934F497; Mon, 3 Aug 2026 14:47:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768421; cv=none; b=EO5l25qe+iC41lLReDf2Pp7MTg5v9DIke0+cjwfhWiGreHnUXLTkZsBRKeWE8CrjPlobrmIZPKiMRd+e14oxhsWHuq0t60qCm8HsseBrDBj+bsk3yb8eW/YroSQ18x22aVFUstKnO7aDKJQ4tWlZbqW4copd8UNZDslUmLnNot8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768421; c=relaxed/simple; bh=aLet85za+RPwFLDE05XugohfAb4HItJodCGBtANfrEo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LrzHuU5xI+Xff1Tn2C7Usi6XKAo+gGuNhMY09D5vVayS8lZxO87zekIZkKVvnGuyxA+u5Zx259tp94eJKbTPA5TRiXW2aiNRD4JXVv5XrVUtIaDgVrW3MH6VDHr77DjA6wvFscpj2gbOgz2SVjAmfCGmCl8w2algLcSFKLFyb08= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KEI4LUtc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KEI4LUtc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F8BD1F00A3A; Mon, 3 Aug 2026 14:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768420; bh=o0L9qc4oumavG1tn+aaIT7DAKheim9V6n6gw3jfXeek=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KEI4LUtc2sVv6whezpjlSywMZf6MDYdhXqbAUFjjZqKtN1xw5GuseXpUB9XMR+Yro FI/6bwADIRxxY1lgVn/DtyUbL+I8Y/khgEUkRvXKbmqcYEISkxnnKsZslqyjXvOiSJ vfCsyJJFJPgMWQTw1dogL/KwCFadwaUbxCvxeSgkP+dxKpEuGBUyPsQH8KeNHLBpxH dWO1NdsXuUiIGllTEY0k1Lu4dyL0cLAActOzs9kl7CWj3XbqTFMRk2rpm0w/eWg5LA xA6CMQWC019MYAh3GYxLYsyFzGlpF8seKEG99Uyg6VQiry826yZA38rk3vZdBiRbLM QjkJy05h4HsIw== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 35/39] spi: tegra20-sflash: use modern PM macros Date: Mon, 3 Aug 2026 22:19:59 +0800 Message-ID: <20260803142003.12857-36-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-tegra20-sflash.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sfl= ash.c index 2caa33f0a52c..2a5e3acea06b 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -533,7 +533,6 @@ static void tegra_sflash_remove(struct platform_device = *pdev) tegra_sflash_runtime_suspend(&pdev->dev); } =20 -#ifdef CONFIG_PM_SLEEP static int tegra_sflash_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -557,7 +556,6 @@ static int tegra_sflash_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif =20 static int tegra_sflash_runtime_suspend(struct device *dev) { @@ -586,14 +584,14 @@ static int tegra_sflash_runtime_resume(struct device = *dev) } =20 static const struct dev_pm_ops slink_pm_ops =3D { - SET_RUNTIME_PM_OPS(tegra_sflash_runtime_suspend, - tegra_sflash_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra_sflash_suspend, tegra_sflash_resume) + RUNTIME_PM_OPS(tegra_sflash_runtime_suspend, + tegra_sflash_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(tegra_sflash_suspend, tegra_sflash_resume) }; static struct platform_driver tegra_sflash_driver =3D { .driver =3D { .name =3D "spi-tegra-sflash", - .pm =3D &slink_pm_ops, + .pm =3D pm_ptr(&slink_pm_ops), .of_match_table =3D tegra_sflash_of_match, }, .probe =3D tegra_sflash_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 551A83E1693; Mon, 3 Aug 2026 14:47:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768437; cv=none; b=jw5v6BQKx07ctPqNcyi21Z1kdv8m1pXYh9pBFraZOvRmvY8Cu5SMYtIOBKWRC3UsuhExRaVavWD1Bo51EdYEzskdtBHWlwBA8GIhMTeXWoo5e/UQcj1TpgGsK5waGISOQHVNGnv2Mjn4HQFtpbd9m6+02LSIcFmhq+jMIouQE+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768437; c=relaxed/simple; bh=uclEmFxV03jriluxmcY89G7LolTTF7FzDhkDAFfCBaA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XYSNmfqWGy3SZlwrLNzukw/XSGeXfgQ7jYYj0nkXYo+TsWjDrbYIOykXuqPfQKgT3SeEGBv+dfL2KMIGQeelw9zXjXinWssoPEHn5Xj9RHTjwUSkKC0UBNNQj5KC6tU1hDkPQsvYH7HEPWJM6Nm6IEMUsX9x+x6SVqFtfM8ZIMY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K8afrLM0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K8afrLM0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B54A1F000E9; Mon, 3 Aug 2026 14:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768436; bh=6NkiNvgbgYuE5f4JQ+Ko6GUV8Jy8D2RlfkfEKUf2PDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K8afrLM0szciqnFhbEHQXQWkmd2S0ITwg0QdarhEepDiZHQr2HOAJCd+ZDh/Aju3P 3lYreLmtYDHjiPyTd+Ds/W3oPHLterDG4mBpqyr4wZgXN9peiAa8IfhOi5YxNZu3UW YjhLM6Z+sqHCVlOHkT7uXDhcRxPwLddFQ0PaIEha+q91KYxKW28+DrnyWiALGBK1E3 gdPZL4oVgcOsO6b80fnZp/9pfMS2yoW2yXXtgk1x1njtkFlk/3NiBkgCWdhb3oyWJA o89LEqB3VIbRik2m11jnXgHw606Ntet88RqJ9/Y0HIwjG2blmCGEogS1aYXAfbNZtJ DF+48dnHOOWyA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 36/39] spi: tegra20-slink: use modern PM macros Date: Mon, 3 Aug 2026 22:20:00 +0800 Message-ID: <20260803142003.12857-37-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards or __maybe_unused. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-tegra20-slink.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slin= k.c index c15c076295cd..ed1fcf57dd30 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1144,7 +1144,6 @@ static void tegra_slink_remove(struct platform_device= *pdev) tegra_slink_deinit_dma_param(tspi, true); } =20 -#ifdef CONFIG_PM_SLEEP static int tegra_slink_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); @@ -1169,9 +1168,8 @@ static int tegra_slink_resume(struct device *dev) =20 return spi_controller_resume(host); } -#endif =20 -static int __maybe_unused tegra_slink_runtime_suspend(struct device *dev) +static int tegra_slink_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct tegra_slink_data *tspi =3D spi_controller_get_devdata(host); @@ -1183,7 +1181,7 @@ static int __maybe_unused tegra_slink_runtime_suspend= (struct device *dev) return 0; } =20 -static int __maybe_unused tegra_slink_runtime_resume(struct device *dev) +static int tegra_slink_runtime_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct tegra_slink_data *tspi =3D spi_controller_get_devdata(host); @@ -1198,14 +1196,14 @@ static int __maybe_unused tegra_slink_runtime_resum= e(struct device *dev) } =20 static const struct dev_pm_ops slink_pm_ops =3D { - SET_RUNTIME_PM_OPS(tegra_slink_runtime_suspend, - tegra_slink_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra_slink_suspend, tegra_slink_resume) + RUNTIME_PM_OPS(tegra_slink_runtime_suspend, + tegra_slink_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(tegra_slink_suspend, tegra_slink_resume) }; static struct platform_driver tegra_slink_driver =3D { .driver =3D { .name =3D "spi-tegra-slink", - .pm =3D &slink_pm_ops, + .pm =3D pm_ptr(&slink_pm_ops), .of_match_table =3D tegra_slink_of_match, }, .probe =3D tegra_slink_probe, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8D583267B07; Mon, 3 Aug 2026 14:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768446; cv=none; b=owuiZLWXSWjK6cLCPcEdJYx5PIVY7YQGJmzGZbU2+9B3NNueYb2Q5+4H5ogQIMuj+VrcSYdKAOb3+DQ4TgTVKj7NPZf1aUELq2cgQBGZwhIwzz1ilq1OXAXt2eDa+VdiD6/cZh/Vke+FwpyFSbx6GwdrZ8drZ0moqP3hhaHlCGw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768446; c=relaxed/simple; bh=OP4yhx7wZia7YCXeLoQEJ3Imk8DGC1p0azH81HLrnh4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mn5a7yefiJzxyTqUtJ9P7eXFkpW31hSO48wRVXqK26vsRd8mghoxHGiO4fM49JMxWGyMnzj1ybxhkjD/9SnhSqKfqguDFB9aHbl377ihfntMvnk4rHKdCb2Xlxt3OAt2uCgoBajpRWPZvP5Y+ORfwqGbpfCSpdawo8BQtD78Ef0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JN+o+baV; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JN+o+baV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CA321F00A3A; Mon, 3 Aug 2026 14:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768445; bh=Mo+WbYK0qfnbpg3vk5MVhQ1BxW8zq7G90SRaL0JyLX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JN+o+baVU/qosAsXKlbdV/gjb99HAu91oaUADIOH2LpRCjTYfsecT9mGwQmX1uBeu 1+uOCt6DfHZ6yFv46yNUuIMUfRf5y08/+rQO6/veoMA51d70hpCBOmSBgUUJgYR8o0 SkaMb1ZfnenpiXTLq25sZqA4GQdx1j9WeQawyBTZxKIRdHnCaocRq4S7L2NO7jeOj9 bYHWZujqU9nFWQpsBTdpOPibUUOns2rHW8wR2++OIyqCHoGboYkBVPe983a4ZkcNgA tl+3QJ8jAH7IPiat6pGoDD6quAh4kN0XqweMGM4BoSgFeLQ1kQze2yTZG/UpUFib5H 8uCAzssAVSyyg== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 37/39] spi: tegra210-quad: use modern PM macros Date: Mon, 3 Aug 2026 22:20:01 +0800 Message-ID: <20260803142003.12857-38-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-tegra210-quad.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-qua= d.c index 588a929a9785..8ede864c3d3c 100644 --- a/drivers/spi/spi-tegra210-quad.c +++ b/drivers/spi/spi-tegra210-quad.c @@ -1837,14 +1837,14 @@ static void tegra_qspi_remove(struct platform_devic= e *pdev) tegra_qspi_deinit_dma(tqspi); } =20 -static int __maybe_unused tegra_qspi_suspend(struct device *dev) +static int tegra_qspi_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); =20 return spi_controller_suspend(host); } =20 -static int __maybe_unused tegra_qspi_resume(struct device *dev) +static int tegra_qspi_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct tegra_qspi *tqspi =3D spi_controller_get_devdata(host); @@ -1863,7 +1863,7 @@ static int __maybe_unused tegra_qspi_resume(struct de= vice *dev) return spi_controller_resume(host); } =20 -static int __maybe_unused tegra_qspi_runtime_suspend(struct device *dev) +static int tegra_qspi_runtime_suspend(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct tegra_qspi *tqspi =3D spi_controller_get_devdata(host); @@ -1879,7 +1879,7 @@ static int __maybe_unused tegra_qspi_runtime_suspend(= struct device *dev) return 0; } =20 -static int __maybe_unused tegra_qspi_runtime_resume(struct device *dev) +static int tegra_qspi_runtime_resume(struct device *dev) { struct spi_controller *host =3D dev_get_drvdata(dev); struct tegra_qspi *tqspi =3D spi_controller_get_devdata(host); @@ -1896,14 +1896,14 @@ static int __maybe_unused tegra_qspi_runtime_resume= (struct device *dev) } =20 static const struct dev_pm_ops tegra_qspi_pm_ops =3D { - SET_RUNTIME_PM_OPS(tegra_qspi_runtime_suspend, tegra_qspi_runtime_resume,= NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra_qspi_suspend, tegra_qspi_resume) + RUNTIME_PM_OPS(tegra_qspi_runtime_suspend, tegra_qspi_runtime_resume, NUL= L) + SYSTEM_SLEEP_PM_OPS(tegra_qspi_suspend, tegra_qspi_resume) }; =20 static struct platform_driver tegra_qspi_driver =3D { .driver =3D { .name =3D "tegra-qspi", - .pm =3D &tegra_qspi_pm_ops, + .pm =3D pm_ptr(&tegra_qspi_pm_ops), .of_match_table =3D tegra_qspi_of_match, .acpi_match_table =3D ACPI_PTR(tegra_qspi_acpi_match), }, --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9309D303C9C; Mon, 3 Aug 2026 14:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768458; cv=none; b=UX83g+cAAGprboDozR+NZZwouZcQLgvpS6549/PdPQfDbv4acJDgB8o0VKQJFN/a+XByEmGTsrXKPLnqpUX72zqOPGZ1k8IxBHHIYQaQKsgqXc+/9cNqpF6OWSyMCAFogWOFCyNDKVAnEjbG3k2xGRHK1Z3+wGzYXhQuj2baOuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768458; c=relaxed/simple; bh=m8v3OFLIti6H8Cp6MomDvkipHJpgMuOdRXDtyCF4IZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eUmQxOR+Y590VqSdSONa7s6tfY/t1FuiLsTpvLOcVpXZBHZ2xLHMCsFdEYhDDMIOQojfnyUG/TJ6Lf7aHDur5USlPxoM2EAra9nDkxszIacYST8P/h4Di7bQR51K3d+dBPg1/dZIAJSkcx+ycHVGrFPjH5j7sMD4ex1wCL2+Fis= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mxO4qi9S; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mxO4qi9S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4312B1F000E9; Mon, 3 Aug 2026 14:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768457; bh=QJStuAggcKF1nXu7NXEt8uGHvIkJp1MSnsjyNzc0HrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mxO4qi9SIsYk+tYSasKFQn0rlVuTurEOxyGXkn6cfsVxn+KT8vd94SQ0BP9tr9wmv 3hgCFr4RTcwQBGIApXoqL7SdHp2gvkmeT4JQVB2eO6RpyW5fcPPQFpmkVWbxbCc0SU twLZh6/OQG1KxvUq430hVGyXmQcmt0WCOYrREyoVCeh+12lKV2YrsLqvcntsFCA8tz 8TfDJupMMggl8T2iJhFb6ChzcfetEaRNtdohQOzs+uJcbsB1/4wq8EGIwh9xcvVs/k 613JSx57TxEC9nsTJkElHM5kKtuCj5r8ea3TP5D6zrzQg2urfXKtLde8E74eSsmQYm n9WwloeMoXSRA== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 38/39] spi: topcliff-pch: use modern PM macros Date: Mon, 3 Aug 2026 22:20:02 +0800 Message-ID: <20260803142003.12857-39-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. At the same time, for pch_spi_pd_driver, we also switch to modern driver.pm for pm ops. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-topcliff-pch.c | 47 +++++++++++++++------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index c5409ca7faef..98723042c16f 100644 --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c @@ -1438,19 +1438,17 @@ static void pch_spi_pd_remove(struct platform_devic= e *plat_dev) =20 spi_controller_put(data->host); } -#ifdef CONFIG_PM -static int pch_spi_pd_suspend(struct platform_device *pd_dev, - pm_message_t state) + +static int pch_spi_pd_suspend(struct device *dev) { u8 count; - struct pch_spi_board_data *board_dat =3D dev_get_platdata(&pd_dev->dev); - struct pch_spi_data *data =3D platform_get_drvdata(pd_dev); + struct pch_spi_board_data *board_dat =3D dev_get_platdata(dev); + struct pch_spi_data *data =3D dev_get_drvdata(dev); =20 - dev_dbg(&pd_dev->dev, "%s ENTRY\n", __func__); + dev_dbg(dev, "%s ENTRY\n", __func__); =20 if (!board_dat) { - dev_err(&pd_dev->dev, - "%s pci_get_drvdata returned NULL\n", __func__); + dev_err(dev, "%s pci_get_drvdata returned NULL\n", __func__); return -EFAULT; } =20 @@ -1471,22 +1469,20 @@ static int pch_spi_pd_suspend(struct platform_devic= e *pd_dev, free_irq(board_dat->pdev->irq, data); =20 data->irq_reg_sts =3D false; - dev_dbg(&pd_dev->dev, - "%s free_irq invoked successfully.\n", __func__); + dev_dbg(dev, "%s free_irq invoked successfully.\n", __func__); } =20 return 0; } =20 -static int pch_spi_pd_resume(struct platform_device *pd_dev) +static int pch_spi_pd_resume(struct device *dev) { - struct pch_spi_board_data *board_dat =3D dev_get_platdata(&pd_dev->dev); - struct pch_spi_data *data =3D platform_get_drvdata(pd_dev); + struct pch_spi_board_data *board_dat =3D dev_get_platdata(dev); + struct pch_spi_data *data =3D dev_get_drvdata(dev); int retval; =20 if (!board_dat) { - dev_err(&pd_dev->dev, - "%s pci_get_drvdata returned NULL\n", __func__); + dev_err(dev, "%s pci_get_drvdata returned NULL\n", __func__); return -EFAULT; } =20 @@ -1495,8 +1491,7 @@ static int pch_spi_pd_resume(struct platform_device *= pd_dev) retval =3D request_irq(board_dat->pdev->irq, pch_spi_handler, IRQF_SHARED, KBUILD_MODNAME, data); if (retval < 0) { - dev_err(&pd_dev->dev, - "%s request_irq failed\n", __func__); + dev_err(dev, "%s request_irq failed\n", __func__); return retval; } =20 @@ -1507,19 +1502,17 @@ static int pch_spi_pd_resume(struct platform_device= *pd_dev) } return 0; } -#else -#define pch_spi_pd_suspend NULL -#define pch_spi_pd_resume NULL -#endif + +static DEFINE_SIMPLE_DEV_PM_OPS(pch_spi_pd_pm_ops, + pch_spi_pd_suspend, pch_spi_pd_resume); =20 static struct platform_driver pch_spi_pd_driver =3D { .driver =3D { .name =3D "pch-spi", + .pm =3D pm_sleep_ptr(&pch_spi_pd_pm_ops), }, .probe =3D pch_spi_pd_probe, .remove =3D pch_spi_pd_remove, - .suspend =3D pch_spi_pd_suspend, - .resume =3D pch_spi_pd_resume }; =20 static int pch_spi_probe(struct pci_dev *pdev, const struct pci_device_id = *id) @@ -1618,7 +1611,7 @@ static void pch_spi_remove(struct pci_dev *pdev) kfree(pd_dev_save); } =20 -static int __maybe_unused pch_spi_suspend(struct device *dev) +static int pch_spi_suspend(struct device *dev) { struct pch_pd_dev_save *pd_dev_save =3D dev_get_drvdata(dev); =20 @@ -1629,7 +1622,7 @@ static int __maybe_unused pch_spi_suspend(struct devi= ce *dev) return 0; } =20 -static int __maybe_unused pch_spi_resume(struct device *dev) +static int pch_spi_resume(struct device *dev) { struct pch_pd_dev_save *pd_dev_save =3D dev_get_drvdata(dev); =20 @@ -1641,14 +1634,14 @@ static int __maybe_unused pch_spi_resume(struct dev= ice *dev) return 0; } =20 -static SIMPLE_DEV_PM_OPS(pch_spi_pm_ops, pch_spi_suspend, pch_spi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pch_spi_pm_ops, pch_spi_suspend, pch_spi_r= esume); =20 static struct pci_driver pch_spi_pcidev_driver =3D { .name =3D "pch_spi", .id_table =3D pch_spi_pcidev_id, .probe =3D pch_spi_probe, .remove =3D pch_spi_remove, - .driver.pm =3D &pch_spi_pm_ops, + .driver.pm =3D pm_sleep_ptr(&pch_spi_pm_ops), }; =20 static int __init pch_spi_init(void) --=20 2.53.0 From nobody Fri Oct 2 08:24:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 313A741D12C; Mon, 3 Aug 2026 14:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768470; cv=none; b=oIxTcEK0iyRbIafTcRxa/EHzkoMXPoNTFQYINOd083QIBxhOaLG3XxXdNBnje+ytdMxa/OMvFShnnbkUkj8Ytuq5nV/7PSMFPH60T2MzR8zAuDt0p9IPILWUjQZj0CLhboH+s4EAvvX8SQ86PiBWlempfP7f14ewYhKTxX0F5x4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768470; c=relaxed/simple; bh=th+gSz3ZfFcXLd9CAONrz47oXizCQjZk1hkgHWndUZk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OCcHYNjXKg22HBD4Gb7flZ/JJ6+U4JjJLN36L/+Ddu8VXJCggEZBLopjIxR0ju0QykGfYOXqUMCT8ZcPk8v+c5Va/AgPHQnHV7zy2K6su0Ris+4n+RwlMcpwaHL679CK4ub4Yp1vaqmE28PtgFWoNrlltKQnedgt2fM2A50ilvk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bmUJmptS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bmUJmptS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1054D1F00A3A; Mon, 3 Aug 2026 14:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768468; bh=zkX/3dzt/quj43edlafhWH61EJ/HhtjA4rsT3qwwG8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bmUJmptS05vLn302+g04AnpaBKS1dxJatne2B4RJkuqR28nUNl9c2VT6adbYuCDIL EbIUB1yOAsI00pp47UXjpfecaATFregOwoEEoGFwMcPp7PJjvvq7Iki6pkJ2rBDfSb +xKPYQ0A7aNBZGvH7slyomm7ypFAt01TqOTg1DCwh7vI1zkg2+Wz4lHOCqfca2OPu7 SardyHykGd/CC81EtpwAV+AEZzod12rvuexV4PiQe3bUX4qWRtRPlTJBlaS8dC83WY lrcoebiUiuvdU81Gk8fbYHqeMDhc41S3MO+3XTfkHWOT+PGohbVu+wxEm18yWNpHyv daTLK4vBWaTFQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 39/39] spi: zynqmp-gqspi: use modern PM macros Date: Mon, 3 Aug 2026 22:20:03 +0800 Message-ID: <20260803142003.12857-40-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-zynqmp-gqspi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index f9a1427dabad..4d55090fa443 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -935,7 +935,7 @@ static int zynqmp_qspi_read_op(struct zynqmp_qspi *xqsp= i, u8 rx_nbits, * * Return: Always 0 */ -static int __maybe_unused zynqmp_qspi_suspend(struct device *dev) +static int zynqmp_qspi_suspend(struct device *dev) { struct zynqmp_qspi *xqspi =3D dev_get_drvdata(dev); struct spi_controller *ctlr =3D xqspi->ctlr; @@ -959,7 +959,7 @@ static int __maybe_unused zynqmp_qspi_suspend(struct de= vice *dev) * * Return: 0 on success; error value otherwise */ -static int __maybe_unused zynqmp_qspi_resume(struct device *dev) +static int zynqmp_qspi_resume(struct device *dev) { struct zynqmp_qspi *xqspi =3D dev_get_drvdata(dev); struct spi_controller *ctlr =3D xqspi->ctlr; @@ -979,7 +979,7 @@ static int __maybe_unused zynqmp_qspi_resume(struct dev= ice *dev) * * Return: Always 0 */ -static int __maybe_unused zynqmp_runtime_suspend(struct device *dev) +static int zynqmp_runtime_suspend(struct device *dev) { struct zynqmp_qspi *xqspi =3D dev_get_drvdata(dev); =20 @@ -997,7 +997,7 @@ static int __maybe_unused zynqmp_runtime_suspend(struct= device *dev) * * Return: 0 on success and error value on error */ -static int __maybe_unused zynqmp_runtime_resume(struct device *dev) +static int zynqmp_runtime_resume(struct device *dev) { struct zynqmp_qspi *xqspi =3D dev_get_drvdata(dev); int ret; @@ -1186,9 +1186,8 @@ static int zynqmp_qspi_exec_op(struct spi_mem *mem, } =20 static const struct dev_pm_ops zynqmp_qspi_dev_pm_ops =3D { - SET_RUNTIME_PM_OPS(zynqmp_runtime_suspend, - zynqmp_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(zynqmp_qspi_suspend, zynqmp_qspi_resume) + RUNTIME_PM_OPS(zynqmp_runtime_suspend, zynqmp_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(zynqmp_qspi_suspend, zynqmp_qspi_resume) }; =20 static const struct qspi_platform_data versal_qspi_def =3D { @@ -1382,7 +1381,7 @@ static struct platform_driver zynqmp_qspi_driver =3D { .driver =3D { .name =3D "zynqmp-qspi", .of_match_table =3D zynqmp_qspi_of_match, - .pm =3D &zynqmp_qspi_dev_pm_ops, + .pm =3D pm_ptr(&zynqmp_qspi_dev_pm_ops), }, }; =20 --=20 2.53.0