From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seungwon Jeon Subject: RE: [PATCH v2] mmc: sdhci-s3c: fix the card detection in runtime-pm Date: Fri, 19 Oct 2012 17:04:14 +0900 Message-ID: <006501cdadd0$548d1f70$fda75e50$%jun@samsung.com> References: <004801cdad17$498d9140$dca8b3c0$%jun@samsung.com> <201210181302.30843.heiko@sntech.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout2.samsung.com ([203.254.224.25]:33424 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456Ab2JSIEQ (ORCPT ); Fri, 19 Oct 2012 04:04:16 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MC400GGMRQYPDL0@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Fri, 19 Oct 2012 17:04:14 +0900 (KST) Received: from DOTGIHJUN01 ([12.23.118.161]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MC400GMPRR2ZV60@mmp1.samsung.com> for linux-mmc@vger.kernel.org; Fri, 19 Oct 2012 17:04:14 +0900 (KST) In-reply-to: <201210181302.30843.heiko@sntech.de> Content-language: ko Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: =?utf-8?Q?'Heiko_St=C3=BCbner'?= Cc: linux-mmc@vger.kernel.org, 'Chander Kashyap' , 'Chris Ball' On Thursday, October 18, 2012, Heiko Stuebner > 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 > Tested-by: Heiko Stuebner > --- > 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