mirror of https://gitee.com/openkylin/linux.git
soundwire: cadence: handle error cases with CONFIG_UPDATE
config_update() may time out or cannot be use in ClockStopMode Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200317163329.25501-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
5a885c52cf
commit
9bc87cce94
|
@ -239,6 +239,11 @@ static int cdns_config_update(struct sdw_cdns *cdns)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (sdw_cdns_is_clock_stop(cdns)) {
|
||||||
|
dev_err(cdns->dev, "Cannot program MCP_CONFIG_UPDATE in ClockStopMode\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE,
|
ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE,
|
||||||
CDNS_MCP_CONFIG_UPDATE_BIT);
|
CDNS_MCP_CONFIG_UPDATE_BIT);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Reference in New Issue