Skip to content

Commit e7b5d63

Browse files
alcooperstorulf
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 6f2aa55 commit e7b5d63

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/mmc/host/sdhci-brcmstb.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
161161
return res;
162162
}
163163

164+
static void sdhci_brcmstb_shutdown(struct platform_device *pdev)
165+
{
166+
int ret;
167+
168+
ret = sdhci_pltfm_unregister(pdev);
169+
if (ret)
170+
dev_err(&pdev->dev, "failed to shutdown\n");
171+
}
172+
164173
MODULE_DEVICE_TABLE(of, sdhci_brcm_of_match);
165174

166175
static struct platform_driver sdhci_brcmstb_driver = {
@@ -171,6 +180,7 @@ static struct platform_driver sdhci_brcmstb_driver = {
171180
},
172181
.probe = sdhci_brcmstb_probe,
173182
.remove = sdhci_pltfm_unregister,
183+
.shutdown = sdhci_brcmstb_shutdown,
174184
};
175185

176186
module_platform_driver(sdhci_brcmstb_driver);

0 commit comments

Comments
 (0)