dw_mmc: fixed wrong regulator_enable in suspend/resume
Subsystems (2)
Jaehoon Chung
maintainerPATCH 1/1 dw_mmc: fixed wrong regulator_enable in suspend/resume
In suspend function, regulator_enable() need not. regulator_enable() should be locate in resume function.
--- drivers/mmc/host/dw_mmc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/host/dw_mmc.c +3 -3
@@ -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);
Hi,
Quoted 25 lines · Jaehoon Chung
In suspend function,
regulator_enable()need not.regulator_enable()should be locate in resume function.Signed-off-by Jaehoon Chung <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- drivers/mmc/host/dw_mmc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/mmc/host/dw_mmc.c +0
-3@@ -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)
drivers/mmc/host/dw_mmc.c static int dw_mci_resume(struct platform_device *pdev) · line 1803
Quoted 9 lines
drivers/mmc/host/dw_mmc.c +3
-0@@ -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.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Jaehoon Chung
maintainerHi 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
Quoted 41 lines · Chris Ball
Hi,
Quoted 25 lines · Jaehoon Chung
In suspend function,
regulator_enable()need not.regulator_enable()should be locate in resume function.Signed-off-by Jaehoon Chung <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- drivers/mmc/host/dw_mmc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/mmc/host/dw_mmc.c +0
-3@@ -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)drivers/mmc/host/dw_mmc.c static int dw_mci_resume(struct platform_device *pdev) · line 1803
Quoted 9 lines
drivers/mmc/host/dw_mmc.c +3
-0@@ -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.
Hi,
Quoted 7 lines · Jaehoon Chung
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..
Quoted 6 lines
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.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Will Newton
Acked-byQuoted 14 lines · Chris Ball
Hi,
Quoted 11 lines · Jaehoon Chung
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.
Quoted 7 lines
Quoted 2 lines
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.
Hi Jaehoon,
Quoted 24 lines · Jaehoon Chung
In suspend function,
regulator_enable()need not.regulator_enable()should be locate in resume function.Signed-off-by Jaehoon Chung <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- drivers/mmc/host/dw_mmc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/mmc/host/dw_mmc.c +0
-3@@ -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)
drivers/mmc/host/dw_mmc.c static int dw_mci_resume(struct platform_device *pdev) · line 1803
Quoted 9 lines
drivers/mmc/host/dw_mmc.c +3
-0@@ -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.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child