mfd: arizona: Correct calling of runtime_put_sync
Subsystems (2)
PATCH v2 1/1 mfd: arizona: Correct calling of runtime_put_sync
From: Sapthagiri Baratam <[email protected]>
Don't call runtime_put_sync when clk32k_ref is ARIZONA_32KZ_MCLK2 as there is no corresponding runtime_get_sync call.
MCLK1 is not in the AoD power domain so if it is used as 32kHz clock source we need to hold a runtime PM reference to keep the device from going into low power mode.
---
Changes in v2:
- changed signed-off in commit message to full name
drivers/mfd/arizona-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mfd/arizona-core.c +4 -4
@@ -53,8 +53,10 @@ int arizona_clk32k_enable(struct arizona *arizona)if (ret !=0 ) goto err_ref; ret =clk_prepare_enable (arizona->mclk[ARIZONA_MCLK1 ]); -if (ret !=0 ) - goto err_pm; +if (ret !=0 ) { +pm_runtime_put_sync (arizona->dev); + goto err_ref; + }break ;case ARIZONA_32KZ_MCLK2 : ret =clk_prepare_enable (arizona->mclk[ARIZONA_MCLK2 ]);
@@ -68,8 +70,6 @@ int arizona_clk32k_enable(struct arizona *arizona) ARIZONA_CLK_32K_ENA); } -err_pm: -pm_runtime_put_sync (arizona->dev); err_ref:if (ret !=0 ) arizona->clk32k_ref--;
Signature · 1 line
1.9.1
Quoted 5 lines · On Tue, Aug 21, 2018 at 07:52:44PM +0530, [email protected] wrote:
From: Sapthagiri Baratam <[email protected]>
Don't call
runtime_put_syncwhenclk32k_refisARIZONA_32KZ_MCLK2as there is no correspondingruntime_get_synccall.
Quoted 7 lines
MCLK1 is not in the AoD power domain so if it is used as 32kHz clock source we need to hold a runtime PM reference to keep the device from going into low power mode.
Fixes cdd8da8cc66b ("mfd: arizona: Add gating of external MCLKn clocks")Signed-off-by Sapthagiri Baratam <[email protected]>---
Thanks,
Charles
Lee Jones
AppliedQuoted 9 lines · On Tue, 21 Aug 2018, [email protected] wrote:
From: Sapthagiri Baratam <[email protected]>
Don't call
runtime_put_syncwhenclk32k_refisARIZONA_32KZ_MCLK2as there is no correspondingruntime_get_synccall.MCLK1 is not in the AoD power domain so if it is used as 32kHz clock source we need to hold a runtime PM reference to keep the device from going into low power mode.
Quoted 8 lines
Fixes cdd8da8cc66b ("mfd: arizona: Add gating of external MCLKn clocks")Signed-off-by Sapthagiri Baratam <[email protected]>---
Changes in v2:
- changed signed-off in commit message to full namedrivers/mfd/arizona-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog