From: Felix Gu <ustc.gu@gmail.com>
To: Mark Brown <broonie@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Felix Gu <ustc.gu@gmail.com>
Subject: [PATCH v2] spi: meson-spifc: use devm_pm_runtime_set_active_enabled
Date: Sun, 02 Aug 2026 01:51:24 +0800 [thread overview]
Message-ID: <20260802-spifc-v2-1-46e9d06a3217@gmail.com> (raw)
Use devm_pm_runtime_set_active_enabled to replace
pm_runtime_set_active() + pm_runtime_enable() and drop the out_pm
error label.
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Changes in v2:
- Fix Mark's comment.
- Link to v1: https://patch.msgid.link/20260722-spifc-v1-1-e4462a4c6a06@gmail.com
To: Mark Brown <broonie@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Kevin Hilman <khilman@baylibre.com>
To: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-spi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-meson-spifc.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c
index e36aa94bbdae..82c1c3c0c84b 100644
--- a/drivers/spi/spi-meson-spifc.c
+++ b/drivers/spi/spi-meson-spifc.c
@@ -325,26 +325,20 @@ static int meson_spifc_probe(struct platform_device *pdev)
meson_spifc_hw_init(spifc);
- pm_runtime_set_active(spifc->dev);
- pm_runtime_enable(spifc->dev);
+ ret = devm_pm_runtime_set_active_enabled(spifc->dev);
+ if (ret)
+ return dev_err_probe(spifc->dev, ret, "failed to set runtime PM\n");
ret = devm_spi_register_controller(spifc->dev, host);
- if (ret) {
- dev_err(spifc->dev, "failed to register spi host\n");
- goto out_pm;
- }
+ if (ret)
+ return dev_err_probe(spifc->dev, ret, "failed to register spi host\n");
return 0;
-out_pm:
- pm_runtime_disable(spifc->dev);
-
- return ret;
}
static void meson_spifc_remove(struct platform_device *pdev)
{
pm_runtime_get_sync(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
}
---
base-commit: 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603
change-id: 20260722-spifc-336fbde9511b
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
WARNING: multiple messages have this Message-ID (diff)
From: Felix Gu <ustc.gu@gmail.com>
To: Mark Brown <broonie@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Felix Gu <ustc.gu@gmail.com>
Subject: [PATCH v2] spi: meson-spifc: use devm_pm_runtime_set_active_enabled
Date: Sun, 02 Aug 2026 01:51:24 +0800 [thread overview]
Message-ID: <20260802-spifc-v2-1-46e9d06a3217@gmail.com> (raw)
Use devm_pm_runtime_set_active_enabled to replace
pm_runtime_set_active() + pm_runtime_enable() and drop the out_pm
error label.
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Changes in v2:
- Fix Mark's comment.
- Link to v1: https://patch.msgid.link/20260722-spifc-v1-1-e4462a4c6a06@gmail.com
To: Mark Brown <broonie@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Kevin Hilman <khilman@baylibre.com>
To: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-spi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-meson-spifc.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c
index e36aa94bbdae..82c1c3c0c84b 100644
--- a/drivers/spi/spi-meson-spifc.c
+++ b/drivers/spi/spi-meson-spifc.c
@@ -325,26 +325,20 @@ static int meson_spifc_probe(struct platform_device *pdev)
meson_spifc_hw_init(spifc);
- pm_runtime_set_active(spifc->dev);
- pm_runtime_enable(spifc->dev);
+ ret = devm_pm_runtime_set_active_enabled(spifc->dev);
+ if (ret)
+ return dev_err_probe(spifc->dev, ret, "failed to set runtime PM\n");
ret = devm_spi_register_controller(spifc->dev, host);
- if (ret) {
- dev_err(spifc->dev, "failed to register spi host\n");
- goto out_pm;
- }
+ if (ret)
+ return dev_err_probe(spifc->dev, ret, "failed to register spi host\n");
return 0;
-out_pm:
- pm_runtime_disable(spifc->dev);
-
- return ret;
}
static void meson_spifc_remove(struct platform_device *pdev)
{
pm_runtime_get_sync(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
}
---
base-commit: 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603
change-id: 20260722-spifc-336fbde9511b
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2026-08-01 17:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 17:51 Felix Gu [this message]
2026-08-01 17:51 ` [PATCH v2] spi: meson-spifc: use devm_pm_runtime_set_active_enabled Felix Gu
2026-08-01 18:08 ` sashiko-bot
2026-08-11 14:05 ` Mark Brown
2026-08-11 14:05 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260802-spifc-v2-1-46e9d06a3217@gmail.com \
--to=ustc.gu@gmail.com \
--cc=broonie@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.