linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: b29396@freescale.com (Dong Aisheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/8] mmc: sdhci: do not enable card detect interrupt for gpio cd type
Date: Tue, 23 Sep 2014 15:10:48 +0800	[thread overview]
Message-ID: <20140923071027.GA12146@shlinux1.ap.freescale.net> (raw)
In-Reply-To: <CAPDyKFoD6G7w5gZEBGeqrmxDWyGHMy0_daikSmUfLCnZzZ-K_w@mail.gmail.com>

On Tue, Sep 23, 2014 at 09:27:49AM +0200, Ulf Hansson wrote:
> On 22 September 2014 11:12, Dong Aisheng <b29396@freescale.com> wrote:
> > Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
> > we also do not need to handle controller native card detect interrupt
> > for gpio as card detect case.
> > If we wrong enabled the card detect interrupt for gpio case,
> > it will cause a lot of unexpected card detect interrupts during data transfer
> > which should not happen.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
> > ---
> >  drivers/mmc/host/sdhci.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 7481bd8..85cbf45 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -136,9 +136,10 @@ static void sdhci_dumpregs(struct sdhci_host *host)
> >  static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
> >  {
> >         u32 present;
> > +       int gpio_cd = mmc_gpio_get_cd(host->mmc);
> >
> >         if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
> > -           (host->mmc->caps & MMC_CAP_NONREMOVABLE))
> > +           (host->mmc->caps & MMC_CAP_NONREMOVABLE) || !IS_ERR_VALUE(gpio_cd))
> 
> If you have a properly working gpio_cd, then why does you also have
> SDHCI_QUIRK_BROKEN_CARD_DETECTION set? Isn't that the actual problem?
> 

SDHCI_QUIRK_BROKEN_CARD_DETECTION seems only for controller CD function.
Thus even we're using gpio_cd, we still have this quirk set for controller
to avoid enable controller cd interrupts.
Does it make sense?

Regards
Dong Aisheng

> Kind regards
> Uffe
> 
> >                 return;
> >
> >         if (enable) {
> > --
> > 1.7.8
> >

  reply	other threads:[~2014-09-23  7:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22  9:12 [PATCH v2 0/8] mmc: sdhci/imx: a few clean up and fixes Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 1/8] mmc: sdhci-esdhc-imx: remove duplicated lines Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 2/8] mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt issue Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 3/8] mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 4/8] mmc: sdhci: do not enable card detect interrupt for gpio cd type Dong Aisheng
2014-09-23  7:27   ` Ulf Hansson
2014-09-23  7:10     ` Dong Aisheng [this message]
2014-09-23  8:17       ` Ulf Hansson
2014-09-22  9:12 ` [PATCH v2 5/8] mmc: sdhci: do not enable card cd wakeup for gpio case Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 6/8] mmc: sdhci-esdhc-imx: using specific compatible string in binding doc Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 7/8] mmc: sdhci-esdhc-imx: add imx6sx support Dong Aisheng
2014-09-22  9:12 ` [PATCH v2 8/8] mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl Dong Aisheng

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=20140923071027.GA12146@shlinux1.ap.freescale.net \
    --to=b29396@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).