All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Jaehoon Chung <jh80.chung@samsung.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	will.newton@imgtec.com, Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
Date: Wed, 11 May 2011 09:46:06 -0400	[thread overview]
Message-ID: <m3pqnp2vvl.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <4DCA3237.3080609@samsung.com> (Jaehoon Chung's message of "Wed, 11 May 2011 15:52:39 +0900")

Hi,

On Wed, May 11 2011, Jaehoon Chung wrote:
> In suspend function, regulator_enable() need not.
> regulator_enable() should be locate in resume function.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 87e1f57..66dcddb 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1769,9 +1769,6 @@ static int dw_mci_suspend(struct platform_device *pdev, pm_message_t mesg)
>  	int i, ret;
>  	struct dw_mci *host = platform_get_drvdata(pdev);
>  
> -	if (host->vmmc)
> -		regulator_enable(host->vmmc);
> -
>  	for (i = 0; i < host->num_slots; i++) {
>  		struct dw_mci_slot *slot = host->slot[i];
>  		if (!slot)
> @@ -1798,6 +1795,9 @@ static int dw_mci_resume(struct platform_device *pdev)
>  	int i, ret;
>  	struct dw_mci *host = platform_get_drvdata(pdev);
>  
> +	if (host->vmmc)
> +		regulator_enable(host->vmmc);
> +
>  	if (host->dma_ops->init)
>  		host->dma_ops->init(host);
>  
>

Should the regulator be being disabled in the suspend function, then?

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2011-05-11 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11  6:52 [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume Jaehoon Chung
2011-05-11 13:46 ` Chris Ball [this message]
2011-05-12  3:01   ` Jaehoon Chung
2011-05-12  3:46     ` Chris Ball
2011-05-12  9:01       ` Will Newton
2011-05-12 22:14 ` Chris Ball

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=m3pqnp2vvl.fsf@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=jh80.chung@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=will.newton@imgtec.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 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.