From: Adrian Hunter <adrian.hunter@intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc <linux-mmc@vger.kernel.org>,
linux-pm <linux-pm@vger.kernel.org>,
linux-acpi <linux-acpi@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH RFC 3/4] mmc: sdhci-acpi: Set MMC_CAP2_NO_SDIO_RESET if child has wake from S4 (hibernate)
Date: Tue, 25 Apr 2017 10:28:07 +0300 [thread overview]
Message-ID: <a28facd9-9d81-2be0-280b-ac4267e334d0@intel.com> (raw)
In-Reply-To: <CAJZ5v0hcfsbfy=KhgTDvg7zj-egKODDJAF0-gqWdxuxKfyBFPQ@mail.gmail.com>
On 25/04/17 00:52, Rafael J. Wysocki wrote:
> On Fri, Apr 21, 2017 at 12:08 PM, Adrian Hunter <adrian.hunter@intel.com> wrote:
>> SDIO reset interferes with a SDIO function driver's restore from
>> hibernation. Set MMC_CAP2_NO_SDIO_RESET if a child node has _S4W method
>> which indicates a capability to wake from S4 (hibernate).
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
>> drivers/mmc/host/sdhci-acpi.c | 17 ++++++++++++++++-
>> 1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
>> index c6a9a1bfaa22..e053a45db6b1 100644
>> --- a/drivers/mmc/host/sdhci-acpi.c
>> +++ b/drivers/mmc/host/sdhci-acpi.c
>> @@ -374,6 +374,14 @@ static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(const char *hid,
>> return NULL;
>> }
>>
>> +static bool sdhci_acpi_child_has_s4w(struct acpi_device *child)
>> +{
>> + acpi_handle handle = child->handle;
>> + unsigned long long ret;
>> +
>> + return ACPI_SUCCESS(acpi_evaluate_integer(handle, "_S4W", NULL, &ret));
>
> First off, there is acpi_has_method().
>
> Second, checking child->wakeup.sleep_state is a better indicator of S4
> wakeup support.
So, like this?
child->wakeup.sleep_state >= ACPI_STATE_S4
That comes just from _PRW right?
>
>> +}
>> +
>> static int sdhci_acpi_probe(struct platform_device *pdev)
>> {
>> struct device *dev = &pdev->dev;
>
> Thanks,
> Rafael
>
next prev parent reply other threads:[~2017-04-25 7:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 10:08 [PATCH RFC 0/4] mmc: sdio: To support hibernation add capability to skip SDIO reset at scan Adrian Hunter
2017-04-21 10:08 ` [PATCH RFC 1/4] mmc: sdio: Keep card runtime resumed while adding function devices Adrian Hunter
2017-04-24 21:03 ` Ulf Hansson
2017-04-25 6:41 ` Adrian Hunter
2017-04-21 10:08 ` [PATCH RFC 2/4] mmc: sdio: Add capability to skip SDIO reset at scan Adrian Hunter
2017-04-24 20:33 ` Ulf Hansson
2017-04-25 6:21 ` Adrian Hunter
2017-04-25 7:52 ` Ulf Hansson
2017-04-25 7:57 ` Adrian Hunter
2017-04-25 10:46 ` Ulf Hansson
2017-04-25 11:20 ` Adrian Hunter
2017-04-25 12:24 ` Ulf Hansson
2017-04-25 12:45 ` Adrian Hunter
2017-04-25 18:51 ` Grygorii Strashko
2017-04-25 19:11 ` Adrian Hunter
2017-04-21 10:08 ` [PATCH RFC 3/4] mmc: sdhci-acpi: Set MMC_CAP2_NO_SDIO_RESET if child has wake from S4 (hibernate) Adrian Hunter
2017-04-24 21:52 ` Rafael J. Wysocki
2017-04-25 7:28 ` Adrian Hunter [this message]
2017-04-25 11:05 ` Rafael J. Wysocki
2017-04-21 10:08 ` [PATCH RFC 4/4] mmc: sdhci-pci: " Adrian Hunter
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=a28facd9-9d81-2be0-280b-ac4267e334d0@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.org \
/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