From: Ulf Hansson <ulf.hansson@linaro.org>
To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, Laszlo Fiat <laszlo.fiat@gmail.com>,
Nicholas Krause <xerofoify@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing
Date: Thu, 19 May 2016 15:25:42 +0200 [thread overview]
Message-ID: <1463664342-19209-2-git-send-email-ulf.hansson@linaro.org> (raw)
In-Reply-To: <1463664342-19209-1-git-send-email-ulf.hansson@linaro.org>
From: Adrian Hunter <adrian.hunter@intel.com>
Some devices connected to the SDHCI controller may have separate enabling
lines that are controlled through GPIO. These devices need to be powered
on and enabled before probing. This is to ensure all devices connected can
be seen by the controller.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com>
Cc: <stable@vger.kernel.org> # 4.5+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/sdhci-acpi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index b2d70ba..2d1c4870 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -378,7 +378,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
acpi_handle handle = ACPI_HANDLE(dev);
- struct acpi_device *device;
+ struct acpi_device *device, *child;
struct sdhci_acpi_host *c;
struct sdhci_host *host;
struct resource *iomem;
@@ -390,6 +390,11 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
if (acpi_bus_get_device(handle, &device))
return -ENODEV;
+ /* Power on the SDHCI controller and its children */
+ acpi_device_fix_up_power(device);
+ list_for_each_entry(child, &device->children, node)
+ acpi_device_fix_up_power(child);
+
if (acpi_bus_get_status(device) || !device->status.present)
return -ENODEV;
--
1.9.1
next prev parent reply other threads:[~2016-05-19 13:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 13:25 [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power() Ulf Hansson
2016-05-19 13:25 ` Ulf Hansson [this message]
2016-05-20 7:04 ` [PATCH 2/2] mmc: sdhci-acpi: Ensure connected devices are powered when probing Adrian Hunter
2016-05-20 14:04 ` Ulf Hansson
2016-05-19 13:52 ` [PATCH 1/2] ACPI / PM: Export acpi_device_fix_up_power() Rafael J. Wysocki
2016-05-20 14:04 ` 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=1463664342-19209-2-git-send-email-ulf.hansson@linaro.org \
--to=ulf.hansson@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=laszlo.fiat@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stable@vger.kernel.org \
--cc=xerofoify@gmail.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