diff options
author | Sapthagiri Baratam <sapthagiri.baratam@cirrus.com> | 2018-08-21 10:22:44 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-10-23 03:58:34 -0400 |
commit | 6b269a41a4520f7eb639e61a45ebbb9c9267d5e0 (patch) | |
tree | b749cbfeb04b74367a25cfe4a35a32e5c85758f5 | |
parent | 3d51ec93a564a0f87d1276f067732be904816a53 (diff) |
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: cdd8da8cc66b ("mfd: arizona: Add gating of external MCLKn clocks")
Signed-off-by: Sapthagiri Baratam <sapthagiri.baratam@cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/arizona-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index 5f1e37d23943..057906e3c16e 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c | |||
@@ -52,8 +52,10 @@ int arizona_clk32k_enable(struct arizona *arizona) | |||
52 | if (ret != 0) | 52 | if (ret != 0) |
53 | goto err_ref; | 53 | goto err_ref; |
54 | ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK1]); | 54 | ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK1]); |
55 | if (ret != 0) | 55 | if (ret != 0) { |
56 | goto err_pm; | 56 | pm_runtime_put_sync(arizona->dev); |
57 | goto err_ref; | ||
58 | } | ||
57 | break; | 59 | break; |
58 | case ARIZONA_32KZ_MCLK2: | 60 | case ARIZONA_32KZ_MCLK2: |
59 | ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK2]); | 61 | ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK2]); |
@@ -67,8 +69,6 @@ int arizona_clk32k_enable(struct arizona *arizona) | |||
67 | ARIZONA_CLK_32K_ENA); | 69 | ARIZONA_CLK_32K_ENA); |
68 | } | 70 | } |
69 | 71 | ||
70 | err_pm: | ||
71 | pm_runtime_put_sync(arizona->dev); | ||
72 | err_ref: | 72 | err_ref: |
73 | if (ret != 0) | 73 | if (ret != 0) |
74 | arizona->clk32k_ref--; | 74 | arizona->clk32k_ref--; |