mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mfd: arizona: Correct calling of runtime_put_sync
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.
Fixes: cdd8da8cc6 ("mfd: arizona: Add gating of external MCLKn clocks")
Signed-off-by: Sapthagiri Baratam <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
3d51ec93a5
commit
6b269a41a4
1 changed files with 4 additions and 4 deletions
|
|
@ -52,8 +52,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]);
|
||||
|
|
@ -67,8 +69,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--;
|
||||
|
|
|
|||
Loading…
Reference in a new issue