All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: Dong Aisheng <aisheng.dong@freescale.com>
Cc: linux-mmc@vger.kernel.org, fabio.estevam@freescale.com,
	marex@denx.de, ulf.hansson@linaro.org, s.trumtrar@pengutronix.de,
	smoch@web.de, linux-arm-kernel@lists.infradead.org,
	robertcnelson@gmail.com, s.hauer@pengutronix.de,
	chris@printf.net, rabeeh@solid-run.com,
	troy.kisky@boundarydevices.com, lisovy@gmail.com, hs@denx.de,
	gwenhael.goavec-merou@armadeus.com, p.zabel@pengutronix.de,
	rmk+kernel@arm.linux.org.uk, shawn.guo@linaro.org,
	b29396@freescale.com, tharvey@gateworks.com,
	LW@karo-electronics.de, ipaton0@gmail.com,
	linux-mmc-owner@vger.kernel.org
Subject: Re: [PATCH V2 06/11] mmc: sdhci-esdhc-imx: fix cd regression for dt platform
Date: Tue, 06 Oct 2015 15:15:42 -0700	[thread overview]
Message-ID: <2333b5f060a8e45bd8adcdab55365fab@agner.ch> (raw)
In-Reply-To: <1437569590-5228-7-git-send-email-aisheng.dong@freescale.com>

Hi Dong,

Just hit that issue in 4.1, could we add that patch also to stable?

--
Stefan

On 2015-07-22 05:53, Dong Aisheng wrote:
> Current card detect probe process is that when driver finds a valid
> ESDHC_CD_GPIO, it will clear the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION
> which is set by default for all esdhc/usdhc controllers.
> Then host driver will know there's a valid card detect function.
> 
> Commit 8d86e4fcccf6 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> breaks GPIO CD function for dt platform that it will return directly
> when find ESDHC_CD_GPIO for dt platform which result in the later wrongly
> to keep SDHCI_QUIRK_BROKEN_CARD_DETECTION for all dt platforms.
> Then MMC_CAP_NEEDS_POLL will be used instead even there's a valid
> GPIO card detect.
> 
> This patch adds back this function and follows the original approach to
> clear the quirk if find an valid CD GPIO for dt platforms.
> 
> Fixes: 8d86e4fcccf6 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index faf0cb9..4815391 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -881,6 +881,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  			 struct esdhc_platform_data *boarddata)
>  {
>  	struct device_node *np = pdev->dev.of_node;
> +	int ret;
>  
>  	if (!np)
>  		return -ENODEV;
> @@ -917,7 +918,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  	mmc_of_parse_voltage(np, &host->ocr_mask);
>  
>  	/* call to generic mmc_of_parse to support additional capabilities */
> -	return mmc_of_parse(host->mmc);
> +	ret = mmc_of_parse(host->mmc);
> +	if (ret)
> +		return ret;
> +
> +	if (!IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc)))
> +		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> +
> +	return 0;
>  }
>  #else
>  static inline int


WARNING: multiple messages have this Message-ID (diff)
From: stefan@agner.ch (Stefan Agner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 06/11] mmc: sdhci-esdhc-imx: fix cd regression for dt platform
Date: Tue, 06 Oct 2015 15:15:42 -0700	[thread overview]
Message-ID: <2333b5f060a8e45bd8adcdab55365fab@agner.ch> (raw)
In-Reply-To: <1437569590-5228-7-git-send-email-aisheng.dong@freescale.com>

Hi Dong,

Just hit that issue in 4.1, could we add that patch also to stable?

--
Stefan

