Re: [PATCH RFC 3/4] mmc: sdhci-acpi: Set MMC_CAP2_NO_SDIO_RESET if child has wake from S4 (hibernate)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/04/17 00:52, Rafael J. Wysocki wrote:
> On Fri, Apr 21, 2017 at 12:08 PM, Adrian Hunter <adrian.hunter@xxxxxxxxx> 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@xxxxxxxxx>
>> ---
>>  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
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux