|
@@ -3395,6 +3395,8 @@ static int swrm_runtime_suspend(struct device *dev)
|
|
|
if (!swrm->clk_stop_mode0_supp || swrm->state == SWR_MSTR_SSR) {
|
|
|
dev_err_ratelimited(dev, "%s: clk stop mode not supported or SSR entry\n",
|
|
|
__func__);
|
|
|
+ if (swrm->state == SWR_MSTR_SSR)
|
|
|
+ goto chk_lnk_status;
|
|
|
mutex_unlock(&swrm->reslock);
|
|
|
enable_bank_switch(swrm, 0, SWR_ROW_50, SWR_MIN_COL);
|
|
|
mutex_lock(&swrm->reslock);
|
|
@@ -3434,6 +3436,7 @@ static int swrm_runtime_suspend(struct device *dev)
|
|
|
mutex_lock(&swrm->reslock);
|
|
|
usleep_range(100, 105);
|
|
|
}
|
|
|
+chk_lnk_status:
|
|
|
if (!swrm_check_link_status(swrm, 0x0))
|
|
|
dev_dbg(dev, "%s:failed in disconnecting, ssr?\n",
|
|
|
__func__);
|
|
@@ -3689,13 +3692,15 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
|
|
|
case SWR_DEVICE_SSR_DOWN:
|
|
|
trace_printk("%s: swr device down called\n", __func__);
|
|
|
mutex_lock(&swrm->mlock);
|
|
|
+ mutex_lock(&swrm->devlock);
|
|
|
+ swrm->dev_up = false;
|
|
|
+ mutex_unlock(&swrm->devlock);
|
|
|
if (swrm->state == SWR_MSTR_DOWN)
|
|
|
dev_dbg(swrm->dev, "%s:SWR master is already Down:%d\n",
|
|
|
__func__, swrm->state);
|
|
|
else
|
|
|
swrm_device_down(&pdev->dev);
|
|
|
mutex_lock(&swrm->devlock);
|
|
|
- swrm->dev_up = false;
|
|
|
if (swrm->hw_core_clk_en)
|
|
|
digital_cdc_rsc_mgr_hw_vote_disable(
|
|
|
swrm->lpass_core_hw_vote, swrm->dev);
|