All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seungwon Jeon <tgih.jun@samsung.com>
To: "'Heiko Stübner'" <heiko@sntech.de>
Cc: linux-mmc@vger.kernel.org,
	'Chander Kashyap' <chander.kashyap@linaro.org>,
	'Chris Ball' <cjb@laptop.org>
Subject: RE: [PATCH v2] mmc: sdhci-s3c: fix the card detection in runtime-pm
Date: Fri, 19 Oct 2012 17:04:14 +0900	[thread overview]
Message-ID: <006501cdadd0$548d1f70$fda75e50$%jun@samsung.com> (raw)
In-Reply-To: <201210181302.30843.heiko@sntech.de>

On Thursday, October 18, 2012, Heiko Stuebner <heiko@sntech.de>
> 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.

Card detection will be asserted out of host in case of using SDHCI_CD_GPIO.
Adding SDHCI_CD_GPIO to the conditional seems unnecessary.

Thanks.
Seungwon Jeon

> 
>  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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2012-10-19  8:04 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 ` [PATCH v2] " Heiko Stübner
2012-10-19  8:04   ` Seungwon Jeon [this message]
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='006501cdadd0$548d1f70$fda75e50$%jun@samsung.com' \
    --to=tgih.jun@samsung.com \
    --cc=chander.kashyap@linaro.org \
    --cc=cjb@laptop.org \
    --cc=heiko@sntech.de \
    --cc=linux-mmc@vger.kernel.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 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.