Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	mark.rutland@arm.com, lorenzo.pieralisi@arm.com,
	ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH/RFC v2 2/2] mmc: core: Call mmc_power_off_nofity() if pm_suspend_via_firmware()
Date: Fri, 19 Jun 2020 16:41:15 +0300	[thread overview]
Message-ID: <3d91f688-d79a-7d50-a9ac-e08ea2d0cd31@cogentembedded.com> (raw)
In-Reply-To: <1592566143-4546-3-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Hello!

On 19.06.2020 14:29, Yoshihiro Shimoda wrote:

> If pm_suspend_via_firmware() returns true, the system will be able
> to cut both vcc and vccq in the suspend. So, call
> mmc_power_off_nofity() if pm_suspend_via_firmware() returns true.

    mmc_poweroff_notify()? :-)

> Note that we should not update the MMC_CAP2_FULL_PWR_CYCLE caps
> because the mmc_select_voltage() checks the caps when attaches
> a mmc/sd.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>   drivers/mmc/core/mmc.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 4203303..81941fd 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
[...]
> @@ -2038,7 +2039,8 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
>   		goto out;
>   
>   	if (mmc_can_poweroff_notify(host->card) &&
> -		((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend))
> +	    ((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend ||
> +	     pm_suspend_via_firmware()))
>   		err = mmc_poweroff_notify(host->card, notify_type);
>   	else if (mmc_can_sleep(host->card))
>   		err = mmc_sleep(host);
> 

MBR, Sergei

  reply	other threads:[~2020-06-19 13:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 11:29 [PATCH/RFC v2 0/2] treewide: fix _mmc_suspend() on PSCI Yoshihiro Shimoda
2020-06-19 11:29 ` [PATCH/RFC v2 1/2] firmware: psci: call pm_set_suspend_via_firmware() Yoshihiro Shimoda
2020-06-29 14:33   ` Sudeep Holla
2020-06-30  8:53     ` Yoshihiro Shimoda
2020-06-19 11:29 ` [PATCH/RFC v2 2/2] mmc: core: Call mmc_power_off_nofity() if pm_suspend_via_firmware() Yoshihiro Shimoda
2020-06-19 13:41   ` Sergei Shtylyov [this message]
2020-06-22  1:46     ` Yoshihiro Shimoda
2020-06-19 14:51 ` [PATCH/RFC v2 0/2] treewide: fix _mmc_suspend() on PSCI Geert Uytterhoeven

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=3d91f688-d79a-7d50-a9ac-e08ea2d0cd31@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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