diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2017-06-13 15:07:51 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-06-20 11:30:49 +0300 |
commit | 03dbaa04a2e5bac0ae907a9ed31472bc4bb56fd3 (patch) | |
tree | 74384a33ffcde72122f4c45a088852d4b3587fad /drivers/mmc/core/slot-gpio.c | |
parent | d2a47176a877b1eccd3086a4c8d790d644d594cb (diff) | |
download | linux-03dbaa04a2e5bac0ae907a9ed31472bc4bb56fd3.tar.xz |
mmc: slot-gpio: Add support to enable irq wake on cd_irq
Add host capability MMC_CAP_CD_WAKE to enable irq wake on the card detect
irq.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/slot-gpio.c')
-rw-r--r-- | drivers/mmc/core/slot-gpio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c index a8450a8701e4..863f1dbbfc1b 100644 --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -151,6 +151,8 @@ void mmc_gpiod_request_cd_irq(struct mmc_host *host) if (irq < 0) host->caps |= MMC_CAP_NEEDS_POLL; + else if ((host->caps & MMC_CAP_CD_WAKE) && !enable_irq_wake(irq)) + host->slot.cd_wake_enabled = true; } EXPORT_SYMBOL(mmc_gpiod_request_cd_irq); |