* [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
@ 2011-05-11 6:52 Jaehoon Chung
2011-05-11 13:46 ` Chris Ball
2011-05-12 22:14 ` Chris Ball
0 siblings, 2 replies; 6+ messages in thread
From: Jaehoon Chung @ 2011-05-11 6:52 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, will.newton, Kyungmin Park
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);
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
2011-05-11 6:52 [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume Jaehoon Chung
@ 2011-05-11 13:46 ` Chris Ball
2011-05-12 3:01 ` Jaehoon Chung
2011-05-12 22:14 ` Chris Ball
1 sibling, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-05-11 13:46 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, will.newton, Kyungmin Park
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
2011-05-11 13:46 ` Chris Ball
@ 2011-05-12 3:01 ` Jaehoon Chung
2011-05-12 3:46 ` Chris Ball
0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2011-05-12 3:01 UTC (permalink / raw)
To: Chris Ball
Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, will.newton,
Kyungmin Park
Hi Chris..
I think you're confused something because my explanation.
My means..if we use the regulator, regulator is enabled when probing.
Then regulator is enabling until we don't disable..
In order to power-save, disabled the regulator when entered suspend.
Already in suspend function, located "regulator_disable()".
but also located "regulator_enable()" in suspend function.
So i think right that "regulator_enable()" is located in resume function.
not in suspend function.
Regards,
Jaehoon Chung
Chris Ball wrote:
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
2011-05-12 3:01 ` Jaehoon Chung
@ 2011-05-12 3:46 ` Chris Ball
2011-05-12 9:01 ` Will Newton
0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-05-12 3:46 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, will.newton, Kyungmin Park
Hi,
On Wed, May 11 2011, Jaehoon Chung wrote:
> Hi Chris..
>
> I think you're confused something because my explanation.
>
> My means..if we use the regulator, regulator is enabled when probing.
> Then regulator is enabling until we don't disable..
>
> In order to power-save, disabled the regulator when entered suspend.
> Already in suspend function, located "regulator_disable()".
> but also located "regulator_enable()" in suspend function.
>
> So i think right that "regulator_enable()" is located in resume function.
> not in suspend function.
Thanks, I agree. I hadn't looked at the suspend function, but now I see
that it already has the disable.
Will, want to ACK this before I merge it?
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
2011-05-12 3:46 ` Chris Ball
@ 2011-05-12 9:01 ` Will Newton
0 siblings, 0 replies; 6+ messages in thread
From: Will Newton @ 2011-05-12 9:01 UTC (permalink / raw)
To: Chris Ball; +Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Kyungmin Park
On Thu, May 12, 2011 at 4:46 AM, Chris Ball <cjb@laptop.org> wrote:
> Hi,
>
> On Wed, May 11 2011, Jaehoon Chung wrote:
>> Hi Chris..
>>
>> I think you're confused something because my explanation.
>>
>> My means..if we use the regulator, regulator is enabled when probing.
>> Then regulator is enabling until we don't disable..
>>
>> In order to power-save, disabled the regulator when entered suspend.
>> Already in suspend function, located "regulator_disable()".
>> but also located "regulator_enable()" in suspend function.
>>
>> So i think right that "regulator_enable()" is located in resume function.
>> not in suspend function.
>
> Thanks, I agree. I hadn't looked at the suspend function, but now I see
> that it already has the disable.
>
> Will, want to ACK this before I merge it?
Looks ok to me, although I don't have suitable hardware to test it.
Acked-by: Will Newton <will.newton@imgtec.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume
2011-05-11 6:52 [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume Jaehoon Chung
2011-05-11 13:46 ` Chris Ball
@ 2011-05-12 22:14 ` Chris Ball
1 sibling, 0 replies; 6+ messages in thread
From: Chris Ball @ 2011-05-12 22:14 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, will.newton, Kyungmin Park
Hi Jaehoon,
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);
>
Thanks, pushed to mmc-next for .40 with Will's ACK.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-12 22:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 6:52 [PATCH] dw_mmc: fixed wrong regulator_enable in suspend/resume Jaehoon Chung
2011-05-11 13:46 ` Chris Ball
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox