linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Cooper <alcooperx@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Al Cooper <alcooperx@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Andrew Jeffery <andrew@aj.id.au>,
	bcm-kernel-feedback-list@broadcom.com,
	devicetree@vger.kernel.org, "Enrico Weigelt,
	metux IT consult" <info@metux.net>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Takao Orito <orito.takao@socionext.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH 4/6] mmc: sdhci-brcmstb: Add shutdown callback
Date: Mon, 13 Jan 2020 16:07:04 -0500	[thread overview]
Message-ID: <20200113210706.11972-5-alcooperx@gmail.com> (raw)
In-Reply-To: <20200113210706.11972-1-alcooperx@gmail.com>

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@gmail.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


  parent reply	other threads:[~2020-01-13 21:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 21:07 [PATCH 0/6] mmc: sdhci-brcmstb: Driver updates Al Cooper
2020-01-13 21:07 ` [PATCH 1/6] dt-bindings: mmc: brcm,sdhci-brcmstb: Add support for 7216b0 Al Cooper
2020-01-13 21:07 ` [PATCH 2/6] mmc: sdhci-brcmstb: Add ability to use HS400ES transfer mode Al Cooper
2020-01-13 21:07 ` [PATCH 3/6] mmc: sdhci-brcmstb: Fix driver to defer on clk_get defer Al Cooper
2020-01-13 21:07 ` Al Cooper [this message]
2020-01-13 21:07 ` [PATCH 5/6] mmc: sdhci-brcmstb: Add support for Command Queuing (CQE) Al Cooper
2020-01-13 21:07 ` [PATCH 6/6] mmc: sdhci-brcmstb: Fix incorrect switch to HS mode Al Cooper
2020-01-20  8:26 ` [PATCH 0/6] mmc: sdhci-brcmstb: Driver updates Adrian Hunter
2020-01-20 11:25 ` Ulf Hansson

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=20200113210706.11972-5-alcooperx@gmail.com \
    --to=alcooperx@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=andrew@aj.id.au \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=faiz_abbas@ti.com \
    --cc=info@metux.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=orito.takao@socionext.com \
    --cc=robh+dt@kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yuehaibing@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).