Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-of-arasan: Add shutdown callback
@ 2025-05-22  9:49 Paul Alvin
  2025-05-22 12:53 ` Adrian Hunter
  2025-05-23  8:21 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Alvin @ 2025-05-22  9:49 UTC (permalink / raw)
  To: michal.simek, adrian.hunter, ulf.hansson
  Cc: git, alvin.paulp, linux-arm-kernel, linux-mmc, linux-kernel

Implement shutdown hook to suspend host, power off PHY if enabled and
disable all mmc clocks.

Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
---
 drivers/mmc/host/sdhci-of-arasan.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 8c29676ab662..af4643e24ecc 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -2056,6 +2056,13 @@ static void sdhci_arasan_remove(struct platform_device *pdev)
 	clk_disable_unprepare(clk_ahb);
 }
 
+static void sdhci_arasan_shutdown(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+
+	sdhci_arasan_suspend(dev);
+}
+
 static struct platform_driver sdhci_arasan_driver = {
 	.driver = {
 		.name = "sdhci-arasan",
@@ -2065,6 +2072,7 @@ static struct platform_driver sdhci_arasan_driver = {
 	},
 	.probe = sdhci_arasan_probe,
 	.remove = sdhci_arasan_remove,
+	.shutdown = sdhci_arasan_shutdown,
 };
 
 module_platform_driver(sdhci_arasan_driver);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-23  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  9:49 [PATCH] mmc: sdhci-of-arasan: Add shutdown callback Paul Alvin
2025-05-22 12:53 ` Adrian Hunter
2025-05-23  8:21 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox