[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200113210706.11972-5-alcooperx@gmail.com>
Date: Mon, 13 Jan 2020 16:07:04 -0500
From: Al Cooper <alcooperx@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Al Cooper <alcooperx@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Andrew Jeffery <andrew@...id.au>,
bcm-kernel-feedback-list@...adcom.com, devicetree@...r.kernel.org,
"Enrico Weigelt, metux IT consult" <info@...ux.net>,
Faiz Abbas <faiz_abbas@...com>,
Florian Fainelli <f.fainelli@...il.com>,
linux-arm-kernel@...ts.infradead.org, linux-mmc@...r.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Takao Orito <orito.takao@...ionext.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH 4/6] mmc: sdhci-brcmstb: Add shutdown callback
Shutdown controller and disable it's clocks to insure max power
savings in S5 on systems that leave power on.
Signed-off-by: Al Cooper <alcooperx@...il.com>
---
drivers/mmc/host/sdhci-brcmstb.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 218176b79b6a..7ea426ba5cbc 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -161,6 +161,15 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
return res;
}
+static void sdhci_brcmstb_shutdown(struct platform_device *pdev)
+{
+ int ret;
+
+ ret = sdhci_pltfm_unregister(pdev);
+ if (ret)
+ dev_err(&pdev->dev, "failed to shutdown\n");
+}
+
MODULE_DEVICE_TABLE(of, sdhci_brcm_of_match);
static struct platform_driver sdhci_brcmstb_driver = {
@@ -171,6 +180,7 @@ static struct platform_driver sdhci_brcmstb_driver = {
},
.probe = sdhci_brcmstb_probe,
.remove = sdhci_pltfm_unregister,
+ .shutdown = sdhci_brcmstb_shutdown,
};
module_platform_driver(sdhci_brcmstb_driver);
--
2.17.1
Powered by blists - more mailing lists