From: Adrian Hunter <adrian.hunter@intel.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, michal.simek@xilinx.com,
shubhrajyoti.datta@gmail.com
Subject: Re: [PATCH 2/2] mmc: arasan: Add polling card detect
Date: Tue, 25 Apr 2017 13:31:08 +0300 [thread overview]
Message-ID: <c41df518-ea54-7326-fe12-5d37433f7f68@intel.com> (raw)
In-Reply-To: <1492667088-20866-2-git-send-email-shubhrajyoti.datta@xilinx.com>
On 20/04/17 08:44, Shubhrajyoti Datta wrote:
> Add MMC_CAP_NEEDS_POLL flag for card detect if
> no gpio is passed otherwise use gpio as card detect.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-of-arasan.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index 812e75a..7e02190 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -23,6 +23,8 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> +#include <linux/mmc/host.h>
> +#include <linux/mmc/slot-gpio.h>
> #include <linux/phy/phy.h>
> #include <linux/pm_runtime.h>
> #include <linux/regmap.h>
> @@ -728,6 +730,11 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
> if (ret)
> goto err_add_host;
>
> + if (mmc_card_is_removable(host->mmc) &&
> + mmc_gpio_get_cd(host->mmc) < 0) {
> + host->mmc->caps |= MMC_CAP_NEEDS_POLL;
> + }
> +
> pm_runtime_put(&pdev->dev);
> return 0;
>
>
next prev parent reply other threads:[~2017-04-25 10:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 5:44 [PATCH 1/2] mmc: arasan: adapt to runtime pm Shubhrajyoti Datta
2017-04-20 5:44 ` [PATCH 2/2] mmc: arasan: Add polling card detect Shubhrajyoti Datta
2017-04-25 10:31 ` Adrian Hunter [this message]
2017-05-15 9:28 ` Ulf Hansson
2017-04-25 10:17 ` [PATCH 1/2] mmc: arasan: adapt to runtime pm Adrian Hunter
2017-04-25 10:50 ` Shubhrajyoti Datta
2017-04-25 10:52 ` Adrian Hunter
2017-04-25 11:19 ` Shubhrajyoti Datta
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=c41df518-ea54-7326-fe12-5d37433f7f68@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-mmc@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=shubhrajyoti.datta@gmail.com \
--cc=shubhrajyoti.datta@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox