diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-01-17 11:03:40 +0000 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-01-17 12:04:24 +0000 |
commit | f718095c5215bdb7c3911433d146f63a4cf49acb (patch) | |
tree | 508439d93abfb60225b1854ea49eb1c4faf0f784 | |
parent | 77a9279dad924d51f6b3a429dadf730e8d2e844d (diff) |
ASoC: codecs: lpass: do not handle frame sync clock in runtime pm
Do not handle frame sync clock in runtime pm as this will put the
devices on the bus out of sync, resulting in a re-enumeration.
Lossing devices from bus in the middle of runtime pm resume
can have very bad side effects as we will be handling regmap cache
with old device id and this could underflow read fifo and overflow
write fifos.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r-- | sound/soc/codecs/lpass-rx-macro.c | 8 | ||||
-rw-r--r-- | sound/soc/codecs/lpass-tx-macro.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/lpass-wsa-macro.c | 10 |
3 files changed, 1 insertions, 26 deletions
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 10df189315d81..eb1772df51c6c 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3669,7 +3669,6 @@ static int __maybe_unused rx_macro_runtime_suspend(struct device *dev) clk_disable_unprepare(rx->mclk); clk_disable_unprepare(rx->npl); - clk_disable_unprepare(rx->fsgen); return 0; } @@ -3691,17 +3690,10 @@ static int __maybe_unused rx_macro_runtime_resume(struct device *dev) goto err_npl; } - ret = clk_prepare_enable(rx->fsgen); - if (ret) { - dev_err(dev, "unable to prepare fsgen\n"); - goto err_fsgen; - } regcache_cache_only(rx->regmap, false); regcache_sync(rx->regmap); return 0; -err_fsgen: - clk_disable_unprepare(rx->npl); err_npl: clk_disable_unprepare(rx->mclk); diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index 20f900fda0b7f..702ea07e5c2c5 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -2094,7 +2094,6 @@ static int __maybe_unused tx_macro_runtime_suspend(struct device *dev) clk_disable_unprepare(tx->mclk); clk_disable_unprepare(tx->npl); - clk_disable_unprepare(tx->fsgen); return 0; } @@ -2116,18 +2115,10 @@ static int __maybe_unused tx_macro_runtime_resume(struct device *dev) goto err_npl; } - ret = clk_prepare_enable(tx->fsgen); - if (ret) { - dev_err(dev, "unable to prepare fsgen\n"); - goto err_fsgen; - } - regcache_cache_only(tx->regmap, false); regcache_sync(tx->regmap); return 0; -err_fsgen: - clk_disable_unprepare(tx->npl); err_npl: clk_disable_unprepare(tx->mclk); diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 5cfe96f6e430e..9518af5bc5efe 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2507,7 +2507,6 @@ static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev) clk_disable_unprepare(wsa->mclk); clk_disable_unprepare(wsa->npl); - clk_disable_unprepare(wsa->fsgen); return 0; } @@ -2529,18 +2528,11 @@ static int __maybe_unused wsa_macro_runtime_resume(struct device *dev) goto err_npl; } - ret = clk_prepare_enable(wsa->fsgen); - if (ret) { - dev_err(dev, "unable to prepare fsgen\n"); - goto err_fsgen; - } - regcache_cache_only(wsa->regmap, false); regcache_sync(wsa->regmap); return 0; -err_fsgen: - clk_disable_unprepare(wsa->npl); + err_npl: clk_disable_unprepare(wsa->mclk); |