From: Ludovic Desroches <ludovic.desroches@atmel.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: nicolas.ferre@atmel.com, ulf.hansson@linaro.org,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mmc: sdhci-of-at91: don't put device in suspend after probe
Date: Wed, 10 Feb 2016 16:34:19 +0100 [thread overview]
Message-ID: <20160210153419.GD14937@odux.rfo.atmel.com> (raw)
In-Reply-To: <56BB473B.2010105@intel.com>
On Wed, Feb 10, 2016 at 04:20:43PM +0200, Adrian Hunter wrote:
> On 10/02/16 16:16, Ludovic Desroches wrote:
> > On Wed, Feb 10, 2016 at 03:00:09PM +0200, Adrian Hunter wrote:
> >> On 10/02/16 14:51, Ludovic Desroches wrote:
> >>> Hi Adrian,
> >>>
> >>> On Wed, Feb 10, 2016 at 01:50:44PM +0200, Adrian Hunter wrote:
> >>>> On 10/02/16 11:58, Ludovic Desroches wrote:
> >>>>> By putting the device in suspend at the end of the probe, it is
> >>>>> impossible to wake up on non software event such as card
> >>>>> insertion/removal.
> >>>>>
> >>>>> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> >>>>> ---
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> Since I had no feedback on this topic:
> >>>>> http://permalink.gmane.org/gmane.linux.kernel.mmc/35160
> >>>>>
> >>>>> I would like to no more put the device in suspend at the end of the probe. If
> >>>>> my device is suspended at the end of the probe, I have no issue to resume on
> >>>>> a software event such as mounting my sdcard but hardware event such as card
> >>>>> insertion and removal do not trigger a resume.
> >>>>
> >>>> You can't use runtime PM unless you have a way to wake-up.
> >>>>
> >>>
> >>> Thanks for your feedback. I am a bit disappointed since Ulf advised me to use
> >>> runtime PM instead of system PM.
> >>>
> >>>> Currently, sdhci disables card detect interrupts when runtime suspended,
> >>>> and drivers use a card-detect GPIO to wake-up.
> >>>>
> >>>
> >>> It is what I have seen going through the sdhci layer. So next question is:
> >>> is it normal to not take care of card detect interrupts? We keep enabled
> >>> some IRQs probably for SDIO modules IRQ but not for card detection. I
> >>> don't understand the reason.
> >>
> >> Does sdhci-of-at91.c generate card detect interrupts while runtime suspended?
> >
> > It could if I keep one or two clocks enabled (need extra tests to be
> > sure about the clock needed to get this interrupt). I have tried to modify
> > quickly sdhci_runtime_suspend_host() to enable card insertion/removal,
> > there is an irq generated but the kernel complains this irq is not
> > handled. I didn't dig further, it was only to do a simple test.
>
> sdhci_irq() returns immediately if (host->runtime_suspended &&
> !sdhci_sdio_irq_enabled(host))
Ok so do I have to rework this part to allow wake up on card detect or
do I have to remove runtime PM from my driver?
>
> --
> 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
next prev parent reply other threads:[~2016-02-10 15:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 9:58 [RFC PATCH] mmc: sdhci-of-at91: don't put device in suspend after probe Ludovic Desroches
2016-02-10 11:50 ` Adrian Hunter
2016-02-10 12:51 ` Ludovic Desroches
2016-02-10 13:00 ` Adrian Hunter
2016-02-10 14:16 ` Ludovic Desroches
2016-02-10 14:20 ` Adrian Hunter
2016-02-10 15:34 ` Ludovic Desroches [this message]
2016-02-10 15:56 ` Ulf Hansson
2016-02-11 9:08 ` Ludovic Desroches
2016-02-11 9:46 ` Ulf Hansson
2016-02-11 11:05 ` Ludovic Desroches
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=20160210153419.GD14937@odux.rfo.atmel.com \
--to=ludovic.desroches@atmel.com \
--cc=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nicolas.ferre@atmel.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