From: "Heiko Stübner" <heiko@sntech.de>
To: Seungwon Jeon <tgih.jun@samsung.com>
Cc: linux-mmc@vger.kernel.org,
'Chander Kashyap' <chander.kashyap@linaro.org>,
'Chris Ball' <cjb@laptop.org>
Subject: [PATCH v2] mmc: sdhci-s3c: fix the card detection in runtime-pm
Date: Thu, 18 Oct 2012 13:02:30 +0200 [thread overview]
Message-ID: <201210181302.30843.heiko@sntech.de> (raw)
In-Reply-To: <004801cdad17$498d9140$dca8b3c0$%jun@samsung.com>
If host clock is disabled, host cannot detect a card
in case of using the internal or gpio card-detect for detection.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
---
I've added the SDHCI_CD_GPIO to the conditional. With this change it works
on my machine. But I'm not sure if this would also be necessary for the
external card detect.
drivers/mmc/host/sdhci-s3c.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 0cabf18..649dc32 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -750,7 +750,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
sdhci_s3c_setup_card_detect_gpio(sc);
#ifdef CONFIG_PM_RUNTIME
- clk_disable(sc->clk_io);
+ if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL &&
+ pdata->cd_type != S3C_SDHCI_CD_GPIO)
+ clk_disable(sc->clk_io);
#endif
return 0;
@@ -797,7 +799,9 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
gpio_free(sc->ext_cd_gpio);
#ifdef CONFIG_PM_RUNTIME
- clk_enable(sc->clk_io);
+ if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL &&
+ pdata->cd_type != S3C_SDHCI_CD_GPIO)
+ clk_enable(sc->clk_io);
#endif
sdhci_remove_host(host, 1);
--
1.7.2.3
next prev parent reply other threads:[~2012-10-18 11:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 9:59 [PATCH] mmc: sdhci-s3c: fix the card detection in runtime-pm Seungwon Jeon
2012-10-18 11:02 ` Heiko Stübner [this message]
2012-10-19 8:04 ` [PATCH v2] " Seungwon Jeon
2012-10-19 8:10 ` Heiko Stübner
2012-10-29 21:16 ` Chris Ball
2012-10-29 22:37 ` Heiko Stübner
2012-10-30 3:54 ` Seungwon Jeon
2012-10-30 5:28 ` [PATCH v2 1/2] mmc: sdhci-s3c: ensure non-transaction of bus before clk_disable Seungwon Jeon
2012-11-07 19:34 ` Chris Ball
2013-01-22 10:48 ` [PATCH 2/2] mmc: block: don't start new request when the card is removed Seungwon Jeon
2013-02-01 5:25 ` Jaehoon Chung
2013-02-08 12:08 ` Konstantin Dorfman
2013-02-11 17:03 ` Chris Ball
2012-10-30 5:28 ` [PATCH v2 2/2] mmc: sdhci-s3c: fix the card detection in runtime-pm Seungwon Jeon
2012-11-07 19:36 ` Chris Ball
2012-11-09 10:41 ` [PATCH v3] mmc: sdhci-s3c: ensure non-transaction of bus before clk_disable Seungwon Jeon
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=201210181302.30843.heiko@sntech.de \
--to=heiko@sntech.de \
--cc=chander.kashyap@linaro.org \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tgih.jun@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.