On 2015-07-22 05:53, Dong Aisheng wrote:
> Current card detect probe process is that when driver finds a valid
> ESDHC_CD_GPIO, it will clear the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION
> which is set by default for all esdhc/usdhc controllers.
> Then host driver will know there's a valid card detect function.
> 
> Commit 8d86e4fcccf6 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> breaks GPIO CD function for dt platform that it will return directly
> when find ESDHC_CD_GPIO for dt platform which result in the later wrongly
> to keep SDHCI_QUIRK_BROKEN_CARD_DETECTION for all dt platforms.
> Then MMC_CAP_NEEDS_POLL will be used instead even there's a valid
> GPIO card detect.
> 
> This patch adds back this function and follows the original approach to
> clear the quirk if find an valid CD GPIO for dt platforms.
> 
> Fixes: 8d86e4fcccf6 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index faf0cb9..4815391 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -881,6 +881,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  			 struct esdhc_platform_data *boarddata)
>  {
>  	struct device_node *np = pdev->dev.of_node;
> +	int ret;
>  
>  	if (!np)
>  		return -ENODEV;
> @@ -917,7 +918,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  	mmc_of_parse_voltage(np, &host->ocr_mask);
>  
>  	/* call to generic mmc_of_parse to support additional capabilities */
> -	return mmc_of_parse(host->mmc);
> +	ret = mmc_of_parse(host->mmc);
> +	if (ret)
> +		return ret;
> +
> +	if (!IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc)))
> +		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> +
> +	return 0;
>  }
>  #else
>  static inline int

  reply	other threads:[~2015-10-06 22:16 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 12:52 [PATCH V2 00/11] mmc: sdhci-esdhci-imx: fix cd/wp regression Dong Aisheng
2015-07-22 12:52 ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 01/11] dts: imx51: fix sd card gpio polarity specified in device tree Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 02/11] dts: imx53: " Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 03/11] dts: imx6: " Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 04/11] dts: imx25: " Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 05/11] dts: imx7: " Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 06/11] mmc: sdhci-esdhc-imx: fix cd regression for dt platform Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-10-06 22:15   ` Stefan Agner [this message]
2015-10-06 22:15     ` Stefan Agner
2015-10-06 22:21     ` Fabio Estevam
2015-10-06 22:21       ` Fabio Estevam
2015-10-24 13:06       ` Fabio Estevam
2015-10-24 13:06         ` Fabio Estevam
2015-10-25 20:52         ` Robert Nelson
2015-10-25 20:52           ` Robert Nelson
2015-10-25 21:05           ` Fabio Estevam
2015-10-25 21:05             ` Fabio Estevam
2015-10-25 21:33             ` Robert Nelson
2015-10-25 21:33               ` Robert Nelson
2015-10-25 21:37               ` Fabio Estevam
2015-10-25 21:37                 ` Fabio Estevam
2015-11-11 15:16               ` Fabio Estevam
2015-11-11 15:16                 ` Fabio Estevam
2015-07-22 12:53 ` [PATCH V2 07/11] mmc: sdhci-esdhc-imx: move all non dt probe code into one function Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 08/11] mmc: sdhci: make max-frequency property in device tree work Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 09/11] mmc: sdhci-esdhc-imx: remove duplicated dts parsing Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 10/11] mmc: sdhci-esdhc-imx: clear f_max in boarddata Dong Aisheng
2015-07-22 12:53   ` Dong Aisheng
2015-07-22 12:53 ` [PATCH V2 11/11] dts: mmc: fsl-imx-esdhc: remove fsl,cd-controller support Dong Aisheng
2015-07-22 12:53   ` [PATCH V2 11/11] dts: mmc: fsl-imx-esdhc: remove fsl, cd-controller support Dong Aisheng
2015-07-23  4:45 ` [PATCH V2 00/11] mmc: sdhci-esdhci-imx: fix cd/wp regression Shawn Guo
2015-07-23  4:45   ` Shawn Guo
2015-07-23  9:11 ` Ulf Hansson
2015-07-23  9:11   ` Ulf Hansson

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=2333b5f060a8e45bd8adcdab55365fab@agner.ch \
    --to=stefan@agner.ch \
    --cc=LW@karo-electronics.de \
    --cc=aisheng.dong@freescale.com \
    --cc=b29396@freescale.com \
    --cc=chris@printf.net \
    --cc=fabio.estevam@freescale.com \
    --cc=gwenhael.goavec-merou@armadeus.com \
    --cc=hs@denx.de \
    --cc=ipaton0@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc-owner@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=lisovy@gmail.com \
    --cc=marex@denx.de \
    --cc=p.zabel@pengutronix.de \
    --cc=rabeeh@solid-run.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=robertcnelson@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=s.trumtrar@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=smoch@web.de \
    --cc=tharvey@gateworks.com \
    --cc=troy.kisky@boundarydevices.com \
    --cc=ulf.hansson@linaro.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.