mmc: sdhci-pci: Fix BYT sd card getting stuck in runtime suspend
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 13 Jan 2014 07:49:16 +0000 (09:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:50:26 +0000 (13:50 -0800)
commit1fb1e637bd971cdf1d5d4ca3a0ed6dcb657dbdc0
tree3b59826b41484318e5bc4aa192f2c60e0c254046
parent5c8150ef94837713601532e6db0f31d3de711f1d
mmc: sdhci-pci: Fix BYT sd card getting stuck in runtime suspend

commit 77a0122e0838663795651aa0beb2325156f98c09 upstream.

A host controller for a SD card may need a GPIO for card detect in order
to wake up from runtime suspend when a card is inserted.  If that GPIO is
not configured, then the host controller will not wake up.  Fix that for
the affected devices by not enabling runtime PM unless the GPIO is
successfully set up.

This affects BYT sd card host controller which had runtime PM enabled from
v3.11.  For completeness, the MFD sd card host controller is flagged also.

The original patch before rebasing (see link below) was tested on v3.11.10
and v3.12.4 although the patch applied with some offsets and fuzz.  The
original patch is here:

    http://marc.info/?l=linux-mmc&m=138676702327057

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <chris@printf.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-pci.c