asoc: lpass-cdc: add put_autosuspend to pair with pm_runtime_get_sync

When reading/writing lpass codec registers, pm_runtime_put_autosuspend
is missed when vote fails and it causes device fails suspending after
ssr. Add pm_runtime_put_autosuspend to pair with pm_runtime_get_sync.
When LPASS_CDC_MACRO_EVT_PRE_SSR_UP comes, core vote is needed before
resetting GFMUX reg and dev_up is not set to true yet. Add pre_dev_up
flag to indicate PRE_SSR_UP and be used in lpass_cdc_check_core_votes
to avoid false alarm.

Change-Id: Ic12ecd9645f291078e32f4921f9f77c2d85e4b8c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
这个提交包含在:
Meng Wang
2021-07-28 17:09:38 +08:00
提交者 Gerrit - the friendly Code Review server
父节点 043966829b
当前提交 a8bd9abc48
修改 3 个文件,包含 13 行新增8 行删除

查看文件

@@ -727,8 +727,6 @@ static int lpass_cdc_va_macro_core_vote(void *handle, bool enable)
if (lpass_cdc_check_core_votes(va_priv->dev)) {
rc = 0;
} else {
pm_runtime_put_autosuspend(va_priv->dev);
pm_runtime_mark_last_busy(va_priv->dev);
rc = -ENOTSYNC;
}
} else {