All of lore.kernel.org
 help / color / mirror / Atom feed
From: "S, Venkatraman" <svenkatr@ti.com>
To: Saugata Das <saugata.das@stericsson.com>
Cc: linux-mmc@vger.kernel.org, patches@linaro.org,
	saugata.das@linaro.org, girish.shivananjappa@linaro.org,
	asutoshd@codeaurora.org, subhashj@codeaurora.org
Subject: Re: [PATCH] MMC-4.5 Power OFF Notify Rework
Date: Fri, 15 Jun 2012 18:27:04 +0530	[thread overview]
Message-ID: <CANfBPZ8yK1YOC=MBs6dvwj=sghuKUmvYDwCH17P-g9D99D_Vkg@mail.gmail.com> (raw)
In-Reply-To: <1339733331-8563-1-git-send-email-saugata.das@stericsson.com>

On Fri, Jun 15, 2012 at 9:38 AM, Saugata Das <saugata.das@stericsson.com> wrote:
> From: Saugata Das <saugata.das@linaro.org>
>
> This is a rework of the existing POWER OFF NOTIFY patch. The current problem
> with the patch comes from the ambiguity on the usage of POWER OFF NOTIFY
> together with SLEEP and misunderstanding on the usage of MMC_POWER_OFF
> power_mode from mmc_set_ios in different host controller drivers.
>
> This new patch works around this problem by adding a new host CAP,
> MMC_CAP2_POWER_OFF_VCCQ_DURING_SUSPEND, which when set sends a
> POWER OFF NOTIFY from mmc_suspend instead of SLEEP. It is expected that host
> controller drivers will set this CAP, if they switch off both Vcc and Vccq
> from MMC_POWER_OFF condition within mmc_set_ios. However, note that there
> is no harm in sending MMC_POWER_NOTIFY even if Vccq is not switched off.
>
> This patch also sends POWER OFF NOTIFY from power management routines (e.g.
> mmc_power_save_host, mmc_pm_notify/PM_SUSPEND_PREPARE, mmc_stop_host), which
> does reinitialization of the eMMC on the return path of the power management
> routines (e.g. mmc_power_restore_host, mmc_pm_notify/PM_POST_RESTORE,
> mmc_start_host).
>
> This patch sets POWER_OFF_NOTIFICATION to POWER_OFF_SHORT if it is sent from
> the suspend sequence. If it is sent from shutdown sequence then it is set to
> POWER_OFF_LONG.
>
> Earlier implementation of PowerOff Notify as a core function is replaced as
> a device's bus operation.
>
> For the cards that cannot cut vccq can sleep during suspend. But the after
> suspend->sleep->poweroff the ios values are modified. which results in
> malfunction of card after resume. This patch fixes that issue by saving the
> ios before sleep and restoring the saved values before resume.
>
> Signed-off-by: Saugata Das <saugata.das@linaro.org>
> Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
>
I just had a chance to test this on OMAP. I only have v4.41 card on
this one, so it doesn't do
Power Off Notify, but suspend resume works with just CMD5, and hasn't caused a
regression. FWIW,
 Partially Tested-by: Venkatraman S<svenkatr@ti.com>

  reply	other threads:[~2012-06-15 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15  4:08 [PATCH] MMC-4.5 Power OFF Notify Rework Saugata Das
2012-06-15 12:57 ` S, Venkatraman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-06-29  9:03 Saugata Das
2012-08-20 14:13 ` Ulf Hansson
2012-04-19 12:41 [PATCH] MMC-4.5 Power OFF Notify rework Girish K S
2012-04-20 11:33 ` Girish K S
2012-04-20 12:55   ` Ulf Hansson
2012-04-23 14:11   ` Ulf Hansson
2012-04-27  4:40     ` Girish K S
2012-04-27  7:40       ` Ulf Hansson
2012-04-27  8:42         ` Saugata Das
2012-04-27  8:53           ` Girish K S

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='CANfBPZ8yK1YOC=MBs6dvwj=sghuKUmvYDwCH17P-g9D99D_Vkg@mail.gmail.com' \
    --to=svenkatr@ti.com \
    --cc=asutoshd@codeaurora.org \
    --cc=girish.shivananjappa@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=saugata.das@linaro.org \
    --cc=saugata.das@stericsson.com \
    --cc=subhashj@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.