Message ID | 4DCA3237.3080609@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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. -- 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
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.
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> -- 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
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.
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);