Merge "soc: soundwire: Update check link status for master init" into audio-drivers.lnx.4.0

This commit is contained in:
Linux Build Service Account
2019-11-24 23:57:13 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -2199,6 +2199,12 @@ static int swrm_master_init(struct swr_mstr_ctrl *swrm)
swr_master_bulk_write(swrm, reg, value, len); swr_master_bulk_write(swrm, reg, value, len);
if (!swrm_check_link_status(swrm, 0x1)) {
dev_err(swrm->dev,
"%s: swr link failed to connect\n",
__func__);
return -EINVAL;
}
/* /*
* For SWR master version 1.5.1, continue * For SWR master version 1.5.1, continue
* execute on command ignore. * execute on command ignore.
@@ -2842,6 +2848,8 @@ static int swrm_runtime_suspend(struct device *dev)
mutex_lock(&swrm->reslock); mutex_lock(&swrm->reslock);
usleep_range(100, 105); usleep_range(100, 105);
} }
if (!swrm_check_link_status(swrm, 0x0))
goto exit;
ret = swrm_clk_request(swrm, false); ret = swrm_clk_request(swrm, false);
if (ret) { if (ret) {
dev_err(dev, "%s: swrmn clk failed\n", __func__); dev_err(dev, "%s: swrmn clk failed\n", __func__);
@@ -2857,8 +2865,6 @@ static int swrm_runtime_suspend(struct device *dev)
SWR_WAKE_IRQ_REGISTER, (void *)swrm); SWR_WAKE_IRQ_REGISTER, (void *)swrm);
swrm->ipc_wakeup_triggered = false; swrm->ipc_wakeup_triggered = false;
} }
if (!swrm_check_link_status(swrm, 0x0))
goto exit;
} }
} }