From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39664 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751868AbbJQWEf (ORCPT ); Sat, 17 Oct 2015 18:04:35 -0400 Subject: Patch "mmc: sdhci-esdhc-imx: fix cd regression for dt platform" has been added to the 4.1-stable tree To: aisheng.dong@freescale.com, fabio.estevam@freescale.com, gregkh@linuxfoundation.org, johan.derycke@barco.com, ulf.hansson@linaro.org Cc: , From: Date: Sat, 17 Oct 2015 15:04:32 -0700 Message-ID: <144511947275192@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled mmc: sdhci-esdhc-imx: fix cd regression for dt platform to the 4.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mmc-sdhci-esdhc-imx-fix-cd-regression-for-dt-platform.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 4800e87a2ee886c1972deb73f057d1a6541edb36 Mon Sep 17 00:00:00 2001 From: Dong Aisheng Date: Wed, 22 Jul 2015 20:53:05 +0800 Subject: mmc: sdhci-esdhc-imx: fix cd regression for dt platform From: Dong Aisheng commit 4800e87a2ee886c1972deb73f057d1a6541edb36 upstream. 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 Reviewed-by: Johan Derycke Signed-off-by: Ulf Hansson Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-esdhc-imx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -868,6 +868,7 @@ sdhci_esdhc_imx_probe_dt(struct platform struct esdhc_platform_data *boarddata) { struct device_node *np = pdev->dev.of_node; + int ret; if (!np) return -ENODEV; @@ -904,7 +905,14 @@ sdhci_esdhc_imx_probe_dt(struct platform 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 Patches currently in stable-queue which might be from aisheng.dong@freescale.com are queue-4.1/dts-imx51-fix-sd-card-gpio-polarity-specified-in-device-tree.patch queue-4.1/dts-imx6-fix-sd-card-gpio-polarity-specified-in-device-tree.patch queue-4.1/dts-imx25-fix-sd-card-gpio-polarity-specified-in-device-tree.patch queue-4.1/dts-imx53-fix-sd-card-gpio-polarity-specified-in-device-tree.patch queue-4.1/mmc-sdhci-esdhc-imx-fix-cd-regression-for-dt-platform.patch